[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200219210103.32400-24-willy@infradead.org>
Date: Wed, 19 Feb 2020 13:01:02 -0800
From: Matthew Wilcox <willy@...radead.org>
To: linux-fsdevel@...r.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-erofs@...ts.ozlabs.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
cluster-devel@...hat.com, ocfs2-devel@....oracle.com,
linux-xfs@...r.kernel.org
Subject: [PATCH v7 23/24] mm: Document why we don't set PageReadahead
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
If the page is already in cache, we don't set PageReadahead on it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
mm/readahead.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mm/readahead.c b/mm/readahead.c
index 453ef146de83..bbe7208fcc2d 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -196,9 +196,12 @@ void page_cache_readahead_unbounded(struct address_space *mapping,
if (page && !xa_is_value(page)) {
/*
- * Page already present? Kick off the current batch of
- * contiguous pages before continuing with the next
- * batch.
+ * Page already present? Kick off the current batch
+ * of contiguous pages before continuing with the
+ * next batch. This page may be the one we would
+ * have intended to mark as Readahead, but we don't
+ * have a stable reference to this page, and it's
+ * not worth getting one just for that.
*/
read_pages(&rac, &page_pool);
continue;
--
2.25.0
Powered by blists - more mailing lists