Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1445406
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/8] mm, page_alloc: don't retry initial attempt in slowpath |
| Date | 2016-07-18 13:40 +0200 |
| Message-ID | <rWf3X-5yU-3@gated-at.bofh.it> (permalink) |
| References | <rWeUh-5vO-7@gated-at.bofh.it> <rWeUh-5vO-17@gated-at.bofh.it> <rWeUi-5vO-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/18/2016 01:29 PM, Michal Hocko wrote: > On Mon 18-07-16 13:22:57, Vlastimil Babka wrote: >> After __alloc_pages_slowpath() sets up new alloc_flags and wakes up kswapd, it >> first tries get_page_from_freelist() with the new alloc_flags, as it may >> succeed e.g. due to using min watermark instead of low watermark. It makes >> sense to to do this attempt before adjusting zonelist based on >> alloc_flags/gfp_mask, as it's still relatively a fast path if we just wake up >> kswapd and successfully allocate. >> >> This patch therefore moves the initial attempt above the retry label and >> reorganizes a bit the part below the retry label. We still have to attempt >> get_page_from_freelist() on each retry, as some allocations cannot do that >> as part of direct reclaim or compaction, and yet are not allowed to fail >> (even though they do a WARN_ON_ONCE() and thus should not exist). We can reuse >> the call meant for ALLOC_NO_WATERMARKS attempt and just set alloc_flags to >> ALLOC_NO_WATERMARKS if the context allows it. As a side-effect, the attempts >> from direct reclaim/compaction will also no longer obey watermarks once this >> is set, but there's little harm in that. >> >> Kswapd wakeups are also done on each retry to be safe from potential races >> resulting in kswapd going to sleep while a process (that may not be able to >> reclaim by itself) is still looping. >> >> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> > > Same here, my ack still holds > Acked-by: Michal Hocko <mhocko@suse.com> Sorry, forgot to add them before sending. Thanks for both!
Back to linux.kernel | Previous | Next — Previous in thread | Next 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