Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4601195rwb; Tue, 8 Aug 2023 10:46:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUIclTw03YuJADHlP7GcxZVhQz1AntBE9fOfCyJzugQDwbCl/mSrSBt5q0X5cHdtFYHYPd X-Received: by 2002:a05:6a20:394c:b0:130:7ef2:ff21 with SMTP id r12-20020a056a20394c00b001307ef2ff21mr12035000pzg.19.1691516799739; Tue, 08 Aug 2023 10:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691516799; cv=none; d=google.com; s=arc-20160816; b=yLMU33p6NEPrmIEIYoag9Zxp6ZqjFH+CPTdXh7TxjW0+hR/GorrZG7fEwdfQDJW9du ZHTfu0lylTVmYb6l096zBQ0I1542Gok0u0MxKthPoq0HpHbatAu5u6DZwwe+rzLj2hGi bMMMYZyMTu9lT3VSfHd6oIOvFtdmytKmFDasXhUxYIwXovDiPKYj11N1mHmpSCE/fdR9 inQ0W8sIGxF8msnwkimUo82mnSsO+nuVemAouCsNb3xqfOYEgWp217Kac+5QMb1csJqD V7obZww8ICf7TkMjLt9U0rNH/As2qUqsWJ7HunI0lfkurg8AV9DpncXIidtFDY7XflwW BFTQ== 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=EHWEbSeqfwZDVYz3Q/Bc+P/xYhg08nROVI52wTA23hI=; fh=ntRA/NjqIoXnCb+TuXnocQwdgTC1bTYLc3KLhFu9xf8=; b=PvtMqPzDGp5sS3gQY6Uu+tPdoxKS5AHuhcOoc5xMf2t+yfWoVZmjR5df29JAb0QjoE yKK/ARGeLd+JbEXFSmzevCiwm8tWjDjmF0Jr8rB2bqJ66tPYDATUAH9PpvSDmbV6msxG UgK5TMO21xeNgDOW2Gt97OBa8g1PZH/sDRF6c8/u3SqW2nYKZaxZPAYWjrkk0i7HOZim brgUog4DXMLSSwxjjz/uqck2/brMeVyQjCsjHoP6fag1NoT7HTppy8qn8CbKaFv/tBVK kGLz7EPHw2/Kd7a+1AhEq7DmIbjYpEhGT70EfyQSGpVoYjeN1jLRXoqFiv+ddxDUtjTV dLPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dJws1KGb; 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 i7-20020a631307000000b0054402b987f8si7281635pgl.605.2023.08.08.10.46.27; Tue, 08 Aug 2023 10:46:39 -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=dJws1KGb; 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 S232819AbjHHQbM (ORCPT + 99 others); Tue, 8 Aug 2023 12:31:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232804AbjHHQ3Q (ORCPT ); Tue, 8 Aug 2023 12:29:16 -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 963B267C9; Tue, 8 Aug 2023 08:51:18 -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 7869362465; Tue, 8 Aug 2023 08:41:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27ACAC433C7; Tue, 8 Aug 2023 08:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691484061; bh=RjjLIZx13CGvW7yRw5fcqlfFcSXMiUPH+D4rU4Q5+yE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dJws1KGbdsfqt5t/8dMXBjYgLaYDm3LH6+rT5yxV2F9sPa6RnrvPRJHd9ec77cSFN U6s96DlFfpOIHxAwaDZRg2oZs311bmSJMW3Liu7KACwt1cvy6oDd4KnHBXyL2JtCBv EGbgv55m9VJ88VoICbQWsGjDy+VIARxqvq0wrfawShr4jrmSozzhRxZcBA/TGegKfF GYeCBVjP4OR6dHXFtonstOfp3/aZ7EniKB0dqYfbF5KZ1ZP4dp1Dx5J5Vll0DYSjtD VxnVed8sRrJPOV1ewTxARGkKKE2DNw0ZuKs3JXljsys75qypPSmKsPMHC/jsLWWREt c6YAJn8Hj+0nQ== Date: Tue, 8 Aug 2023 10:40:57 +0200 From: Christian Brauner To: Mateusz Guzik Cc: "Eric W. Biederman" , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, oleg@redhat.com, Matthew Wilcox , Linus Torvalds Subject: Re: [PATCH] fs: use __fput_sync in close(2) Message-ID: <20230808-unsensibel-scham-c61a71622ae7@brauner> References: <20230806230627.1394689-1-mjguzik@gmail.com> <87o7jidqlg.fsf@email.froward.int.ebiederm.org> <20230808-eingaben-lumpen-e3d227386e23@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 > > And making filp_close() fully sync again is also really not great. > > The patch is not doing it. No, but you were referencing the proposed patch as an alternative in your commit message. > > Yes, we just did re-added the f_pos optimization because it may have had > > an impact. And that makes more sense because that was something we had > > changed just a few days/weeks before. > > > > I don't think perf tax on something becomes more sensible the longer > it is there. One does need to answer the question why it does suddenly become relevant after all these years though. The original discussion was triggered by fifo ordering in task work which led to a noticable regression and why it was ultimately reverted. The sync proposal for fput() was an orthogonal proposal and the conclusion was that it wasn't safe generally https://lore.kernel.org/all/20150905051915.GC22011@ZenIV.linux.org.uk even though it wasn't a direct response to the patch you linked. Sure, for f_pos it was obvious when and how that happend. Here? It needs a bit more justification. If you care about it enough send a patch that just makes close(2) go sync. We'll stuff it in a branch and we'll see what LKP has to say about it or whether this gets lost in noise. I really don't think letting micro-benchmarks become a decisive factor for code churn is a good idea. And fwiw, yes, maybe the difference between close(2) and other parts doesn't matter for you but for use mortals that maintain a bunch more then just a few lines of code in file.c if you have a tiny collection of differences in behavior everywhere it adds up. The fact that you think it's irrelevant doesn't mean we have that luxury. That's not to say your patches haven't been useful. Not at all. The close_range() tweak was very much appreciated and that f_pos thing was good to fix as well.