Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp804756rdb; Fri, 2 Feb 2024 04:48:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhDeSNhqjt1c8k8XCeML+o5ATKVyAEclFjEYmSBffsmxjvxWRSXRf1Qhg045iI4iZU9fAx X-Received: by 2002:a05:6808:1512:b0:3bd:a880:d248 with SMTP id u18-20020a056808151200b003bda880d248mr9401306oiw.41.1706878089544; Fri, 02 Feb 2024 04:48:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706878089; cv=pass; d=google.com; s=arc-20160816; b=T3xBTr57GJndg+olXoT30ntN887h8/PO3QwGqUaDHDWY6jjeo7WD9ieuGD3XSxGWQb lg4Gi0NFyQ56EiFnHBhM+BJR9c/qP9OshNYVuAZl2LmNyZPkYxLQF1SSCjAbI5ryZvFz QJpejTkhc3lWbzwcrTOXPS184OxBrCzNJaVKyAK6A8dMVKK11hLFnmSO8ECSi9ekcoCz GhhGR1uHcucac4rhaJAWLc+I6uNZVxGDwwhKaJ1vlUtkbJCFTEzRHoZ8k+APB6Q8Qp7h gjzl3f320AOyQkFKsphKpjWihOxXRrKmkNU7SHOuSB+HevvGzqgkjXOM23miiKB6ZUNx qyRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=xb97amKiVjHfa56AqmJwWt5AiBv9K/QA/PEcc/1iKAU=; fh=o8Rizk758ldPsD5mM4HFLvGnhOQIwq/R8T/0rgR98Us=; b=u1/T/pSWmjhokrZeTWy/VTI+ZR6scCWnis2C1w8+yxHWtBe2qeXHMzt7ivA/bMPy2e 6fNOhqRxtNNq1mJf4nPQzGrGq+jVj+IQaoWhCoxOlRe+3A8Utm25fRd+02iH4ylYM/qZ ZQb6Dxhm/RKOLTctjc0dCrnWAD+OvXuXn1Y8VSm2qfO/WFF4OH7XCSVygneI7/NFlsGk ESbnw+xH6YVhpcGUzC540IMV1aPspGeszbeG0GE16xOaHev2LVvkRxfRV3Y/sFEHIDoA g3jp51CdWGANslaCl4APeHJrNCI6zBDd+Tc23aSrQRSiQGJkcSwFhwwe7F//dh4TIBP9 oi5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fM4KnXiH; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-49862-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCV6St2eShwxnfd+crQnoOUhJv3Y1hswtXMOcUgiUVyE8ZCkHGVjyH6R+Hh/ZEsPlv3U1Nw0McT9AA+O4VapsFxvIwGbIiG6v6RbdREAvw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u13-20020a05622a14cd00b0042c078b9ba4si537624qtx.423.2024.02.02.04.48.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49862-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fM4KnXiH; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-49862-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B5DE1C240E9 for ; Fri, 2 Feb 2024 12:48:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6ECA6ED0; Fri, 2 Feb 2024 12:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fM4KnXiH" Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEFAD185B for ; Fri, 2 Feb 2024 12:47:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878078; cv=none; b=Qf2SWTaMkmXr3vLQ5Ec8yimYxipMGZ7qRuiAHtnurfrdHm3uj7IvJ8nCy9EsbcYAJjU/CVvPAvqAh480WjkGdbq5yiTDoIY3SG5SxdUTPcfKqdrFrtTDsc7iRSZCJznthPSa1P3cOYthq9p4rllHp+3z3JvqkkmaAdQOnunSQzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878078; c=relaxed/simple; bh=RdTmza3iZdCn9aokmFdZsGKf1WkeNmgHQkyy7tSm8lw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FMl4QdeJ9XGclkLPlUK57z189OXpsDpcKx0f9pk9btQACWDVctz2s/vJYfqauC2efZZz5CwWe0T6xbuIrNZJ/ClMfcWjZ/feI9QQqyChygB5LJ5VFxeu3uIbkhCju3w+4WcvUiPWSKNQ0DI3LFNhAAObt5TrIslNK/jhQyQgLQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fM4KnXiH; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 2 Feb 2024 07:47:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706878073; 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=xb97amKiVjHfa56AqmJwWt5AiBv9K/QA/PEcc/1iKAU=; b=fM4KnXiHEeMdAKYtzIZQSnI4BYWCbgXBoXDNmFxQt6LB3ps+0jhsSPrdCEBvRner8OmAxX ZxpFZp9CwTdDbNAh/e0+RTQfz9C63GdnrEQJ8RqGEqkW9jlMqrx4FrVPefi3CtwtKTO3Ym HyzeF71W3DAuKwjIBvV7QhPGHa63+sA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Jan Kara Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, peterz@infradead.org, boqun.feng@gmail.com, Alexander Viro , Christian Brauner Subject: Re: [PATCH 1/4] fs/pipe: Convert to lockdep_cmp_fn Message-ID: <3nakly5rpn4eomhlxlzutvrisasm6yzqaccrfpnpw2lenxzfmy@vpft5f4osnye> References: <20240127020833.487907-1-kent.overstreet@linux.dev> <20240127020833.487907-2-kent.overstreet@linux.dev> <20240202120357.tfjdri5rfd2onajl@quack3> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240202120357.tfjdri5rfd2onajl@quack3> X-Migadu-Flow: FLOW_OUT On Fri, Feb 02, 2024 at 01:03:57PM +0100, Jan Kara wrote: > On Fri 26-01-24 21:08:28, Kent Overstreet wrote: > > *_lock_nested() is fundamentally broken; lockdep needs to check lock > > ordering, but we cannot device a total ordering on an unbounded number > > of elements with only a few subclasses. > > > > the replacement is to define lock ordering with a proper comparison > > function. > > > > fs/pipe.c was already doing everything correctly otherwise, nothing > > much changes here. > > > > Cc: Alexander Viro > > Cc: Christian Brauner > > Cc: Jan Kara > > Signed-off-by: Kent Overstreet > > I had to digest for a while what this new lockdep lock ordering feature is > about. I have one pending question - what is the motivation of this > conversion of pipe code? AFAIU we don't have any problems with lockdep > annotations on pipe->mutex because there are always only two subclasses? It's one of the easier conversions to do, and ideally /all/ users of subclasses would go away. Start with the easier ones, figure out those patterns, then the harder...