Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2158531pxt; Sun, 8 Aug 2021 13:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKJ8gDGGSX111kQ7Xeh+km/FiRVEBTymSlPzMd+bOyme9Z83rySM+M+HNBDxk4OIOH6ATW X-Received: by 2002:a05:6402:514e:: with SMTP id n14mr25830798edd.129.1628455433671; Sun, 08 Aug 2021 13:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628455433; cv=none; d=google.com; s=arc-20160816; b=lLwPbPHA5M+nP94HqcU7TPQFIU0Wuge9l+cq7ovhPcCXnIhfiOx0W6rXddMYdCIt7T 68TOPicw/UHu0NNOsd147odwY8E0zrg4+vem660KQG9+V8IududDoD4QKmfQxkEKv7NK A8wcNsqyN0hzyAot+p89fHyuq8E5Xa4cxJwBi6q4xVUnpxRTnbw43SE7R1VmYmA3vV/2 OhgT8R+On9RnHyjwFt5aqjabXfW1f8YKEDlv/QFV8PkFl2KJIYlkwm9E9Phdp2CaxCLb Pqd8i2EveaejzztL1t54XxR26XbP1+0uTvz5Mkdw3OIMF/pEoewlx/CeV2F1yCAZeqcx NRhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DRKJs5e4BYOYMdY77tKu6RAAP9AxQAaOQxQb0LXF7a0=; b=ifP345dNXfkEKSIBXDCJFlL5uBW/asbanTqXHc8cHp43w8D9bORtCM9QEfMQZ4jGBK e0vs7UFccYumYosPPLYo72nr8guJrSuhqk4zDCJrGx2mJSJxMrMC5ucqoEkvXHec2EMJ 9Aby/MpWENaXGZShc4EaTzKlqGxirrjQudWzFQ87GfhAkxVvmblZzPu3Pfn63Qr5CUyT IyIhWBN0BK/+pjdkBWv4gDTK0dZiSMYupWQMncUKU3GQf3i0VuYs+F9Vxjgc1xJRWATe flHbkXBvr/NBQ5vOy3rZXCAVuFyg3kXSLVLLnqIzByXnNLAyHh7JmSKZxPwbtxnLeiXX xx0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si14954246edt.377.2021.08.08.13.43.30; Sun, 08 Aug 2021 13:43:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231576AbhHHUlo (ORCPT + 99 others); Sun, 8 Aug 2021 16:41:44 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:53060 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbhHHUln (ORCPT ); Sun, 8 Aug 2021 16:41:43 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0E4CD1FD35; Sun, 8 Aug 2021 20:41:23 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3055A13310; Sun, 8 Aug 2021 20:41:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1BJPN29BEGH9NQAAMHmgww (envelope-from ); Sun, 08 Aug 2021 20:41:19 +0000 Date: Sun, 8 Aug 2021 13:41:16 -0700 From: Davidlohr Bueso To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Mike Galbraith Subject: Re: [patch V3 15/64] rtmutex: Provide rt_mutex_base_is_locked() Message-ID: <20210808204116.rckeqq7hu4ofbitg@offworld> References: <20210805151300.330412127@linutronix.de> <20210805153953.683678014@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210805153953.683678014@linutronix.de> User-Agent: NeoMutt/20201120 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >+/** >+ * rt_mutex_base_is_locked - is the rtmutex locked >+ * @lock: the mutex to be queried >+ * >+ * Returns true if the mutex is locked, false if unlocked. >+ */ >+static inline bool rt_mutex_base_is_locked(struct rt_mutex_base *lock) >+{ >+ return lock->owner != NULL; Does this want to be READ_ONCE()? While not a big deal because it's ultimately only used by drm debugging, I don't see any harm in avoiding potential tearing. Thanks, Davidlohr