From: David Rientjes <rientjes@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Michal Hocko <mhocko@kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath
Date: Wed, 20 Jul 2016 15:00:08 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1607201459170.29381@chino.kir.corp.google.com> (raw)
In-Reply-To: <7f97c5e0-731c-0431-e9f6-b53cd8f87f61@suse.cz>
On Wed, 20 Jul 2016, Vlastimil Babka wrote:
> >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >> index eb1968a1041e..30443804f156 100644
> >> --- a/mm/page_alloc.c
> >> +++ b/mm/page_alloc.c
> >> @@ -3541,35 +3541,42 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> >> */
> >> alloc_flags = gfp_to_alloc_flags(gfp_mask);
> >>
> >> + if (gfp_mask & __GFP_KSWAPD_RECLAIM)
> >> + wake_all_kswapds(order, ac);
> >> +
> >> + /*
> >> + * The adjusted alloc_flags might result in immediate success, so try
> >> + * that first
> >> + */
> >> + page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
> >> + if (page)
> >> + goto got_pg;
> >
> > Any reason to not test gfp_pfmemalloc_allowed() here? For contexts where
> > it returns true, it seems like the above would be an unneeded failure if
> > ALLOC_WMARK_MIN would have failed. No strong opinion.
>
> Yeah, two reasons:
> 1 - less overhead (for the test) if we went to slowpath just to wake up
> kswapd and then succeed on min watermark
> 2 - try all zones with min watermark before resorting to no watermark
> (if allowed), so we don't needlessly put below min watermark the first
> zone in zonelist, while some later zone would still be above watermark
>
The second point makes sense, thanks!
Acked-by: David Rientjes <rientjes@google.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-07-20 22:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 11:22 [PATCH 0/8] compaction-related cleanups v4 Vlastimil Babka
2016-07-18 11:22 ` [PATCH 1/8] mm, compaction: don't isolate PageWriteback pages in MIGRATE_SYNC_LIGHT mode Vlastimil Babka
2016-07-19 22:21 ` David Rientjes
2016-07-18 11:22 ` [PATCH 2/8] mm, page_alloc: set alloc_flags only once in slowpath Vlastimil Babka
2016-07-18 11:27 ` Michal Hocko
2016-07-19 22:28 ` David Rientjes
2016-07-21 7:00 ` Vlastimil Babka
2016-07-18 11:22 ` [PATCH 3/8] mm, page_alloc: don't retry initial attempt " Vlastimil Babka
2016-07-18 11:29 ` Michal Hocko
2016-07-18 11:34 ` Vlastimil Babka
2016-07-19 22:36 ` David Rientjes
2016-07-20 15:25 ` Vlastimil Babka
2016-07-20 22:00 ` David Rientjes [this message]
2016-07-18 11:22 ` [PATCH 4/8] mm, page_alloc: restructure direct compaction handling " Vlastimil Babka
2016-07-19 22:50 ` David Rientjes
2016-07-20 16:02 ` Vlastimil Babka
2016-07-18 11:22 ` [PATCH 5/8] mm, page_alloc: make THP-specific decisions more generic Vlastimil Babka
2016-07-19 23:10 ` David Rientjes
2016-07-21 7:13 ` Vlastimil Babka
2016-07-18 11:23 ` [PATCH 6/8] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations Vlastimil Babka
2016-07-18 11:23 ` [PATCH 7/8] mm, compaction: introduce direct compaction priority Vlastimil Babka
2016-07-18 11:23 ` [PATCH 8/8] mm, compaction: simplify contended compaction handling Vlastimil Babka
2016-07-18 11:30 ` [PATCH 0/8] compaction-related cleanups v4 Michal Hocko
2016-07-18 15:41 ` Mel Gorman
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=alpine.DEB.2.10.1607201459170.29381@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=riel@redhat.com \
--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