Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756603AbbESQU3 (ORCPT ); Tue, 19 May 2015 12:20:29 -0400 Received: from resqmta-ch2-10v.sys.comcast.net ([69.252.207.42]:36232 "EHLO resqmta-ch2-10v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbbESQUZ (ORCPT ); Tue, 19 May 2015 12:20:25 -0400 Date: Tue, 19 May 2015 11:20:23 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Steven Rostedt cc: Linus Torvalds , LKML , Ingo Molnar , Andrew Morton , stable , Uwe Kleine-Koenig Subject: Re: [GIT PULL] ring-buffer: Replace this_cpu_*() with __this_cpu_*() In-Reply-To: <20150519114201.39c19d61@gandalf.local.home> Message-ID: References: <20150319180216.62c9fa4a@gandalf.local.home> <20150319183444.3d26f078@grimm.local.home> <20150519114201.39c19d61@gandalf.local.home> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1405 Lines: 34 On Tue, 19 May 2015, Steven Rostedt wrote: > On Tue, 19 May 2015 10:35:32 -0500 (CDT) > Christoph Lameter wrote: > > > On Thu, 19 Mar 2015, Steven Rostedt wrote: > > > > > On Thu, 19 Mar 2015 15:16:25 -0700 > > > Linus Torvalds wrote: > > > > > > > So I don't think the ring-buffer change is necessarily _wrong_, but if > > > > this is a performance issue, why don't we just fix it up for the > > > > generic case rather than for just one user? > > > > > > I totally agree with your analysis, but it's up to Christoph to come up > > > with an answer to your questions. > > > > Something beyond: Do not use this_cpu_* when preemption is already > > off but use __this_cpu_*? > > I think the question was, why exactly does the generic this_cpu_read() > require disabling preemption? What breaks if it is not disabled? Ok I answered that before. There is a cache line population/eviction issue (because it may happen on the wrong cache) but basically I think its mostly there for symmetries sake. We could remove this_cpu_read/write and let __this_cpu_read()/__this_cpu_write be used in non preemptible contexts. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/