From patchwork Fri Nov 13 14:02:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 1399833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=nvpB/5/8; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=QExJdAkf; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=ZH/Vk7tQ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CXgnh0s3Wz9sTR for ; Sat, 14 Nov 2020 01:28:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Subject:To:From:Date: Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=BnZSPtbEnBGCz4/wFhNjkm9/V7n9eOvlYf2eiCCHAeo=; b=nvpB/5/8vZ98SPaTUbN34F/+9 piYzawEX9RyBlKmuvWnkPPCOHrnyWvJRgn8uzDfF3JuhvuvKdq8eS+vkEEDDkV1UmOAuA+hLplWfB hFjnj1PRPoCHIiJeceeRyEZDyDbu8vW4Xi2NnrknJQ0hPLQJmKTi+aRKpg2gt1kHRiyCNY0/w0xV2 Ctu6w+FaowSzlHXXR99UMJSucxdj0+mhTeiXt5M4SSBCxkUI83MnkNw1ITreNp1QMJjcCZn3bmOIj oV+hbYVxCVJGUczMYb0BDU5aEx0z5iIdghLjyAM5H47R1eg3bF4lWHvIT913MXrssakfnf8LwkYQd 69xbxK8Uw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kda4H-0000DF-OU; Fri, 13 Nov 2020 14:28:49 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kda0C-0006Oa-EZ; Fri, 13 Nov 2020 14:24:45 +0000 Message-Id: <20201113141734.660734753@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1605277475; 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=74sFpsXIvDvQMapG5Pk7sHOAlnsFK2WUN0Z1OZznnHw=; b=QExJdAkfPvDBwGkQeFoFlNrm4JXX8p/fB5MMB0uuiSdagTfMsaVZdXy9G9GBW/pJGeMMhF v2D/rBvzOwa2UI3CLJLGXLp9JbHgnTpigxMvChKOaxUXPDJjvXKV29RXNoCJIM02ssvFoi fAJSXNYmXPoUeZuLpHQOomjC1BPe/vo61ydVsoo44kvswfSQrHrQmBcsQcqiTK7Ntdx/Py xO9hHJhmudd3p/qulzbc5q7cT/UiquVfGqe3gjkh05B6zglrlDkMWKu7yjfwROgKAs1IpI nuG8KFPBmSSMRxwWYbHo6AVIPTGAZ3rfXubf5JvX0QsRdE7Y3QWJo63Q754Rlw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1605277475; 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=74sFpsXIvDvQMapG5Pk7sHOAlnsFK2WUN0Z1OZznnHw=; b=ZH/Vk7tQMxbpxGEvsAm2QgjQRjaIccewrZgX7RMwhumzkvb9r1Yzrpuqulq+HX3l7OQ5+E wyyqEioCc993+MDA== Date: Fri, 13 Nov 2020 15:02:24 +0100 From: Thomas Gleixner To: LKML Subject: [patch 17/19] softirq: Replace barrier() with cpu_relax() in tasklet_unlock_wait() References: <20201113140207.499353218@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_092436_810334_32BF988F X-CRM114-Status: GOOD ( 10.64 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [193.142.43.55 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Rich Felker , Catalin Marinas , Paul McKenney , Arnd Bergmann , linux-sh@vger.kernel.org, Peter Zijlstra , Richard Weinberger , Frederic Weisbecker , Valentin Schneider , Jeff Dike , Russell King , Yoshinori Sato , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Helge Deller , linux-um@lists.infradead.org, Will Deacon , Sebastian Andrzej Siewior , linux-arm-kernel@lists.infradead.org, Anton Ivanov Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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 --- include/linux/interrupt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -668,7 +668,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