Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797AbcDNAV6 (ORCPT ); Wed, 13 Apr 2016 20:21:58 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50333 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbcDNAV5 (ORCPT ); Wed, 13 Apr 2016 20:21:57 -0400 Date: Thu, 14 Apr 2016 02:21:35 +0200 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Pan Xinhui , Scott J Norton , Douglas Hatch Subject: Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait() Message-ID: <20160414002135.GP2906@worktop> References: <1460581160-46187-1-git-send-email-Waiman.Long@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460581160-46187-1-git-send-email-Waiman.Long@hpe.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 16 On Wed, Apr 13, 2016 at 04:59:20PM -0400, Waiman Long wrote: > Pan Xinhui was asking for a lock holder cpu argument in pv_wait() > to help the porting of pvqspinlock to PPC. The new argument will can > potentially help hypervisor expediate the execution of the critical > section so that the lock holder vCPU can release the lock sooner. > > This patch does just that by storing the previous node vCPU number. > In pv_wait_head_or_lock(), pv_wait() will be called with that vCPU > number as it is likely to be the lock holder. In pv_wait_node(), > -1 will be passed to pv_wait() instead to indicate that it doesn't > know what the current lock holder is. Without knowing why he needs this, it is very hard to tell if this will suffice. Xinhui, what do you need the extra argument for?