From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752126AbbIOTtz (ORCPT ); Tue, 15 Sep 2015 15:49:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:46088 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbbIOTty (ORCPT ); Tue, 15 Sep 2015 15:49:54 -0400 Date: Tue, 15 Sep 2015 12:49:46 -0700 From: Davidlohr Bueso To: Peter Zijlstra 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: <20150915194945.GI19736@linux-q0g1.site> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20150915095512.GA18673@twins.programming.kicks-ass.net> 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, 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.