Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153206698
D15402.id42475.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
D15402.id42475.diff
View Options
Index: head/sys/vm/vm_pageout.c
===================================================================
--- head/sys/vm/vm_pageout.c
+++ head/sys/vm/vm_pageout.c
@@ -252,32 +252,16 @@
}
/*
- * Ensure that the page has not been dequeued after a pageout batch was
- * collected. See vm_page_dequeue_complete().
- */
-static inline bool
-vm_pageout_page_queued(vm_page_t m, int queue)
-{
-
- vm_page_assert_locked(m);
-
- if ((m->aflags & PGA_DEQUEUE) != 0)
- return (false);
- atomic_thread_fence_acq();
- return (m->queue == queue);
-}
-
-/*
* Add a small number of queued pages to a batch queue for later processing
* without the corresponding queue lock held. The caller must have enqueued a
* marker page at the desired start point for the scan. Pages will be
* physically dequeued if the caller so requests. Otherwise, the returned
* batch may contain marker pages, and it is up to the caller to handle them.
*
- * When processing the batch queue, vm_pageout_page_queued() must be used to
- * determine whether the page was logically dequeued by another thread. Once
- * this check is performed, the page lock guarantees that the page will not be
- * disassociated from the queue.
+ * When processing the batch queue, vm_page_queue() must be used to
+ * determine whether the page has been logically dequeued by another thread.
+ * Once this check is performed, the page lock guarantees that the page will
+ * not be disassociated from the queue.
*/
static __always_inline void
vm_pageout_collect_batch(struct scan_state *ss, const bool dequeue)
@@ -751,7 +735,7 @@
* The page may have been disassociated from the queue
* while locks were dropped.
*/
- if (!vm_pageout_page_queued(m, queue))
+ if (vm_page_queue(m) != queue)
continue;
/*
@@ -1262,7 +1246,7 @@
* The page may have been disassociated from the queue
* while locks were dropped.
*/
- if (!vm_pageout_page_queued(m, PQ_INACTIVE)) {
+ if (vm_page_queue(m) != PQ_INACTIVE) {
addl_page_shortage++;
continue;
}
@@ -1542,7 +1526,7 @@
* The page may have been disassociated from the queue
* while locks were dropped.
*/
- if (!vm_pageout_page_queued(m, PQ_ACTIVE))
+ if (vm_page_queue(m) != PQ_ACTIVE)
continue;
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 7:39 PM (1 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31840841
Default Alt Text
D15402.id42475.diff (2 KB)
Attached To
Mode
D15402: Get rid of vm_pageout_page_queued()
Attached
Detach File
Event Timeline
Log In to Comment