[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170106094112.6aae3e5f@gandalf.local.home>
Date: Fri, 6 Jan 2017 09:41:12 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Dirk Hohndel <dirkhh@...are.com>,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: mm, page_alloc: Swap likely to unlikely as code logic is
different for next_zones_zonelist()
On Fri, 6 Jan 2017 09:00:23 +0100
Vlastimil Babka <vbabka@...e.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@...dmis.org>
>
> Anyway this makes sense.
>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
Thanks!
-- Steve
Powered by blists - more mailing lists