From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbdAFOmx (ORCPT ); Fri, 6 Jan 2017 09:42:53 -0500 Received: from smtprelay0020.hostedemail.com ([216.40.44.20]:59409 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752773AbdAFOlj (ORCPT ); Fri, 6 Jan 2017 09:41:39 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2553:2559:2562:2741:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:4362:4605:5007:6261:7875:7903:9040:9108:10004:10400:10848:10967:11026:11232:11658:11914:12043:12114:12555:12740:12760:12895:12986:13069:13255:13311:13357:13439:14096:14097:14181:14659:14721:14773:21080:21451:30012:30034:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: lead67_620d7ba94dd03 X-Filterd-Recvd-Size: 2329 Date: Fri, 6 Jan 2017 09:41:12 -0500 From: Steven Rostedt To: Vlastimil Babka Cc: LKML , Mel Gorman , Andrew Morton , Linus Torvalds , Dirk Hohndel , Jesper Dangaard Brouer Subject: Re: mm, page_alloc: Swap likely to unlikely as code logic is different for next_zones_zonelist() Message-ID: <20170106094112.6aae3e5f@gandalf.local.home> In-Reply-To: <4414cca4-1a09-ebda-c92b-fa98df1c8e31@suse.cz> References: <20170105200102.77989567@gandalf.local.home> <4414cca4-1a09-ebda-c92b-fa98df1c8e31@suse.cz> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jan 2017 09:00:23 +0100 Vlastimil Babka 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) > > Anyway this makes sense. > > Acked-by: Vlastimil Babka Thanks! -- Steve