linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: add __GFP_NOWARN to GFP_NOWAIT in readahead
@ 2023-10-24  6:26 Hugh Dickins
  2023-10-24 10:03 ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Hugh Dickins @ 2023-10-24  6:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox, Hui Zhu, Jan Kara, Theodore Ts'o,
	linux-fsdevel, linux-ext4, linux-mm

Since mm-hotfixes-stable commit e509ad4d77e6 ("ext4: use bdev_getblk() to
avoid memory reclaim in readahead path") rightly replaced GFP_NOFAIL
allocations by GFP_NOWAIT allocations, I've occasionally been seeing
"page allocation failure: order:0" warnings under load: all with
ext4_sb_breadahead_unmovable() in the stack.  I don't think those
warnings are of any interest: suppress them with __GFP_NOWARN.

Fixes: e509ad4d77e6 ("ext4: use bdev_getblk() to avoid memory reclaim in readahead path")
Signed-off-by: Hugh Dickins <hughd@google.com>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c00ec159dea5..56a08fc5c5d5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -262,7 +262,7 @@ struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
 void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block)
 {
 	struct buffer_head *bh = bdev_getblk(sb->s_bdev, block,
-			sb->s_blocksize, GFP_NOWAIT);
+			sb->s_blocksize, GFP_NOWAIT | __GFP_NOWARN);
 
 	if (likely(bh)) {
 		if (trylock_buffer(bh))
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-24 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24  6:26 [PATCH] ext4: add __GFP_NOWARN to GFP_NOWAIT in readahead Hugh Dickins
2023-10-24 10:03 ` Jan Kara
2023-10-24 14:53   ` Andrew Morton
2023-10-24 16:25     ` Include __GFP_NOWARN in GFP_NOWAIT Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).