linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] mm, page_alloc: convert page_group_by_mobility_disable to static key
Date: Thu, 29 Dec 2016 11:08:15 -0500	[thread overview]
Message-ID: <1483027695.11006.97.camel@redhat.com> (raw)
In-Reply-To: <20161220134312.17332-1-vbabka@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

On Tue, 2016-12-20 at 14:43 +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: Rik van Riel <riel@redhat.com>

-- 
All Rights Reversed.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2016-12-29 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 13:43 [PATCH] mm, page_alloc: convert page_group_by_mobility_disable to static key Vlastimil Babka
2016-12-29 12:00 ` Mel Gorman
2016-12-29 16:08 ` Rik van Riel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483027695.11006.97.camel@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=peterz@infradead.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).