From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755832AbcIFLtn (ORCPT ); Tue, 6 Sep 2016 07:49:43 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36382 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753617AbcIFLtk (ORCPT ); Tue, 6 Sep 2016 07:49:40 -0400 Date: Tue, 6 Sep 2016 13:49:37 +0200 From: Peter Zijlstra To: Felipe Balbi Cc: Alan Stern , "Paul E. McKenney" , Ingo Molnar , USB list , Kernel development list , Will Deacon Subject: Re: Memory barrier needed with wake_up_process()? Message-ID: <20160906114937.GM10153@twins.programming.kicks-ass.net> References: <20160905083334.GX10153@twins.programming.kicks-ass.net> <20160906113605.GL10153@twins.programming.kicks-ass.net> <87a8flmexg.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a8flmexg.fsf@linux.intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2016 at 02:43:39PM +0300, Felipe Balbi wrote: > > Could you confirm that bulk_{in,out}_complete() work on different > > usb_request structures, and they can not, at any time, get called on the > > _same_ request? > > usb_requests are allocated for a specific endpoint and USB Device > Controller (UDC) drivers refuse to queue requests allocated for epX to > epY, so this really can never happen. Good, thanks! > My fear now, however, is that changing smp_[rw]mb() to smp_mb() just > adds extra overhead which makes the problem much, much less likely to > happen. Does that sound plausible to you? I did consider that, but I've not sufficiently grokked the code to rule out actual fail. So let me stare at this a bit more.