From patchwork Wed May 15 05:57:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez X-Patchwork-Id: 13664608 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB1A8C25B75 for ; Wed, 15 May 2024 05:58:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAA966B0165; Wed, 15 May 2024 01:57:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C33BF6B03D9; Wed, 15 May 2024 01:57:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8AF296B03D5; Wed, 15 May 2024 01:57:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3DBFD6B03D5 for ; Wed, 15 May 2024 01:57:42 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id F15C21C1881 for ; Wed, 15 May 2024 05:57:41 +0000 (UTC) X-FDA: 82119573522.07.CE343E3 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf11.hostedemail.com (Postfix) with ESMTP id 185644000A for ; Wed, 15 May 2024 05:57:38 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=HEognthI; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf11.hostedemail.com: domain of da.gomez@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=da.gomez@samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715752659; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=t+LtSI8A+WgybP8NqP+rojjUG/bT6woZXyJ+I7vfPH0=; b=hrvNdLwzEVx3KoAqTRXS/7080Zxn7A1RvGAY0uY14JerfPr2nJXczXkm+obuINYc8AJoSj aR9/AXRP4doc1zSxeH3d77rIAaji/szDlGf9sRUq2RmEXq7iTn+EuwU7rtxwuTvV8CZ6LJ DaNjZZOd9xV2UImgGPG62kkGh3bW4fc= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=HEognthI; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf11.hostedemail.com: domain of da.gomez@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=da.gomez@samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715752659; a=rsa-sha256; cv=none; b=vsIcJXJ0m9Ujz+0ru6tuHQSdAE2nDJ1xD2e3wcxmKrAZoFVot982jzx4ocTnv8abeFgvZd 06qazuOfchOw7TJq8P7AMtmTqPyc6lgBmCCt1vxJOf2F00GubwLpXYPoJEXPaFCcRtVXv/ 7Qh7fbOqnpfvHuaRwzwEOQz6xl50fKw= Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240515055737euoutp01e0e6a78fd205d8d7250df814f88fe342~Pk-OcTLTZ2238622386euoutp01B for ; Wed, 15 May 2024 05:57:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240515055737euoutp01e0e6a78fd205d8d7250df814f88fe342~Pk-OcTLTZ2238622386euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1715752657; bh=t+LtSI8A+WgybP8NqP+rojjUG/bT6woZXyJ+I7vfPH0=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=HEognthIkmnPhdriZmRVNdoD04/O3Jx12OyZQOvs8XEUQzLhmTjExcmavKd/QTIJ6 QD+bRgRur7e2X1q8N4G3leH8yfJKGyRPLzQtTWKsY3LrlnINuMIMKA15SFLMg9VqMU HpWo8N22zTYQVCRt7km9m1RtlQ8/cMa9GMrkwhUQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240515055736eucas1p2f25fe01f090462c69e1148cea0c1d5a8~Pk-NBWHHN1079110791eucas1p2h; Wed, 15 May 2024 05:57:36 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 37.D8.09875.FCE44466; Wed, 15 May 2024 06:57:35 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d~Pk-MUqVPC0808808088eucas1p2V; Wed, 15 May 2024 05:57:35 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240515055735eusmtrp2b5840e2e22c2bff3b8f61569b97ef6b3~Pk-MUA_zl0256302563eusmtrp2P; Wed, 15 May 2024 05:57:35 +0000 (GMT) X-AuditID: cbfec7f4-11bff70000002693-ef-66444ecfdcc6 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5F.16.08810.FCE44466; Wed, 15 May 2024 06:57:35 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240515055735eusmtip17eac0a1eafc6d97691a64a17f60abd3d~Pk-MHq1jo0512205122eusmtip1a; Wed, 15 May 2024 05:57:35 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 May 2024 06:57:34 +0100 Received: from CAMSVWEXC02.scsc.local ([::1]) by CAMSVWEXC02.scsc.local ([fe80::3c08:6c51:fa0a:6384%13]) with mapi id 15.00.1497.012; Wed, 15 May 2024 06:57:34 +0100 From: Daniel Gomez To: "hughd@google.com" , "akpm@linux-foundation.org" , "willy@infradead.org" , "jack@suse.cz" , "mcgrof@kernel.org" CC: "linux-mm@kvack.org" , "linux-xfs@vger.kernel.org" , "djwong@kernel.org" , "Pankaj Raghav" , "dagmcr@gmail.com" , "yosryahmed@google.com" , "baolin.wang@linux.alibaba.com" , "ritesh.list@gmail.com" , "lsf-pc@lists.linux-foundation.org" , "david@redhat.com" , "chandan.babu@oracle.com" , "linux-kernel@vger.kernel.org" , "brauner@kernel.org" , Daniel Gomez Subject: [PATCH 09/12] shmem: enable per-block uptodate Thread-Topic: [PATCH 09/12] shmem: enable per-block uptodate Thread-Index: AQHapozH2Ew2w2FSxkCziesEgQoVNA== Date: Wed, 15 May 2024 05:57:33 +0000 Message-ID: <20240515055719.32577-10-da.gomez@samsung.com> In-Reply-To: <20240515055719.32577-1-da.gomez@samsung.com> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [106.210.248.161] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAKsWRmVeSWpSXmKPExsWy7djPc7rn/VzSDPbNtrKYs34Nm8X/vccY LV4f/sRocemonMXZvt9sFl/X/2K2uPyEz+Lppz4Wi9nTm5ksLu+aw2Zxb81/Votdf3awW+x7 vZfZ4saEp4wWB091sFv8/gGU3b4r0kHQY+esu+weCzaVemxeoeWxaVUnm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tf9fpoZipnSTX7rSAZc/dBW+yLNanvxRmnbNo/tSF9eVv DaTP79r1JHjf9Yr/N1Jir5df7pG3l2zWubP6iclxzeWxs9dcnetiVtXqfPFJ9sOUIJfnNqZt AlHiC/UXMSmxFGckGmoxFxUnAgA2YmL4AQQAAA== X-CMS-MailID: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d X-Msg-Generator: CA X-RootMTR: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d References: <20240515055719.32577-1-da.gomez@samsung.com> X-Rspamd-Queue-Id: 185644000A X-Stat-Signature: e9a5p7pqedw9xapjnmcpqsekyw3tzfaa X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1715752658-210091 X-HE-Meta: U2FsdGVkX1+kxK71kDinZCrAicqDsZvepAJKNcDNdAzoZY08n94riypMH3oFHW63Lq3jveb2/wZH4ggiX+uYDtD50rPsbFM4RyOJRNEqyXyfu/NdCPRWnyf3hTQgHS591SUFFLo8vHDopBG/6Qb0jWTbwnfv6eKfJAVMUx9INhQlub3jMXlW9a2E/Fk2YY3P3nhX8L6zHsuFtJn3EmooNPB3ZSI9aISUMHwQNmA+83qbXCM8SFUwVssKl9jpkcfp860rAvqjfTwXa1C4uIdbW7xAq6fBiTc7R+BVxHcvvsbHMccVRqWmxbmCJqw7jwOD7yP/HZ7LcWYRgsZLV1cSQhp23t6yhGy/Lb1Nm2wDQlzY0Gsx8rMyhJKPWKQborWVHW/TzBrrg8c4tr3Jb1U4FhLLl/agDvH4DlV6bIerpGe6/wunlRy7aJsWlwBM9cS/uzAEZrEaI8dSXs5FNL/k4tY77PyrQxkzG7Zisrw8H0i+zF3yqPVJQHnoirM1BEIQGTLdsC57FNRBpWy8j4GKwCmw5ylPWc9fvqy0HLPnD27JIiL1qtXPT8L6E4XySyM3MVMMCDKT1YHSfuMC8QMT+8iY6Oc7KAYpzSK7HPf31c1rZ5nmqTyiSWJCSoLjspBpkreBjo4UZjWEJh70fpTlPmFr6gK5DV9+Dn32lKW0PYwu8Ay8Br1wANZhVG8MJoavxAXXe+rqXcbtJ1o39S91uCr7jBbEfi8dmWoEFVxLtFYVTEkG5a1h5geCxUb9xEm2XZO3ugpetakHED6zFHfN6GzzWZ/bJ6fn31wl4DMep3MmGYFlqcOAwckQc2WV1oDWSpUySPmx0HuQQnV8clPeN5R6P5tOZzsZiHme0Qh0KBe+rtZjIAijz8V/8HWi86B4NWaZ8ikIjBWEkW9quc8/fielTN6Sk/NJprn+hobVeqYwJe+eYFbf6d5IYnw4GJATiI6IISb+F4DdTCStpSO LiALgb37 EbxrOVaC2L8QJKiaIDmqxRkTOdcNIeoGgTu80X8eCgZgmpBnNLf/qFTevjai662WltyKGAicJ97TlQ1y2EOvpBwTjGUClKdT8cft2g1qj330xnGSuLJs8ZZhh5Sd5hQ0IIneTxfd+ZLsVwM0warvvU1nI1vsBQ7SA7lbOAkz8J+L7LqjyhIw2kR5IWSze4p1JJ7kRR8ZaMKr3pTAGOpEbOmv9Yk0nAwDMAmjq+dLcdj0V5xk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In the write_end() function, mark only the blocks that are being written as uptodate. Signed-off-by: Daniel Gomez --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index d5e6c8eba983..7a6ad678e2ff 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2991,7 +2991,7 @@ shmem_write_end(struct file *file, struct address_space *mapping, if (pos + copied > inode->i_size) i_size_write(inode, pos + copied); - shmem_set_range_uptodate(folio, 0, folio_size(folio)); + shmem_set_range_uptodate(folio, offset_in_folio(folio, pos), len); folio_mark_dirty(folio); folio_unlock(folio); folio_put(folio);