From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753378AbbIPJHS (ORCPT ); Wed, 16 Sep 2015 05:07:18 -0400 Received: from casper.infradead.org ([85.118.1.10]:50512 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbbIPJHP (ORCPT ); Wed, 16 Sep 2015 05:07:15 -0400 Date: Wed, 16 Sep 2015 11:01:52 +0200 From: Peter Zijlstra To: Davidlohr Bueso Cc: Ingo Molnar , Thomas Gleixner , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH -tip 2/3] sched/wake_q: Relax to acquire semantics Message-ID: <20150916090152.GB3816@twins.programming.kicks-ass.net> References: <1442216244-4409-1-git-send-email-dave@stgolabs.net> <1442216244-4409-2-git-send-email-dave@stgolabs.net> <20150914123241.GR18489@twins.programming.kicks-ass.net> <20150914210806.GG19736@linux-q0g1.site> <20150915094949.GA16853@twins.programming.kicks-ass.net> <20150915095512.GA18673@twins.programming.kicks-ass.net> <20150915194945.GI19736@linux-q0g1.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150915194945.GI19736@linux-q0g1.site> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2015 at 12:49:46PM -0700, Davidlohr Bueso wrote: > On Tue, 15 Sep 2015, Peter Zijlstra wrote: > > >>Secondly, the wake queues are not concurrent, they're in context, so I > >>don't see ordering matter at all. The only reason its a cmpxchg() is > >>because there is the (small) possibility of two contexts wanting to wake > >>the same task, and we use task_struct storage for the queue. > > > >I don't think we need _any_ barriers here, unless we have concurrent > >users of the wake queues (or want to allow any, do we?). > > Exactly, the queues are not concurent and do not need barriers, but some of > our callers do expect them. Ah, that is what you were saying. In that case, I think we should remove all our barriers and make them explicit in the callers where needed.