* [PATCH] ubifs: Change gfp flags in page allocation for bulk read
@ 2017-06-13 6:30 Hyunchul Lee
2017-06-13 6:53 ` Richard Weinberger
0 siblings, 1 reply; 2+ messages in thread
From: Hyunchul Lee @ 2017-06-13 6:30 UTC (permalink / raw)
To: Richard Weinberger
Cc: Artem Bityutskiy, adrian.hunter, linux-kernel, linux-fsdevel,
linux-mtd, kernel-team
From: Hyunchul Lee <cheol.lee@lge.com>
Use readahead_gfp_mask for gfp flags when allocating pages.
This set additional flags which are __GFP_NORETRY and
__GFP_NOWARN. So OOMs and a failure message can be
avoided.
And we should remove __GFP_FS from flags to prevent from
calling ubifs_writepage during page reclaim.
Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
---
fs/ubifs/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index d9ae86f..4396c04 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -735,6 +735,7 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,
int err, page_idx, page_cnt, ret = 0, n = 0;
int allocate = bu->buf ? 0 : 1;
loff_t isize;
+ gfp_t ra_gfp_mask = readahead_gfp_mask(mapping) & ~__GFP_FS;
err = ubifs_tnc_get_bu_keys(c, bu);
if (err)
@@ -796,8 +797,7 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,
if (page_offset > end_index)
break;
- page = find_or_create_page(mapping, page_offset,
- GFP_NOFS | __GFP_COLD);
+ page = find_or_create_page(mapping, page_offset, ra_gfp_mask);
if (!page)
break;
if (!PageUptodate(page))
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ubifs: Change gfp flags in page allocation for bulk read
2017-06-13 6:30 [PATCH] ubifs: Change gfp flags in page allocation for bulk read Hyunchul Lee
@ 2017-06-13 6:53 ` Richard Weinberger
0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2017-06-13 6:53 UTC (permalink / raw)
To: Hyunchul Lee
Cc: Artem Bityutskiy, adrian.hunter, linux-kernel, linux-fsdevel,
linux-mtd, kernel-team
Hyunchul,
Am 13.06.2017 um 08:30 schrieb Hyunchul Lee:
> From: Hyunchul Lee <cheol.lee@lge.com>
>
> Use readahead_gfp_mask for gfp flags when allocating pages.
> This set additional flags which are __GFP_NORETRY and
> __GFP_NOWARN. So OOMs and a failure message can be
> avoided.
> And we should remove __GFP_FS from flags to prevent from
> calling ubifs_writepage during page reclaim.
Your commit message does not explain why we need this and what
problem it solves.
When facing changes like this I'm especially interested in whether
this is a theoretical bugfix or not.
Thanks,
//richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-13 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 6:30 [PATCH] ubifs: Change gfp flags in page allocation for bulk read Hyunchul Lee
2017-06-13 6:53 ` Richard Weinberger
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).