Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2297490rdb; Mon, 5 Feb 2024 02:00:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbXIX7ahIc2ZDmBzqC7P57jSpIXfJk8uxfWIC3fQ0Onl33yH5FvbB37dZVGsqmd7fjrvOM X-Received: by 2002:a17:906:6d58:b0:a37:f127:8c0d with SMTP id a24-20020a1709066d5800b00a37f1278c0dmr151538ejt.64.1707127248791; Mon, 05 Feb 2024 02:00:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707127248; cv=pass; d=google.com; s=arc-20160816; b=wlynQ8W6Z4M/BQCnDHi7mg2ACJNW8NIYCrzIxREpq9iwCfjtcxZZWRxu9Y9m7CRBb7 GW7Bk8hTWuCyigBS/gJnTYDaE3x12la3dnsRLM481Hk00ijNT2EOSVeJICKtH+AiUPtB NWPIl7t+YzJ5QTZq/rTDyKtz4XIm8mYNIrlX2Nh04TCBPtNCrOdGH+XCpIrJ4/Xv/ImG T2FId/5Vkz5gqk8r+cft89cjQFN8UfJHeGZ6ClMgNSy/Bhe1CMqpY2juN1zQRRPVAQ9V jDFRuu6NgZoBefMtYvT8EFMQHmJrcIyv5qQVSUecTuxK3sFOxH8NBIR+oKRGP1wVRi+I fhww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=VurLbfRnWv4YpVYRbQMAJnS5CPXbeMidumFgVRRN3xA=; fh=ZCVKAiYPD1eq/lcimDDiiyVyFbEFtXuHCm3YOG9dcoE=; b=rBRsxVJ762ylmoFYr06AsHF9Zax94vdVcgII1txvhOWVTJbO8zAn9xnDqOUZ/Cro8f 3RQq+92puD9LZ2ovKuBsSCVB2KOEr5Vfd1vXs0DPgjLifV2rmWFHYUZkLqNhqdekfZhw +DoCeO6NOjBwRXKfANLZdHvvh8E/Eu2QoTqALSzqCAWlZ0yb8StxDQjjBrl26dPYmJXi zAbTIO3lMlhQBX/l6REx0iRsYeqAio4FdGabdn5NDyAG2dHinmued2zwnNynGO4fX/4/ enkqcz6dz+lHeRY4LASwnztthzOLNhInCn4f9by7KXUK6VLwqyi+3+KUnqV/V6jF/d5F 5lAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=As80OIQ2; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCUiGxMAr2T+NHJqItqO4Wj3UJjab3qivPmH8gGjuxdRDGYcqDh+WgcoXkytmN5Ka0feBnXvtH3tw+Y15D1Q48yTe8+r9PXTBzAJPQqLnw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h23-20020a1709062dd700b00a378768f0fbsi1672702eji.143.2024.02.05.02.00.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=As80OIQ2; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 64B551F228D4 for ; Mon, 5 Feb 2024 10:00:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C763D13AC8; Mon, 5 Feb 2024 10:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="As80OIQ2" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 364F7134AD; Mon, 5 Feb 2024 10:00:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707127229; cv=none; b=aFL29Qj85SH/yrhqoTRVk+UUrJGorbUQTaxxc0F/jGMqqftT7QmqF7lFY/5U+ScB37JksVk9bnxjomJ4j7oTRfr4tGsZJAKjCH7S3eJjuubO4FAbMAZYLlugMzDaUfQLNGTBJ0qXNO6/3XAh+A/pJA+BpHOJXzYLfgpHYgZTF70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707127229; c=relaxed/simple; bh=ZNaxtENYjMmhsQjQ16yP45HhTKLvYqXbULXrFuJiDWw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FUnaWM87sN//0wZ0ZxTWVI1Bd2VbwD6ygsLmpxFDxJ1Ce9Rg6WYR9KEo9/aijz9djSLpDX4aLPB0iO7Ag1VxfnYZX3KnBQMJyuMuq8Fbk0ffWuRyaSzRQ2INmNBE8sVZWjHLGV6sv0TJM3ISILxLSTFzpQX+qz+grF5d7xFvxe4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=As80OIQ2; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2d0600551e8so49510871fa.0; Mon, 05 Feb 2024 02:00:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707127225; x=1707732025; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=VurLbfRnWv4YpVYRbQMAJnS5CPXbeMidumFgVRRN3xA=; b=As80OIQ29Juwj8SirjH4ZvwDDKAKDAY3jiLNlHYNvGV1E8fCys8wkc6gX4md/5qAsR rwR8LlVofj9pH08wcd/8ZlnoY+MkzRMz3Z6pF0uC6B4jhCIIHwsY6BWoW2wjJK6GM2nY 744pIm+RI/vVAtcPA3bxHBejo+V/R2B20nQpPuB99FXr8fiFpLgMEVOESQNs133noYnX ODiuJka9MzmjrY/oUE6nmLbS6KznXgof2j19bupbJqkHbiUOybJ0H81Lkzx+1x86iReE hFvjr6inu/jocLyYieCHZAoq6+rWfs+1dIG5EGjikyLYd20BZdklIJGLENc8Rcz1PKPR x9RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707127225; x=1707732025; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VurLbfRnWv4YpVYRbQMAJnS5CPXbeMidumFgVRRN3xA=; b=JMUCpwGREHQGHCV7EVQme4D0FTm+Y8+neOiPpiJrc1LogejNVbSkfH1Y0Jv8vefswt MFIO0+mLiUNISvCauUiYxtiDJsUkry5DPoQHAUL/8Rk86wd2TOjGK/eAN/z7fmiRRqz/ Wsb4ncdxshD3qv5/97jqbxqEmvH66RT1PKbwncC0XtQUwVi63lioixG60kZDPE+zDf++ lkp3QkvjqfWaC1l/8mDzlHE4G3b+k1M8spwV1cLPB+ba1ydeirSLou8cFe8Xn5Hl3SvV WHpd9ya28e27jXnXAPD5p+07rto81lCJIgroYCXY+kMkz6l3130EgGLw4oB8tiA3Rj7u hYsg== X-Gm-Message-State: AOJu0Ywfvh9h7ZVXoVMhcvbDAGlr/ZRb8MRohTvj9QGfdm9t5dY8FI/J 4fH1XpVLuN/tQvzdI1zkiBG6TbSC52Kfi1sVmo5z8NVOqGcQGpdo7qOp3jhFsBRssV+m8LjxegD rDMllLCbq/eNM1K7KCbftqZ9Umn4= X-Received: by 2002:a2e:855a:0:b0:2d0:ab64:a7f4 with SMTP id u26-20020a2e855a000000b002d0ab64a7f4mr1378976ljj.6.1707127224618; Mon, 05 Feb 2024 02:00:24 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240127020833.487907-1-kent.overstreet@linux.dev> <20240127020833.487907-2-kent.overstreet@linux.dev> <20240202120357.tfjdri5rfd2onajl@quack3> <20240205095358.p322zf5u74fgczlo@quack3> In-Reply-To: <20240205095358.p322zf5u74fgczlo@quack3> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Mon, 5 Feb 2024 10:59:47 +0100 Message-ID: Subject: Re: [PATCH 1/4] fs/pipe: Convert to lockdep_cmp_fn To: Jan Kara Cc: Kent Overstreet , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024 at 10:54=E2=80=AFAM Jan Kara wrote: > > On Fri 02-02-24 13:25:20, Sedat Dilek wrote: > > On Fri, Feb 2, 2024 at 1:12=E2=80=AFPM Jan Kara wrote: > > > > > > On Fri 26-01-24 21:08:28, Kent Overstreet wrote: > > > > *_lock_nested() is fundamentally broken; lockdep needs to check loc= k > > > > ordering, but we cannot device a total ordering on an unbounded num= ber > > > > 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 featu= re 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 lockde= p > > > annotations on pipe->mutex because there are always only two subclass= es? > > > > > > Honza > > > > Hi, > > > > "Numbers talk - Bullshit walks." (Linus Torvalds) > > > > In things of pipes - I normally benchmark like this (example): > > > > root# cat /dev/sdc | pipebench > /dev/null > > > > Do you have numbers for your patch-series? > > Sedat AFAIU this patch is not about performance at all but rather about > lockdep instrumentation... But maybe I'm missing your point? > Sorry, I missed the point, Jan. -Sedat-