Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447505
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath |
| Date | 2016-07-21 00:10 +0200 |
| Message-ID | <rX7QK-7ew-9@gated-at.bofh.it> (permalink) |
| References | <rWeUh-5vO-7@gated-at.bofh.it> <rWeUh-5vO-17@gated-at.bofh.it> <rWLQe-1rn-21@gated-at.bofh.it> <rX1BD-39C-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath Vlastimil Babka <vbabka@suse.cz> - 2016-07-18 13:30 +0200
Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath Michal Hocko <mhocko@kernel.org> - 2016-07-18 13:30 +0200
Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath Vlastimil Babka <vbabka@suse.cz> - 2016-07-18 13:40 +0200
Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath David Rientjes <rientjes@google.com> - 2016-07-20 00:40 +0200
Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath Vlastimil Babka <vbabka@suse.cz> - 2016-07-20 17:30 +0200
Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath David Rientjes <rientjes@google.com> - 2016-07-21 00:10 +0200
csiph-web