From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbcEWUlu (ORCPT ); Mon, 23 May 2016 16:41:50 -0400 Received: from g2t4619.austin.hp.com ([15.73.212.82]:36507 "EHLO g2t4619.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbcEWUl1 (ORCPT ); Mon, 23 May 2016 16:41:27 -0400 Message-ID: <1464036006.2479.35.camel@j-VirtualBox> Subject: Re: [PATCH] locking/mutex: Set and clear owner using WRITE_ONCE() From: Jason Low To: Davidlohr Bueso Cc: jason.low2@hp.com, Waiman Long , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Terry Rudd , Scott J Norton Date: Mon, 23 May 2016 13:40:06 -0700 In-Reply-To: <20160521010044.GC28231@linux-uzut.site> References: <1463696630.2587.95.camel@j-VirtualBox> <573F734C.7050708@hpe.com> <20160521010044.GC28231@linux-uzut.site> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-05-20 at 18:00 -0700, Davidlohr Bueso wrote: > On Fri, 20 May 2016, Waiman Long wrote: > > >I think mutex-debug.h also needs similar changes for completeness. > > Maybe, but given that with debug the wait_lock is unavoidable, doesn't > this send the wrong message? The mutex_set_owner() and mutex_clear_owner() can still get called in the fastpath without the wait_lock for the debug case too correct? If that's the case, then the WRITE_ONCE would still make sense to have in the debug case.