From patchwork Tue Mar 9 08:42:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 397180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B5F5C4332B for ; Tue, 9 Mar 2021 08:46:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C5816525F for ; Tue, 9 Mar 2021 08:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbhCIIph (ORCPT ); Tue, 9 Mar 2021 03:45:37 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:51208 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbhCIIpb (ORCPT ); Tue, 9 Mar 2021 03:45:31 -0500 Message-Id: <20210309084241.249343366@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1615279530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=iaFdsa84zN1qKIHuuoUkYKtunZ9pM939i3ed8fPSgwU=; b=XEwGzZxDVBQvC/wL/umlG31QWnGTA4V4F7MELMLkdc2BEOXbsPQiX54Yo5seMvS2UQuP8F SDFc4SgeP/nMsMdcJ0f4NRHQ/9hB1pSHJnZ22vjWsEjzSWlC0/gL8Rr2ym/gbjPZ8oV9SN aP8oIsFhSXCykPH7L55q6Tr4q0VKdBC/l4MgsgP6GfYww4fH8mwy8vwNOa8v4Z57jRRvst TgLiY5648U20sA/G2nYT4g8iS5boWxmSTIOngWmyVdTnVXGPLdxvRihnqDf5xBn4Oz4y9O oD1rA260a2xBR6b4fxtY/pCBz3lrsJ2AShrkfAeMGQbbnGQDGvnDcV4PeHjgKA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1615279530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=iaFdsa84zN1qKIHuuoUkYKtunZ9pM939i3ed8fPSgwU=; b=QL0dsDLrkyTWJDcn0Idnv3OmGjEQ7hA+fk8LpQLouQYHWEgKPIPI+KlQQIlr/ePLYzBWCL zExxvmYMEMPT7kAA== Date: Tue, 09 Mar 2021 09:42:04 +0100 From: Thomas Gleixner To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , "Ahmed S. Darwish" , Peter Zijlstra , Denis Kirjanov , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, ath9k-devel@qca.qualcomm.com, Kalle Valo , linux-wireless@vger.kernel.org, Chas Williams <3chas3@gmail.com>, linux-atm-general@lists.sourceforge.net, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Stefan Richter , linux1394-devel@lists.sourceforge.net Subject: [patch 01/14] tasklets: Replace barrier() with cpu_relax() in tasklet_unlock_wait() References: <20210309084203.995862150@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org A barrier() in a tight loop which waits for something to happen on a remote CPU is a pointless exercise. Replace it with cpu_relax() which allows HT siblings to make progress. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior --- include/linux/interrupt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -672,7 +672,8 @@ static inline void tasklet_unlock(struct static inline void tasklet_unlock_wait(struct tasklet_struct *t) { - while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { barrier(); } + while (test_bit(TASKLET_STATE_RUN, &t->state)) + cpu_relax(); } #else #define tasklet_trylock(t) 1