Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1952690rwb; Fri, 2 Dec 2022 03:33:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/vvd4IgWbGpqTp20ZMlN6qLoI4IPp3zuWY0yZyZTogTT256ocpSESochCIsOuyOxtfasX X-Received: by 2002:a17:906:5dd2:b0:7c0:af0b:b3a2 with SMTP id p18-20020a1709065dd200b007c0af0bb3a2mr997981ejv.654.1669980808115; Fri, 02 Dec 2022 03:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669980808; cv=none; d=google.com; s=arc-20160816; b=Ws5zFKsBlLJjxYtuNs7j2zh3KuZnK5XJZgax3h3X9mqOk3sD6SHkf1PZ8tX1ureCdc TufVjGS0OYpTMWuaH+yn4PvFaDS1td6Zh6VCQZxFrYlQzdlrcAYjRSMsxFdwJLQnUP3l SFGisHwXwsDg6jZf+FOGswIvb7Vuy4mf2WqEbKVyZqlyhDzeR2m+0rCZOGrbKSpEBWUn qHxQwa39N62gjzt/BgwNGBqkZv9GPNSAUA0PMAUjJe0U7pHGkNwRuqCZD4uYb4oW1s6d QGSAn3b5JGvZEcuQ3Z5b/eXTSzEMsa9tLxjPyOba9aJ2a3aFeNeWvSxusnFfD8ISGJzI Wt6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=kUQrge8plg+w3veFNfesME539B6kRsAYWeeTF/4ow6U=; b=HDJCTn/sNbYd2g82OQGh/w/mwIfFsk30gp+z2I1zCWpcIu/s/+a8m1la+LQAaOedU8 LL3wrVawwb++nHpPjhsiC9ZHPpgHaRcwZSckYWwf5YTnQtP4oIFkQifv4Rah4EWAfqTy GPeE4m5Jr9ySmr6bXxCVLhEn/z6azo7YHGX9g/k/voI5oOp1dTHLVcO6wa+3FjshkiTd fGyQwJSXDqzb3ef0CzASrHnq7uqiR+IkNuakKYPmu9kuS+kYoiGuDlxT7IaWWN1e4JMB qJ3nnkNFd5Dxe7NMMhn2svs3II4nfPYpZ7bXVIFiP//oeVnWR8rpI6AU6UCduW2jlk27 Of0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gIbaXxqb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr16-20020a170906d55000b00730aa841c5bsi6664627ejc.964.2022.12.02.03.33.07; Fri, 02 Dec 2022 03:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gIbaXxqb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233210AbiLBLVi (ORCPT + 83 others); Fri, 2 Dec 2022 06:21:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233173AbiLBLVT (ORCPT ); Fri, 2 Dec 2022 06:21:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58558D3A11; Fri, 2 Dec 2022 03:21:10 -0800 (PST) Date: Fri, 2 Dec 2022 12:21:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669980067; 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: in-reply-to:in-reply-to:references:references; bh=kUQrge8plg+w3veFNfesME539B6kRsAYWeeTF/4ow6U=; b=gIbaXxqbfa/DKrpVLcquPWnUONxpPCPbMltn7ZiMsVmSPV0+jWRUGxk0r/LU4lzIHG0TaN nGB3RhNeKb17G6Yu/pPNjR0qBRcaHb9V+89fHomimz2f2NAuTHtcoh4oSqsdWR+vRe6SX0 JSAjsLETamPvn6rpLkRZA935cqn1J9B348CYpP695I9jWzonoUHhrr7ljCu+M2U3b1kKD8 t55pgi7fuwqpdjtLd+oI4zTvIg2omxBCpq30ixQ8Db5cWtemBUL2e6Mymbj83Ym9VPjY7m TyXOHapCF/kTE8CrR6SvpwOvYJJus99o1I8lLjgKZ0NKQfrueqE5T7bQYkh30Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669980067; 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: in-reply-to:in-reply-to:references:references; bh=kUQrge8plg+w3veFNfesME539B6kRsAYWeeTF/4ow6U=; b=IFM03siZCUBxNyT1YdfePX74U+EaISXE6cDPra5trFsblD1y74xAxrC3uDDVD5+4iS44mR EKtvSGfPQ4eVoIAg== From: Sebastian Andrzej Siewior To: Mel Gorman Cc: Peter Zijlstra , Jan Kara , Thomas Gleixner , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Pierre Gondois , Steven Rostedt , Catalin Marinas , LKML , Linux-RT Subject: Re: [PATCH] rtmutex: Add acquire semantics for rtmutex lock acquisition Message-ID: References: <20221202100223.6mevpbl7i6x5udfd@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221202100223.6mevpbl7i6x5udfd@techsingularity.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-12-02 10:02:23 [+0000], Mel Gorman wrote: > The lock owner is updated with an IRQ-safe raw spinlock held but the > spin_unlock does not provide acquire semantics which are needed when > acquiring a mutex. This patch adds the necessary acquire semantics for a > lock operation when the lock owner is updated. It successfully completed > 10 iterations of the dbench workload while the vanilla kernel fails on > the first iteration. I *think* it is Fixes: 700318d1d7b38 ("locking/rtmutex: Use acquire/release semantics") Before that, it did cmpxchg() which should be fine. Regarding mark_rt_mutex_waiters(). Isn't acquire semantic required in order for the lock-owner not perform the fastpath but go to the slowpath instead? Sebastian