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


Groups > linux.kernel > #1548296

Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable to static key

From Mel Gorman <mgorman@techsingularity.net>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable to static key
Date 2016-12-29 13:10 +0100
Message-ID <sTHGW-6pF-29@gated-at.bofh.it> (permalink)
References <sQsXL-6e4-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 20, 2016 at 02:43:12PM +0100, Vlastimil Babka wrote:
> The flag is rarely enabled or even changed, so it's an ideal static key
> candidate. Since it's being checked in the page allocator fastpath via
> gfpflags_to_migratetype(), it may actually save some valuable cycles.
> 
> Here's a diff excerpt from __alloc_pages_nodemask() assembly:
> 
>         -movl    page_group_by_mobility_disabled(%rip), %ecx
> 	+.byte 0x0f,0x1f,0x44,0x00,0
>          movl    %r9d, %eax
>          shrl    $3, %eax
>          andl    $3, %eax
>         -testl   %ecx, %ecx
>         -movl    $0, %ecx
>         -cmovne  %ecx, %eax
> 
> I.e. a NOP instead of test, conditional move and some assisting moves.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs

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


Thread

[PATCH] mm, page_alloc: convert page_group_by_mobility_disable to static key Vlastimil Babka <vbabka@suse.cz> - 2016-12-20 14:50 +0100
  Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable  to static key Mel Gorman <mgorman@techsingularity.net> - 2016-12-29 13:10 +0100
  Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable  to static key Rik van Riel <riel@redhat.com> - 2016-12-29 17:10 +0100

csiph-web