Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2477078rdb; Tue, 12 Sep 2023 03:12:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRMWKaiEFlRj2FRnuoqN2TOncER9LRWSSGDFHxit71NTzdbeyh1rMmU/mC7bLlLiB/4DU1 X-Received: by 2002:a05:6870:d202:b0:1ba:8307:9a13 with SMTP id g2-20020a056870d20200b001ba83079a13mr15784641oac.11.1694513570407; Tue, 12 Sep 2023 03:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694513570; cv=none; d=google.com; s=arc-20160816; b=LotgG1qYnqDoVftsMctjm6IKYgPhAtgFguwOU2V3wQD9sALDKnha1tZ6W6QfBbr0tQ E6SUH5qv4z8brTR0eH7lL7PvDZUGBolnpAsrHHySgED3BgPHrBQJbLfC44McfIxOShss W1tRFxf0CROlOg3bfO+9dAJDg3eQnsHIedMrYQuf1t+y8WafX/LNiiZPyG6gfLPhroad BbuWaBSE0d+qwxzl/SkIfqKQoH3rzwjIZAJQC9p+hVLBAAlAjIXsYujVgYUf9WhKuKfo qj2uKomleDnNoQ/TmCJpwEGe/9gHE1JxwIOKSB0thWBrxKpLzEOBiOryg7k+2YOz8RUU FSeQ== 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:date:dkim-signature; bh=OUN9qvOhvSclaajkaF7Yf2ZvZqXHPIr54l2XhmMy2iQ=; fh=g83eL8J6MtuWKYuSaSiwdZR8knCp/qajlhT8B3qLPyU=; b=ftWnNuYfWErmQCOnZl/D0Pp1j6W2qyPn0U8QTDxS7LJ0uXctypMJxuIqxUJoUHGtg4 FZueJzRYE/6O3QL4fo/+KCU5hfJEQ+2AK0+S4G6JIq5z7J1e2YedLwa7V530uQlGIC9J L4nXuQkQpqX0Qxf/OJMX1U5rXOyQ8sU1LOtHVU4CNvA/8mJYCUeGD0loWID31EvVqS3h Gmby4H3PpWIIhu2Teaeio3l0c3ReCsJHaPesb+hVep+bfLtWZku1lzGVF7q1mHzST9T0 19R2NtzCINO8aLCdCMNkWuPS6pUUlMrpv7LG9qqZlGRYZe2sMVj0n2qyCFWRYoyI8uJk DYhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=S5Uyc7to; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b9-20020a633409000000b00573fe49ad3esi7657624pga.672.2023.09.12.03.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 03:12:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=S5Uyc7to; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6C91F80E0A79; Tue, 12 Sep 2023 02:06:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232115AbjILJGd (ORCPT + 99 others); Tue, 12 Sep 2023 05:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233197AbjILJGA (ORCPT ); Tue, 12 Sep 2023 05:06:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3B742681; Tue, 12 Sep 2023 02:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OUN9qvOhvSclaajkaF7Yf2ZvZqXHPIr54l2XhmMy2iQ=; b=S5Uyc7toBN82oKnjq/FlDxHddn Rjo96XKH3esWhun3HPvT/LPYurgyYDtqSovgloklKRrD4xV/A6OSsQOpEmRQv+/Dc7Uxd6R2MsVph Tin0q0YT0h/IqrkCanL2ebgbXdndUBQ2vkkE0WDOIpl1K5K3z2CJpQGa9BXO12uItdSIpW9mHaNI6 a4MgvZCXPavoAIZvD4CaI3mYb9TLW8IWuySpqgUskFMexlLLkjPBFbzqAUiAHFuvvbvm3Wo3kJR/K IDMyk/bIDSx8uJ6h+xTDqZacgvRG36C+IKFdR7hT3TTKQAb9n3e0xL7XeO55Dsv0pyvstVmyUxDYu e7MV/V/A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qfzJ9-006grO-DR; Tue, 12 Sep 2023 09:03:43 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8110D300348; Tue, 12 Sep 2023 11:03:42 +0200 (CEST) Date: Tue, 12 Sep 2023 11:03:42 +0200 From: Peter Zijlstra To: Dave Chinner Cc: Waiman Long , Matthew Wilcox , Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chandan Babu R , "Darrick J . Wong" , linux-xfs@vger.kernel.org Subject: Re: [PATCH 1/5] locking: Add rwsem_is_write_locked() Message-ID: <20230912090342.GC35261@noisy.programming.kicks-ass.net> References: <20230907190810.GA14243@noisy.programming.kicks-ass.net> <20230907193838.GB14243@noisy.programming.kicks-ass.net> <20230908104434.GB24372@noisy.programming.kicks-ass.net> <70d89bf4-708b-f131-f90e-5250b6804d48@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 02:06:56 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Tue, Sep 12, 2023 at 08:29:55AM +1000, Dave Chinner wrote: > So, once again, we have mixed messages from the lock maintainers. > One says "no, it might get abused", another says "I'm fine with > that", and now we have a maintainer disagreement stalemate. I didn't say no, I was trying to see if there's alternatives because the is_locked pattern has a history of abuse. If not, then sure we can do this; it's not like I managed to get rid of muteX_is_locked() -- and I actually tried at some point :/ And just now I grepped for it, and look what I find: drivers/hid/hid-nintendo.c: if (unlikely(mutex_is_locked(&ctlr->output_mutex))) { drivers/nvdimm/btt.c: if (mutex_is_locked(&arena->err_lock) And there's more :-( Also, please just calm down already..