Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559510

Re: [PATCH] mm, page_alloc: don't check cpuset allowed twice in fast-path

From Anshuman Khandual <khandual@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, page_alloc: don't check cpuset allowed twice in fast-path
Date 2017-01-16 09:20 +0100
Message-ID <t0aGd-5VO-5@gated-at.bofh.it> (permalink)
References <sWxUJ-7lA-1@gated-at.bofh.it> <sWAfU-w2-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/06/2017 04:10 PM, Michal Hocko wrote:
> On Fri 06-01-17 09:18:05, Vlastimil Babka wrote:
>> Since commit 682a3385e773 ("mm, page_alloc: inline the fast path of the
>> zonelist iterator") we replace a NULL nodemask with cpuset_current_mems_allowed
>> in the fast path, so that get_page_from_freelist() filters nodes allowed by the
>> cpuset via for_next_zone_zonelist_nodemask(). In that case it's pointless to
>> also check __cpuset_zone_allowed(), which we can avoid by not using
>> ALLOC_CPUSET in that scenario.
> 
> OK, this seems to be really worth it as most allocations go via
> __alloc_pages so we can save __cpuset_zone_allowed in the fast path.
> 
> I was about to object how fragile this might be wrt. other ALLOC_CPUSET
> checks but then I've realized this is only for the hotpath as the
> slowpath goes through gfp_to_alloc_flags() which sets it back on.
> 
> Maybe all that could be added to the changelog?

Agreed, all these should be added into the change log as the effect
of cpuset based nodemask during fast path and slow path is little
bit confusing.

>  
>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> 
> Acked-by: Michal Hocko <mhocko@suse.com>

Reviewed-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] mm, page_alloc: don't check cpuset allowed twice in fast-path Vlastimil Babka <vbabka@suse.cz> - 2017-01-06 09:20 +0100
  Re: [PATCH] mm, page_alloc: don't check cpuset allowed twice in  fast-path Michal Hocko <mhocko@kernel.org> - 2017-01-06 11:50 +0100
    Re: [PATCH] mm, page_alloc: don't check cpuset allowed twice in  fast-path Vlastimil Babka <vbabka@suse.cz> - 2017-01-06 11:50 +0100
    Re: [PATCH] mm, page_alloc: don't check cpuset allowed twice in  fast-path Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-16 09:20 +0100

csiph-web