Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146745936
D32899.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D32899.diff
View Options
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -182,10 +182,6 @@
VM_OBJECT_ASSERT_WLOCKED(object);
- /* Disallow an invalid combination of flags. */
- MPASS((pflags & (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM)) !=
- (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM));
-
wait = (pflags & VM_ALLOC_WAITOK) != 0;
reclaim = (pflags & VM_ALLOC_NORECLAIM) == 0;
pflags &= ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL);
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2250,12 +2250,15 @@
vm_page_t m, m_ret, mpred;
u_int busy_lock, flags, oflags;
-#define VPAC_FLAGS VPA_FLAGS
+#define VPAC_FLAGS (VPA_FLAGS | VM_ALLOC_NORECLAIM)
KASSERT((req & ~VPAC_FLAGS) == 0,
("invalid request %#x", req));
KASSERT(((req & (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)) !=
(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)),
("invalid request %#x", req));
+ KASSERT((req & (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM)) !=
+ (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM),
+ ("invalid request %#x", req));
VM_OBJECT_ASSERT_WLOCKED(object);
KASSERT((object->flags & OBJ_FICTITIOUS) == 0,
("vm_page_alloc_contig: object %p has fictitious pages",
@@ -2294,7 +2297,8 @@
if (m_ret == NULL) {
vm_domain_freecnt_inc(vmd, npages);
#if VM_NRESERVLEVEL > 0
- if (vm_reserv_reclaim_contig(domain, npages, low,
+ if ((req & VM_ALLOC_NORECLAIM) == 0 &&
+ vm_reserv_reclaim_contig(domain, npages, low,
high, alignment, boundary))
goto again;
#endif
@@ -2525,9 +2529,12 @@
vm_page_t m, m_ret;
u_int flags;
-#define VPANC_FLAGS VPAN_FLAGS
+#define VPANC_FLAGS (VPAN_FLAGS | VM_ALLOC_NORECLAIM)
KASSERT((req & ~VPANC_FLAGS) == 0,
("invalid request %#x", req));
+ KASSERT((req & (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM)) !=
+ (VM_ALLOC_WAITOK | VM_ALLOC_NORECLAIM),
+ ("invalid request %#x", req));
KASSERT(((req & (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)) !=
(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)),
("invalid request %#x", req));
@@ -2547,7 +2554,8 @@
if (m_ret == NULL) {
vm_domain_freecnt_inc(vmd, npages);
#if VM_NRESERVLEVEL > 0
- if (vm_reserv_reclaim_contig(domain, npages, low,
+ if ((req & VM_ALLOC_NORECLAIM) == 0 &&
+ vm_reserv_reclaim_contig(domain, npages, low,
high, alignment, boundary))
goto again;
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 6, 6:02 AM (3 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29315231
Default Alt Text
D32899.diff (2 KB)
Attached To
Mode
D32899: vm_page: Handle VM_ALLOC_NORECLAIM in the contiguous page allocator
Attached
Detach File
Event Timeline
Log In to Comment