Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp262474rdb; Mon, 22 Jan 2024 03:31:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsLdNJNRgEFvTJjyEWrzml175odHZ3TeG0tzriuzKJjhNr4KTVl+8ZqIqM2hVFT4DoO/mh X-Received: by 2002:ae9:e217:0:b0:783:6e79:95f5 with SMTP id c23-20020ae9e217000000b007836e7995f5mr4842979qkc.86.1705923114295; Mon, 22 Jan 2024 03:31:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705923114; cv=pass; d=google.com; s=arc-20160816; b=ITna6TV2JajNUArEFAAp2+rYhI0bJ8SnnKY/abjEppvXFhtByC9ZX7lriEX80FE+Ge +3YxM1gZS0E3khuu51G8Mt2yHhk3vstWAKKdm+CdJZkaycpVSWPdEbQAWA1Xf+7C9hlV zlMfapZtHOjv47fIVRHsE977QBvABMzPklFn3YunclseIhzofUaWDbl9P5g4SvLzZ1gO 4lP7vEhSzbfcYM90aAEQrlvHR3DOToVz/s8G2rOpKHn6Ny6iw+82YJ8BtyIjDjIeU8if p+vgki7ksswHUdQ8CpnWyw83ffkgDM+xzH/xTXG6ac0OO90lpJ674EjiyG0kVbVg5Sxf VsFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AoXInDWZ7rptIxU4eka5IFm+9oUrM/x1nykmjsHFLJo=; fh=5pxwuvw6wwKbV04yoyjvl5u/+pvDXIiNDVmRnxU3FLk=; b=GemTeMOyWKRyA1jq6HjFknVVTpP2u4vofVh6ZsK1CASCYPez3xJ6524WFni/jcWFC7 3t5pZgjuUIefXcVa4Vd/BHVfP3G/TvnARbtjpXyT67+qsQjHekwzotebYXGIJz8uP9VB 0bN/RksmqygijCn8TEtHvTh2B3JoU8uzOX3iC/s9P4N0Y50LCkxrgLDxTDooi1pwx1Xt 5YeJaCAjxhyr6yOM0zy/YKQPy+hdYHjNA/6UzHBAA8wqmFwVH8y/Iqvzj5DKyOCc0gaO Qw75jrufJAfxVyRV2At1DCOAyLOokppCsJhDo/pOLcojx4ylwdXuwB+EpTPbiBH0oXMW YK4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qgbT7NR+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i1-20020a05620a248100b0078324313bcfsi5853985qkn.745.2024.01.22.03.31.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32903-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=@kernel.org header.s=k20201202 header.b=qgbT7NR+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 10EE41C2201B for ; Mon, 22 Jan 2024 11:31:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26A8646529; Mon, 22 Jan 2024 11:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qgbT7NR+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 51DB03BB25; Mon, 22 Jan 2024 11:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705922352; cv=none; b=R4aplJk/b6MhYA7kqKUDrV5P0GfNeNiI4XZ+13OdIwLmPf+lndu39uwg+DQu/yZ1rIRnZF0PaEai8zqsWQiuGQSRn1gDX1lVs4T5ut+iZv1wvjIs4VgrL1M3dp5mC0eXLPvqgYJXwlqhvVwHhlrNN34eSmdcStxR2bcY7gfsUic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705922352; c=relaxed/simple; bh=2SwUAmTtPmO5NuF/3z610QfGvtisw0LXRHtu+pxb/Sc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J20nQMY54b0Tq+kCW0cx2kvHiyXces/P+/slm69vQefg/uZTlueCVLwHXntLyc7W8Z6MRscSIGtiqK7IEguRCQhqNbl3Fh14T3DZoJ/v5qjQh8zQIL6bm97x0qxCxg4R1S3UP4fPl0TN8+J7HQKbA45YjVifMie7Z3lClfdQa2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qgbT7NR+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAEC9C433F1; Mon, 22 Jan 2024 11:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705922351; bh=2SwUAmTtPmO5NuF/3z610QfGvtisw0LXRHtu+pxb/Sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qgbT7NR+Wn6rwJWBDMuLlqDS3FbXPSRRVSDsVeZe1dVMAZajmXqa4APlq55a1cWNY aJkSSA5zMtNjsnPjldQLVYb8W3kXlhLVhssPSpxa5XxdU3oqffX+KXcyeS4hxp1TzN B8P2b9zosp+UlG7T0ay2KBEkbRTVXi7t+XRBoYtovZUPbSNFO+B566xkp4TMIR5kff mQEceZ8hbA4ImY6Z2RWE6b6K2/+h/VzpVQhciHYhSVfdTgXE2SvM+Y6LF94JWC2oBF JFlxjkdW35gV0047RQ7I/qcUkcIOGw1K3aIEWjhdwMbIHiGkahnG5BQyY9VsCLd8Mx TxbWxnP2uV7rg== From: Christian Brauner To: Baokun Li Cc: Christian Brauner , torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, jack@suse.cz, willy@infradead.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, yukuai3@huawei.com, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 0/2] fs: make the i_size_read/write helpers be smp_load_acquire/store_release() Date: Mon, 22 Jan 2024 12:14:52 +0100 Message-ID: <20240122-gepokert-mitmachen-6d6ba8d2f0a8@brauner> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122094536.198454-1-libaokun1@huawei.com> References: <20240122094536.198454-1-libaokun1@huawei.com> 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="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1819; i=brauner@kernel.org; h=from:subject:message-id; bh=2SwUAmTtPmO5NuF/3z610QfGvtisw0LXRHtu+pxb/Sc=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaSu81f9PSNp96uU9X1nFjJfYlh1U2q3r3TY5IvTnS44v Z15StxUtqOUhUGMi0FWTJHFod0kXG45T8Vmo0wNmDmsTCBDGLg4BWAiGWcZGRZYR8pU6ScKL9nt 4s8lsn/Zl3MtygWyMfrL5S8+Lli5eCEjw457hbnTC862NH9S/eVy42ShhNrzH3l3vDLfuljNDq/ n5wYA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit On Mon, 22 Jan 2024 17:45:34 +0800, Baokun Li wrote: > This patchset follows the linus suggestion to make the i_size_read/write > helpers be smp_load_acquire/store_release(), after which the extra smp_rmb > in filemap_read() is no longer needed, so it is removed. > > Functional tests were performed and no new problems were found. > > Here are the results of unixbench tests based on 6.7.0-next-20240118 on > arm64, with some degradation in single-threading and some optimization in > multi-threading, but overall the impact is not significant. > > [...] Hm, we can certainly try but I wouldn't rule it out that someone will complain aobut the "non-significant" degradation in single-threading. We'll see. Let that performance bot chew on it for a bit as well. But I agree that the smp_load_acquire()/smp_store_release() is clearer than the open-coded smp_rmb(). --- 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/2] fs: make the i_size_read/write helpers be smp_load_acquire/store_release() https://git.kernel.org/vfs/vfs/c/7d7825fde8ba [2/2] Revert "mm/filemap: avoid buffered read/write race to read inconsistent data" https://git.kernel.org/vfs/vfs/c/83dfed690b90