From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933174AbbCQQhq (ORCPT ); Tue, 17 Mar 2015 12:37:46 -0400 Received: from mail.efficios.com ([78.47.125.74]:33782 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933105AbbCQQg1 (ORCPT ); Tue, 17 Mar 2015 12:36:27 -0400 Date: Tue, 17 Mar 2015 16:36:27 +0000 (UTC) From: Mathieu Desnoyers To: "Paul E. McKenney" Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, KOSAKI Motohiro , Steven Rostedt , Nicholas Miell , Linus Torvalds , Ingo Molnar , Alan Cox , Lai Jiangshan , Stephen Hemminger , Andrew Morton , Josh Triplett , Thomas Gleixner , David Howells Message-ID: <1311724860.20775.1426610187883.JavaMail.zimbra@efficios.com> In-Reply-To: <680573370.19261.1426598016060.JavaMail.zimbra@efficios.com> References: <1426447459-28620-1-git-send-email-mathieu.desnoyers@efficios.com> <1203077851.9491.1426520636551.JavaMail.zimbra@efficios.com> <20150316172104.GH21418@twins.programming.kicks-ass.net> <1003922584.10662.1426532015839.JavaMail.zimbra@efficios.com> <20150316205435.GJ21418@twins.programming.kicks-ass.net> <910572156.13900.1426556725438.JavaMail.zimbra@efficios.com> <20150317063059.GJ2896@worktop.programming.kicks-ass.net> <680573370.19261.1426598016060.JavaMail.zimbra@efficios.com> Subject: Re: [RFC PATCH] sys_membarrier(): system/process-wide memory barrier (x86) (v12) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [173.246.22.116] X-Mailer: Zimbra 8.0.7_GA_6021 (ZimbraWebClient - FF36 (Linux)/8.0.7_GA_6021) Thread-Topic: sys_membarrier(): system/process-wide memory barrier (x86) (v12) Thread-Index: PHgziFm/F9pajjU7lvXLq1bP9RJcgEVe1j/+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Tue, Mar 17, 2015 at 01:45:25AM +0000, Mathieu Desnoyers wrote: [...] > > > > > Would you see it as acceptable if we start by implementing > > > only the non-expedited sys_membarrier() ? > > > > Sure. > > > > > Then we can add > > > the expedited-private implementation after rq->curr becomes > > > available through RCU. > > > > Yeah, or not at all; I'm still trying to get Paul to remove the > > expedited nonsense from the kernel RCU bits; and now you want it in > > userspace too :/ > > The non-expedited case makes sense when we batch RCU work > with call_rcu. However, some users require to use synchronize_rcu() > directly after modifying their data structure. Therefore, the > latency associated with sys_membarrier() then becomes important, > hence the interest for an expedited scheme. > > I agree that we should try to find a way to implement it with > low disturbance on the CPU's rq locks. I'd be certainly > OK with starting with just the non-expedited scheme, and add > the expedited scheme later on. This is why we have the flags > anyway. Paul, I'm currently reworking the patch to keep only the non-expedited scheme. I don't need to touch the scheduler internals anymore, so should I move the sys_membarrier system call implementation into kernel/rcu/update.c ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com