From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,willy@infradead.org,viro@ZenIV.linux.org.uk,tujinjiang@huawei.com,jack@suse.cz,brauner@kernel.org,liushixin2@huawei.com,akpm@linux-foundation.org
Subject: [folded-merged] mm-readahead-dont-decrease-mmap_miss-when-folio-has-workingset-flags-fix.patch removed from -mm tree
Date: Thu, 25 Apr 2024 20:21:21 -0700 [thread overview]
Message-ID: <20240426032121.E6AB2C113CD@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/filemap: don't decrease mmap_miss when folio has workingset flag
has been removed from the -mm tree. Its filename was
mm-readahead-dont-decrease-mmap_miss-when-folio-has-workingset-flags-fix.patch
This patch was dropped because it was folded into mm-readahead-dont-decrease-mmap_miss-when-folio-has-workingset-flags.patch
------------------------------------------------------
From: Liu Shixin <liushixin2@huawei.com>
Subject: mm/filemap: don't decrease mmap_miss when folio has workingset flag
Date: Tue, 26 Mar 2024 14:50:26 +0800
add comments
Link: https://lkml.kernel.org/r/20240326065026.1910584-1-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jinjiang Tu <tujinjiang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/filemap.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/mm/filemap.c~mm-readahead-dont-decrease-mmap_miss-when-folio-has-workingset-flags-fix
+++ a/mm/filemap.c
@@ -3492,6 +3492,13 @@ static vm_fault_t filemap_map_folio_rang
if (PageHWPoison(page + count))
goto skip;
+ /*
+ * If there are too many folios that are recently evicted
+ * in a file, they will probably continue to be evicted.
+ * In such situation, read-ahead is only a waste of IO.
+ * Don't decrease mmap_miss in this scenario to make sure
+ * we can stop read-ahead.
+ */
if (!folio_test_workingset(folio))
(*mmap_miss)++;
@@ -3542,6 +3549,7 @@ static vm_fault_t filemap_map_order0_fol
if (PageHWPoison(page))
return ret;
+ /* See comment of filemap_map_folio_range() */
if (!folio_test_workingset(folio))
(*mmap_miss)++;
_
Patches currently in -mm which might be from liushixin2@huawei.com are
mm-readahead-break-read-ahead-loop-if-filemap_add_folio-return-enomem.patch
mm-readahead-dont-decrease-mmap_miss-when-folio-has-workingset-flags.patch
reply other threads:[~2024-04-26 3:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240426032121.E6AB2C113CD@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=liushixin2@huawei.com \
--cc=mm-commits@vger.kernel.org \
--cc=tujinjiang@huawei.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.