From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756138AbbESQEN (ORCPT ); Tue, 19 May 2015 12:04:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54115 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752562AbbESQEJ (ORCPT ); Tue, 19 May 2015 12:04:09 -0400 Date: Tue, 19 May 2015 17:04:04 +0100 From: Mel Gorman To: Michal Hocko Cc: Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Tejun Heo , cgroups@vger.kernel.org Subject: Re: [PATCH] mm, memcg: Optionally disable memcg by default using Kconfig Message-ID: <20150519160404.GJ2462@suse.de> References: <20150519104057.GC2462@suse.de> <20150519141807.GA9788@cmpxchg.org> <20150519145340.GI6203@dhcp22.suse.cz> <20150519151302.GG2462@suse.de> <20150519152710.GK6203@dhcp22.suse.cz> <20150519154119.GI2462@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20150519154119.GI2462@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2015 at 04:41:19PM +0100, Mel Gorman wrote: > On Tue, May 19, 2015 at 05:27:10PM +0200, Michal Hocko wrote: > > On Tue 19-05-15 16:13:02, Mel Gorman wrote: > > [...] > > > :ffffffff811c160f: je ffffffff811c1630 > > > :ffffffff811c1611: xor %eax,%eax > > > :ffffffff811c1613: xor %ebx,%ebx > > > 1 1.7e-05 :ffffffff811c1615: mov %rbx,(%r12) > > > 7 1.2e-04 :ffffffff811c1619: add $0x10,%rsp > > > 1211 0.0203 :ffffffff811c161d: pop %rbx > > > 5 8.4e-05 :ffffffff811c161e: pop %r12 > > > 5 8.4e-05 :ffffffff811c1620: pop %r13 > > > 1249 0.0210 :ffffffff811c1622: pop %r14 > > > 7 1.2e-04 :ffffffff811c1624: pop %rbp > > > 5 8.4e-05 :ffffffff811c1625: retq > > > :ffffffff811c1626: nopw %cs:0x0(%rax,%rax,1) > > > 295 0.0050 :ffffffff811c1630: mov (%rdi),%rax > > > 160703 2.6973 :ffffffff811c1633: mov %edx,%r13d > > > > Huh, what? Even if this was off by one and the preceding instruction has > > consumed the time. This would be reading from page->flags but the page > > should be hot by the time we got here, no? > > > > I would have expected so but it's not the first time I've seen cases where > examining the flags was a costly instruction. I suspect it's due to an > ordering issue or more likely, a frequent branch mispredict that is being > accounted for against this instruction. > Which is plausible as forward branches are statically predicted false but in this particular load that could be a close to a 100% mispredict. -- Mel Gorman SUSE Labs