From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935571AbdACQmI (ORCPT ); Tue, 3 Jan 2017 11:42:08 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:50825 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759680AbdACQlZ (ORCPT ); Tue, 3 Jan 2017 11:41:25 -0500 Date: Tue, 3 Jan 2017 17:18:36 +0100 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Pan Xinhui , Boqun Feng Subject: Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs Message-ID: <20170103161836.GY3107@twins.programming.kicks-ass.net> References: <1482697561-23848-1-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482697561-23848-1-git-send-email-longman@redhat.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 Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > relaxed versions to improve performance on architectures that use LL/SC. Claim without numbers ;-) > > All the locking related cmpxchg's are replaced with the _acquire > variants: > - pv_queued_spin_steal_lock() > - trylock_clear_pending() So these seem to make sense in that they're in 'fast' paths.. > The cmpxchg's related to hashing are replaced by either by the _release > or the _relaxed variants. See the inline comment for details. But these not so much, we're going to put the vcpu to sleep, why does it make sense to 'optimize' the wait/kick stuff?