From: Steven Rostedt <rostedt@goodmis.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Dirk Hohndel <dirkhh@vmware.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: mm, page_alloc: Swap likely to unlikely as code logic is different for next_zones_zonelist()
Date: Fri, 6 Jan 2017 09:41:12 -0500 [thread overview]
Message-ID: <20170106094112.6aae3e5f@gandalf.local.home> (raw)
In-Reply-To: <4414cca4-1a09-ebda-c92b-fa98df1c8e31@suse.cz>
On Fri, 6 Jan 2017 09:00:23 +0100
Vlastimil Babka <vbabka@suse.cz> wrote:
> On 01/06/2017 02:01 AM, Steven Rostedt wrote:
> > Commit 682a3385e773 "mm, page_alloc: inline the fast path of the
> > zonelist iterator" changed how next_zones_zonelist() is called, by
> > adding a static inline function to do the fast path. This function adds:
> >
> > if (likely(!nodes && zonelist_zone_idx(z) <= highest_zoneidx))
>
> Your profiling stats posted online suggested even this one was wrong:
>
> function.file.line correct incorrect percent
> next_zones_zonelist.mmzone.h.965 216840653 25415261543 %0.85
>
> Was it bogus then, or is there other explanation? I have speculated that
> this might be due to multiple cpusets configured in the system.
I didn't have any cpusets configured on either system.
But the number is exaggerated, as it too was affected by the "constant"
optimization by gcc. But when I fixed that, it still gives me about
50%. Probably best just to remove the likely() in that case.
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Anyway this makes sense.
>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Thanks!
-- Steve
next prev parent reply other threads:[~2017-01-06 14:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 1:01 mm, page_alloc: Swap likely to unlikely as code logic is different for next_zones_zonelist() Steven Rostedt
2017-01-06 8:00 ` Vlastimil Babka
2017-01-06 14:41 ` Steven Rostedt [this message]
2017-01-06 10:16 ` Mel Gorman
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=20170106094112.6aae3e5f@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=brouer@redhat.com \
--cc=dirkhh@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=torvalds@linux-foundation.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).