From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH] memcg: remove unneeded preempt_disable Date: Fri, 26 Aug 2011 01:01:37 +0200 Message-ID: <1314313297.26922.17.camel@twins> References: <1313650253-21794-1-git-send-email-gthelen@google.com> <20110818144025.8e122a67.akpm@linux-foundation.org> <1314284272.27911.32.camel@twins> <1314289208.3268.4.camel@mulgrave> <986ca4ed-6810-426f-b32f-5c8687e3a10b@email.android.com> <1e295500-5d1f-45dd-aa5b-3d2da2cf1a62@email.android.com> <1314300546.3268.8.camel@mulgrave> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1314300546.3268.8.camel@mulgrave> Sender: owner-linux-mm@kvack.org To: James Bottomley Cc: Christoph Lameter , Andrew Morton , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, KAMEZAWA Hiroyuki , Balbir Singh , Daisuke Nishimura , linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Thu, 2011-08-25 at 12:29 -0700, James Bottomley wrote: >=20 > Therefore from the risc point of view, most of the this_cpu_xxx > operations are things that we don't really care about except that the > result would be easier to read in C.=20 Right, so the current fallback case is pretty much the optimal case for the RISC machines, which ends up with generic code being better off not using it much and instead preferring __this_cpu if there's more than one. I mean, its absolutely awesome these things are 1 instruction on x86, but if we pessimize all other 20-odd architectures its just not cool. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from merlin.infradead.org ([205.233.59.134]:40889 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612Ab1HYXB4 convert rfc822-to-8bit (ORCPT ); Thu, 25 Aug 2011 19:01:56 -0400 Subject: Re: [PATCH] memcg: remove unneeded preempt_disable From: Peter Zijlstra Date: Fri, 26 Aug 2011 01:01:37 +0200 In-Reply-To: <1314300546.3268.8.camel@mulgrave> References: <1313650253-21794-1-git-send-email-gthelen@google.com> <20110818144025.8e122a67.akpm@linux-foundation.org> <1314284272.27911.32.camel@twins> <1314289208.3268.4.camel@mulgrave> <986ca4ed-6810-426f-b32f-5c8687e3a10b@email.android.com> <1e295500-5d1f-45dd-aa5b-3d2da2cf1a62@email.android.com> <1314300546.3268.8.camel@mulgrave> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Message-ID: <1314313297.26922.17.camel@twins> Mime-Version: 1.0 Sender: linux-arch-owner@vger.kernel.org List-ID: To: James Bottomley Cc: Christoph Lameter , Andrew Morton , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, KAMEZAWA Hiroyuki , Balbir Singh , Daisuke Nishimura , linux-arch@vger.kernel.org Message-ID: <20110825230137.skq5bkOGnzYkhvNCDX0eSpjNn1RH_g2_RuSWA_hXnX8@z> On Thu, 2011-08-25 at 12:29 -0700, James Bottomley wrote: > > Therefore from the risc point of view, most of the this_cpu_xxx > operations are things that we don't really care about except that the > result would be easier to read in C. Right, so the current fallback case is pretty much the optimal case for the RISC machines, which ends up with generic code being better off not using it much and instead preferring __this_cpu if there's more than one. I mean, its absolutely awesome these things are 1 instruction on x86, but if we pessimize all other 20-odd architectures its just not cool.