From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932946Ab1IBA5h (ORCPT ); Thu, 1 Sep 2011 20:57:37 -0400 Received: from claw.goop.org ([74.207.240.146]:43194 "EHLO claw.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932860Ab1IBAz3 (ORCPT ); Thu, 1 Sep 2011 20:55:29 -0400 From: Jeremy Fitzhardinge To: "H. Peter Anvin" Cc: Linus Torvalds , Peter Zijlstra , Ingo Molnar , the arch/x86 maintainers , Linux Kernel Mailing List , Nick Piggin , Avi Kivity , Marcelo Tosatti , KVM , Andi Kleen , Xen Devel , Jeremy Fitzhardinge Subject: [PATCH 09/13] x86/pvticketlocks: we only need to kick if there's waiters Date: Thu, 1 Sep 2011 17:55:02 -0700 Message-Id: X-Mailer: git-send-email 1.7.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Fitzhardinge If we're releasing the lock into an uncontended state, there's nobody waiting on it, so there's no need to kick anyone. Signed-off-by: Jeremy Fitzhardinge --- arch/x86/kernel/paravirt-spinlocks.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/paravirt-spinlocks.c b/arch/x86/kernel/paravirt-spinlocks.c index 21b6986..71b8557 100644 --- a/arch/x86/kernel/paravirt-spinlocks.c +++ b/arch/x86/kernel/paravirt-spinlocks.c @@ -47,8 +47,7 @@ void __ticket_unlock_release_slowpath(struct arch_spinlock *lock) old.head_tail, new.head_tail) != old.head_tail) { /* still people waiting */ __ticket_unlock_release(lock); + __ticket_unlock_kick(lock, new.tickets.head); } - - __ticket_unlock_kick(lock, new.tickets.head); } EXPORT_SYMBOL(__ticket_unlock_release_slowpath); -- 1.7.6