Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp197051rwb; Fri, 4 Aug 2023 11:10:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWOIBrEkSI3ipof/OG0IqcHyOVj+LcWq0Vf2PriA4+nYZJiovuLa0Zdsv+3ikKiht/YpPG X-Received: by 2002:a05:6a00:2d1c:b0:687:26bc:636c with SMTP id fa28-20020a056a002d1c00b0068726bc636cmr3080666pfb.2.1691172616296; Fri, 04 Aug 2023 11:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691172616; cv=none; d=google.com; s=arc-20160816; b=Fw42ycH4lvPqwsj1YOJ3rFXS9P4KiSXEWf4dcQtJH2YSRRr7CKcOpl3EyYHIbXRE/J v9dkkgz6Dn5KT2vsojsxTP4qE3GQ6Q3kQ3Ha/j1qBw8Wtgyth2APg0sAY+vzDDrpOFCU QlW2pe3VDmVcW9NFX1185M+IysQiJxLSpWO0cDaIwAk+lFf7heKRptOQkTSmpAitn/L7 eQJvN7oPDR40evsnNWp7UYI3C+6lhsffg0YeFxvxqLxERQ5TnZojHKI3g1M5X8E6aOs1 6iZ6aS85Yg70kU/mXhgFnpD485O+j0smu+SCiOMADz0OiGVl7dUkR9xPUNjPeIsItnMQ LanQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LUPppKUes2ZvLDnkspSr5PDmznhPwoHfzJMTKPsjz6M=; fh=QQq967cDYb2hcct8y4YSF81aHw2XbiHIDyhh9FQLxuw=; b=MAvMZLu6pQ/HsZ51TkVD7nVAgvR0kHiotip8IZqWlttfAxpL/df/bHvP85maGtCzX+ LF0rRPFhllvl8vmR90d1b0VPqTYsbJb54VJAY0mjqNPZqg4wef2tl1DIgRb4x7cGLvOl BMsTPZqiBReclh9Cv9UC1MyKuZyUvdfh0UlwDM7QFgBFgsB8ePfQ5b9wGvZ1PHqfRWJo BHlw7fPTSZCIjQgKWsSJG/dyWnRj46Pn+lSC5PmfQO/otPvaQ7nUf0W7rCbTA/E8s8k7 LIH61hOTXUnWwOp+TvR1dQbff1eUohhJpRRXl+AkEdfXWsV3TD/qVfxDnQD7IPTyQZD1 Opag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jVivwCU/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a056a00191000b006875bd6d8d9si2030978pfi.169.2023.08.04.11.10.03; Fri, 04 Aug 2023 11:10:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jVivwCU/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbjHDQuJ (ORCPT + 99 others); Fri, 4 Aug 2023 12:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbjHDQuG (ORCPT ); Fri, 4 Aug 2023 12:50:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358043C28; Fri, 4 Aug 2023 09:50:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5995620A7; Fri, 4 Aug 2023 16:50:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE00EC433C9; Fri, 4 Aug 2023 16:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691167804; bh=ZfGdzIAuhwL7qwEggkWYx0zmGQwPFGXxKE/YKErZ3QQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jVivwCU/HejBsQUX67O3IcXu1YfP07Y28/i5qpOmmZALYEQytDTV0wE0ZiABYOTjW iw6O4JYtneCAmC2GFEyKNpZR2a7lk8PtWeaH0acZ+IjFTtH//jyGYRRCh5FxHlUWGT 9cWuoTlFy3ZSlL3RF8MU5sE+FlWA6NocxdxqliEA7/9XdLVEvCEXjHg5zC8QVjzzt5 q6AD9A/EpQ5sv75rEuQCISzfcaJ9aWezwpbpVaiRd+ga/p3ZhKh+VTUr1Wt/zgUa1/ LF326lrp8mEIoqSaoKRXA6BA/q3/FMSqWSA+gg7vfqUEmOh3uICto9fM8cS2AU39+X MwNO6ZynwIkvg== From: Christian Brauner To: Mateusz Guzik Cc: Christian Brauner , linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] file: mostly eliminate spurious relocking in __range_close Date: Fri, 4 Aug 2023 18:49:58 +0200 Message-Id: <20230804-hubschrauber-hypothek-e8003cd3fbec@brauner> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230727113809.800067-1-mjguzik@gmail.com> References: <20230727113809.800067-1-mjguzik@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1377; i=brauner@kernel.org; h=from:subject:message-id; bh=ZfGdzIAuhwL7qwEggkWYx0zmGQwPFGXxKE/YKErZ3QQ=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaSc1TF5J5Zk3bvEP/xDkumuy436T5+y/NMMunRXllX1nW6/ weLcjlIWBjEuBlkxRRaHdpNwueU8FZuNMjVg5rAygQxh4OIUgIksV2BkWCE3kb/scEWJRPIsUw52eb u91yVLO+Oi396Z1zU98obIP4a/0t6z9qnz8X04dZrt7S3TT8vK9FzVdzblK0351HxuDUMfFwA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jul 2023 13:38:09 +0200, Mateusz Guzik wrote: > Stock code takes a lock trip for every fd in range, but this can be > trivially avoided and real-world consumers do have plenty of already > closed cases. > > Just booting Debian 12 with a debug printk shows: > (sh) min 3 max 17 closed 15 empty 0 > (sh) min 19 max 63 closed 31 empty 14 > (sh) min 4 max 63 closed 0 empty 60 > (spawn) min 3 max 63 closed 13 empty 48 > (spawn) min 3 max 63 closed 13 empty 48 > (mount) min 3 max 17 closed 15 empty 0 > (mount) min 19 max 63 closed 32 empty 13 > > [...] massaged it a bit --- Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] file: mostly eliminate spurious relocking in __range_close https://git.kernel.org/vfs/vfs/c/215baa741614