Message ID | 7bc6ad16-9a4d-dd90-202e-47d6cbb5a136@google.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ext4: add __GFP_NOWARN to GFP_NOWAIT in readahead | expand |
On Mon 23-10-23 23:26:08, Hugh Dickins wrote: > 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> Yeah, makes sense. Just the commit you mention isn't upstream yet so I'm not sure whether the commit hash is stable. I guess something for Andrew to figure out. In any case feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > 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 >
On Tue, 24 Oct 2023 12:03:18 +0200 Jan Kara <jack@suse.cz> wrote: > On Mon 23-10-23 23:26:08, Hugh Dickins wrote: > > 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> > > Yeah, makes sense. Just the commit you mention isn't upstream yet so I'm > not sure whether the commit hash is stable. e509ad4d77e6 is actually in mm-stable so yes, the hash should be stable.
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))
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(-)