[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161229120013.lscts45z6yec2ecg@techsingularity.net>
Date: Thu, 29 Dec 2016 12:00:13 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Joonsoo Kim <iamjoonsoo.kim@....com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Johannes Weiner <hannes@...xchg.org>,
Rik van Riel <riel@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable
to static key
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@...e.cz>
Acked-by: Mel Gorman <mgorman@...hsingularity.net>
--
Mel Gorman
SUSE Labs
Powered by blists - more mailing lists