From: Matthew Wilcox <willy@infradead.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@lge.com, Christoph Hellwig <hch@infradead.org>,
Roman Gushchin <guro@fb.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Michal Hocko <mhocko@suse.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs
Date: Tue, 21 Jul 2020 13:43:12 +0100 [thread overview]
Message-ID: <20200721124312.GE15516@casper.infradead.org> (raw)
In-Reply-To: <4c484ce0-cfed-0c50-7a20-d1474ce9afee@suse.cz>
On Tue, Jul 21, 2020 at 02:38:56PM +0200, Vlastimil Babka wrote:
> On 7/21/20 2:05 PM, Matthew Wilcox wrote:
> > On Tue, Jul 21, 2020 at 12:28:49PM +0900, js1304@gmail.com wrote:
> >> @@ -4619,8 +4631,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> >> wake_all_kswapds(order, gfp_mask, ac);
> >>
> >> reserve_flags = __gfp_pfmemalloc_flags(gfp_mask);
> >> - if (reserve_flags)
> >> + if (reserve_flags) {
> >> alloc_flags = reserve_flags;
> >> + alloc_flags = current_alloc_flags(gfp_mask, alloc_flags);
> >> + }
> >
> > Is this right? Shouldn't you be passing reserve_flags to
> > current_alloc_flags() here? Also, there's no need to add { } here.
>
> Note the "alloc_flags = reserve_flags;" line is not being deleted here. But if
> it was, your points would be true, and yeah it would be a bit more tidy.
Oh ... I should wake up a little more.
Yeah, I'd recommend just doing this:
- alloc_flags = reserve_flags;
+ alloc_flags = current_alloc_flags(gfp_mask, reserve_flags);
next prev parent reply other threads:[~2020-07-21 12:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 3:28 [PATCH] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs js1304
2020-07-21 9:17 ` Vlastimil Babka
2020-07-21 12:05 ` Matthew Wilcox
2020-07-21 12:38 ` Vlastimil Babka
2020-07-21 12:43 ` Matthew Wilcox [this message]
2020-07-23 1:42 ` Joonsoo Kim
2020-07-23 1:38 ` Joonsoo Kim
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=20200721124312.GE15516@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=guro@fb.com \
--cc=hch@infradead.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).