Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp986708rdb; Fri, 1 Dec 2023 04:18:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyMeKrkOV6ycJyBOGjPi0VQPMNNKclIlyV2LVJbihfekFJxgOF3nbfd2sTLfMux0l7Mvcn X-Received: by 2002:a05:6358:224c:b0:170:73b:b7cc with SMTP id i12-20020a056358224c00b00170073bb7ccmr2927006rwc.10.1701433120234; Fri, 01 Dec 2023 04:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701433120; cv=none; d=google.com; s=arc-20160816; b=gm3hccUiUPvKyQXr8eXCVVN2IsP3cwGkW6PEW0RQ7/rTT3ZBpUsgolvIF44hl01/hb 1AT04QQjzuhAW4Cd2Wyfr+3rLjscyzZNIvxgurt4IdjDvNGOuaFsSzubaWL+Y8RjOdqg t6635z49nA+8G/HvvNhG0IEYeNVhyy2RLVsUXyXQhNmgGr3vcRDGHtI0Tq5kJdO7x/C7 y0kxOZ7I/+Q6ZEC+YQSQ/fEM3M/GcTzBMylNYTUTEwjoyyxZgUQ9r3/mTQmCl55zlTJW zR0Tondjiu4W1spTHG7zkNtL1CH9pfUTq/NEJBDPJieiZ13dG1pjFTCt7DNKqOpev0QC YZWQ== 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=FAas7mu+OH2ZpUNv/i/XfzAOSAkuh02Ju9j9sSGd80U=; fh=VbUMEyoowIiOaMWZoa6vGYG0xKOefXN0uA/wKwtiFsg=; b=UxSkFY/VuHsce6vcth+5zh1+LaU3j6bOsrZsN5bUWDohU5NH/KfsKDLLAr52gp8KpX 4Wj8M4gF21ZxrcASoOlXQ7+batKlCPObJcCvoT5xw4rsFjD2RppyCwMMOFV3dkKlp7MT aVpWRaoff+wyhrMFbJ0OB6AQNEImCj+bif8uVS2AU75PLoItk/3Hjgs69mclLGz6BKY8 nTitszHL+TjpHs0IMDBiVFZRwO7CK2FJGZIQYwW4UsM2WreBYAsmoIPm98tS8VkmlAqP 0mMGdLNLzdPbeB2ayOGC002jEKzqMzWzydcWm4YhBmjl7EEXDy4OvaqC8uhfLHaMekZ8 qHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=D57ulvjQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b11-20020a63e70b000000b005b929886d2bsi3292389pgi.138.2023.12.01.04.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 04:18:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=D57ulvjQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id AB23385F6E93; Fri, 1 Dec 2023 04:18:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378788AbjLAMSM (ORCPT + 99 others); Fri, 1 Dec 2023 07:18:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378776AbjLAMSL (ORCPT ); Fri, 1 Dec 2023 07:18:11 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946EF1B4; Fri, 1 Dec 2023 04:18:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=FAas7mu+OH2ZpUNv/i/XfzAOSAkuh02Ju9j9sSGd80U=; b=D57ulvjQDCI++VntFACHyMIkYN yX+n3xXk3VNW5qwCVy2GxdeSSyDeoHDSKQmLy36obgS4Z4RP0VwaBwRzIivwoErbxnj1ZKoZUKfba 8/m2FSeUG18nPOUP0MhBPEuctsb2QsBS1V1ZERwH5nphcSq+AMS9x5oEOAhBj3KLSmYR3Z2ecPDDV zMrVqq+F2zo5O0tb8/Fim4fMDpRyXC+NWpNLtDbgq7nPPnwt3dOw1H2WSS6zMhnQ3VLrD9wf+zZXk QXThbq9e41Y/JVkPbiAqMGIffmxuyUtFmpar2J6ydnxWGzpwpQ/zkdngPhg7ngjyFblX9OIT2jogA nTCxCNtw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1r92TB-002CIy-35; Fri, 01 Dec 2023 12:18:11 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 958A230040C; Fri, 1 Dec 2023 13:18:08 +0100 (CET) Date: Fri, 1 Dec 2023 13:18:08 +0100 From: Peter Zijlstra To: linux-kernel@vger.kernel.org Cc: linux-tip-commits@vger.kernel.org, Jann Horn , Ingo Molnar , x86@kernel.org Subject: Re: [tip: locking/core] locking/mutex: Document that mutex_unlock() is non-atomic Message-ID: <20231201121808.GL3818@noisy.programming.kicks-ass.net> References: <20231130204817.2031407-1-jannh@google.com> <170142744948.398.4203675877225809071.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <170142744948.398.4203675877225809071.tip-bot2@tip-bot2> 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 04:18:27 -0800 (PST) On Fri, Dec 01, 2023 at 10:44:09AM -0000, tip-bot2 for Jann Horn wrote: > --- a/Documentation/locking/mutex-design.rst > +++ b/Documentation/locking/mutex-design.rst > @@ -101,6 +101,12 @@ features that make lock debugging easier and faster: > - Detects multi-task circular deadlocks and prints out all affected > locks and tasks (and only those tasks). > > +Releasing a mutex is not an atomic operation: Once a mutex release operation I still object to this confusing usage of atomic. Also all this also applies to all sleeping locks, rwsem etc. I don't see why we need to special case mutex here. Also completion_done() has an explicit lock+unlock on wait.lock to deal with this there.