From: Andrew Morton <akpm@linux-foundation.org>
To: <yanfei.xu@windriver.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/page_alloc.c: avoid inheritting current's flags when invoked in interrupt
Date: Tue, 15 Sep 2020 18:17:49 -0700 [thread overview]
Message-ID: <20200915181749.2bb7420e2c7e62267b21a0fc@linux-foundation.org> (raw)
In-Reply-To: <20200915075635.1112-1-yanfei.xu@windriver.com>
On Tue, 15 Sep 2020 15:56:35 +0800 <yanfei.xu@windriver.com> wrote:
> From: Yanfei Xu <yanfei.xu@windriver.com>
>
> alloc_mask shouldn't inherit the current task's flags when
> __alloc_pages_nodemask is invoked in interrupt.
>
> ...
>
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4889,7 +4889,8 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid,
> * from a particular context which has been marked by
> * memalloc_no{fs,io}_{save,restore}.
> */
> - alloc_mask = current_gfp_context(gfp_mask);
> + if (!in_interrupt())
> + alloc_mask = current_gfp_context(gfp_mask);
> ac.spread_dirty_pages = false;
>
> /*
hm, yes, and perhaps other callsites in page_alloc.c.
I assume this doesn't actually make any runtime difference? Because
gfp_mask in interrupt contexts isn't going to have __GFP_IO or __GFP_FS
anyway.
next prev parent reply other threads:[~2020-09-16 1:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 7:56 yanfei.xu
2020-09-16 1:17 ` Andrew Morton [this message]
2020-09-16 3:47 ` Xu, Yanfei
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=20200915181749.2bb7420e2c7e62267b21a0fc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yanfei.xu@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox