Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3111008lqo; Tue, 14 May 2024 23:00:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpLRqcFhe64/aN9r3dcjUHVlFwR1gcrNIEjID5VYDesjVBAtzFeDbb4pcgY6zct1KkFBIkVHJHsR1Ej/I7jlzVnlhK0qaRcIjuBb4CUw== X-Google-Smtp-Source: AGHT+IF2yaQYwvsJFrsogSU+SlJ9vQINTc+hbHzhTJgeLjuNpXvNQiTg+CbALGvPg9OIT0O6P2a6 X-Received: by 2002:a17:906:3e41:b0:a59:bd5b:a0f3 with SMTP id a640c23a62f3a-a5a2d5d4509mr941201266b.38.1715752799876; Tue, 14 May 2024 22:59:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715752799; cv=pass; d=google.com; s=arc-20160816; b=KhRGQVAg34I5y+vx75M0xBU7LIjzyNsF7LT0CpCrM3DFILt/GCVkmtlmrOzZDvhKBN 44qfm3Cmpu+/srDYcSawGl0+FXNqBMkmwyGxEyykXJotwcFzgSZSymeIrV2viV+Tw402 3IMT4C+k78HX5hwKnqBBumruT5m9jAnSkkRnL1Jo9X8VdhFvXAMIMxjH5xV64B1GnI1c MW8AL7rGSoAVkNs3gMtzBS3mGENaQuh6LpnvmZca/DqxM1b8CpQNMDjIK+sc07xjI66x X6e0QXTIrEWO7tUjrp4bsN1sregf7XmVzcZ1fzoSJGtRvqoM1SG+fjo7N5HhnStDT2/X XG9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:content-transfer-encoding:content-language :accept-language:in-reply-to:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-filter; bh=UpgQNcs3t+vPhgTbp5qaltdkcX9R16oQVfuTuAdyYIA=; fh=boE2T1tfXWhPiAXKUEd+pJodvJpwHMz3xvNd2cVdM48=; b=JjLsCSOAG3rwQRgDVz5X8VOFdv6CyU9YgyUSuakcK1Y09PLxAEwU7t9KAuQNP2QnB7 Km3eA78i5VGXK5UPrTXKFYm4SxCIRzOyqaSlKCuPOwuiNbRoeZwYb2MaCyPWIoMvxiY8 pNm12C+cU9phfSAMmarzn9Y24k5xtHfdxlQ3R6ifWhTn/rp8fm/blJ60qhTSgmsrrajU /XWskitRmlsyduWsLmQPy2u2ZpTMiFS5tcmlsZDS5PMGp0vPMSJUJQ40HbT70YXFSZcZ 0U9G+sjQqQvJgO6MXhJsaZQvobWr7CRRAPi39OXt3jHRGW3ecGTRNzlkFxoq7vq/Jbgp a5lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=V6X+pv4+; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-179491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba5789si709143966b.573.2024.05.14.22.59.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 22:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=V6X+pv4+; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-179491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.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 673E41F238CD for ; Wed, 15 May 2024 05:59:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C567253361; Wed, 15 May 2024 05:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="V6X+pv4+" Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 C3F984AEF4 for ; Wed, 15 May 2024 05:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752660; cv=none; b=n9lO7olmienpLMy4Ig+OGNNYq+LuP5BTnX2EeUgj8bcIMY96kms0emDeliftKblZf3FW6kzkl6MOkoYNstrHofN9J9aIGf9eh86FNFe4x/FC4mcUeYs0gY3lMaDvS/8iyqd+zGsmLjdp90thFUDF6zRORJeNNru9PVTpACE3JtA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752660; c=relaxed/simple; bh=lc5Bcuya4k9VDqOmugl/UQAcSKJ85TOXE7/4aly3gXY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:Content-Type: MIME-Version:References; b=Qdb786G4m3R2r1Rm1+989mQcoMsDapLYBAAOhJ+/tZsEuCLXQntdTzWvzY/CqzfrO5GoPyNe3nTwUu+gZfds6bPNugyv5TueEn4Bg8MjNlCVX55H4eeZxX+ZUIgsmAnKrysb4PQwSYDcZV2cw27VNvAG03zVxHuk4sf1xLHb1As= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=V6X+pv4+; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240515055737euoutp01e48e7dfbb45be2a724329d40d08482c7~Pk-OVeVfJ2237822378euoutp01C for ; Wed, 15 May 2024 05:57:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240515055737euoutp01e48e7dfbb45be2a724329d40d08482c7~Pk-OVeVfJ2237822378euoutp01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1715752657; bh=UpgQNcs3t+vPhgTbp5qaltdkcX9R16oQVfuTuAdyYIA=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=V6X+pv4+/cBmEU8T11EPsFfVxs/5YtIbbio/GJliZS3fM7HMZwpBQft9a7HilFsIz /qDLPhHudz7k9wBLqS5fAM3LWbKlq6U0ooUrdtlKAtadGgKh1Xc9wvuCr2XSeVyU3b kNBG7nrP+x1JpjG799YNIHCZI4DtXMyNL35DxE68= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240515055732eucas1p21f818cb2496ee822433ed04389e46e34~Pk-Jf679M0594605946eucas1p2V; Wed, 15 May 2024 05:57:32 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A3.D8.09875.CCE44466; Wed, 15 May 2024 06:57:32 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240515055731eucas1p12cbbba88e24a011ef5871f90ff25ae73~Pk-IlqFp62570125701eucas1p1D; Wed, 15 May 2024 05:57:31 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240515055731eusmtrp1cf7b95a0a73627267d00f9d9cd74d1b4~Pk-IkvrDl0390703907eusmtrp19; Wed, 15 May 2024 05:57:31 +0000 (GMT) X-AuditID: cbfec7f4-11bff70000002693-e5-66444ecc2765 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B9.F1.09010.BCE44466; Wed, 15 May 2024 06:57:31 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240515055730eusmtip2f331ce6df1efce75d1c8a5633c334c55~Pk-IU51Z-1596015960eusmtip2N; Wed, 15 May 2024 05:57:30 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 May 2024 06:57:30 +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:30 +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 06/12] shmem: set folio uptodate when reclaim Thread-Topic: [PATCH 06/12] shmem: set folio uptodate when reclaim Thread-Index: AQHapozFha++cZmim0iVIxwtuJabGw== Date: Wed, 15 May 2024 05:57:29 +0000 Message-ID: <20240515055719.32577-7-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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIKsWRmVeSWpSXmKPExsWy7djPc7pn/FzSDBZP4rGYs34Nm8X/vccY LV4f/sRocemonMXZvt9sFl/X/2K2uPyEz+Lppz4Wi9nTm5ksLu+aw2Zxb81/Votdf3awW+x7 vZfZ4saEp4wWB091sFv8/gGU3b4r0kHQY+esu+weCzaVemxeoeWxaVUnm8emT5PYPU7M+M3i sfOhpcfkG8sZPT4+vcXi8X7fVTaPMwuOsHt83iQXwBPFZZOSmpNZllqkb5fAldG0JKVgBlvF 0mMv2RoY+1m7GDk5JARMJJpmPWDpYuTiEBJYwShx49E1KOcLo8TZnd/ZIJzPjBI/fr9khGm5 /2YzK0RiOaPEzgsTWeCquj92MUM4Zxgllq89ww7hrGSU2PjjPNhKNgFNiX0nN4ElRARuM0o8 PQVRxSx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OUX1qSqpCRX1xiqxRtaGGkZ2hp oWdkYqlnaGwea2VkqqRvZ5OSmpNZllqkb5egl9G0JKVgBlvF0mMv2RoY+1m7GDk5JARMJO6/ 2Qxkc3EICSxllOh/vo4dIiEjsfHLVagiYYk/17rYIIo+MkpcPXmTBcI5wyhx6scrqPaVjBJd C7+BtbMJaErsO7mJHSQhInCbUeLpqTNgDrPASVaJA6c/g1UJC9hKLD58EMwWEXCSOLlzG9Bc DiBbT+LPWjeQMIuAqsSH3hNsIDavgKXEr3+nwMqFgOxLr7YzgticAlYSd+d/BathFJCVeLTy F1gNs4C4xK0n85kgfhCQWLLnPDOELSrx8vE/qN90JM5ef8IIYRtIbF26jwXCVpZY/66NCWKO nsSNqVPYIGxtiWULXzND3CMocXLmE5YJjNKzkKybhaRlFpKWWUhaFjCyrGIUSS0tzk3PLTbS K07MLS7NS9dLzs/dxAhMd9uO/dyyg3Hlq496hxiZOBgPMUpwMCuJ8IqkOacJ8aYkVlalFuXH F5XmpBYfYjQFhtFEZinR5Hxgws0riTc0MzA1NDGzNDC1NDNWEuf1LOhIFBJITyxJzU5NLUgt gulj4uCUamAyP5nIsNs+Sk3q4tWcoqmO8rZzeZqnKJiwcKTWXSxTlzHmTdQ5NV99ptWzR90i mTrh10QfNq5kdNijvnb1/Inx2rlSfJMr31bUNpj/rbANFhD4/3hTwBxzh2S9R7+fWv+71a7y j/f6jA7ZbN8pdqsmSUtneD0NFNtutSahUGU257Jut4Z7wXfD3955fp138rKiUKv9Ez9Ld2du D9q0ircu/oxd11FtpdQySxvLr6uPshRyn781e0/e82ksX3N2BCswvj3/erX66y3FZ2fnzHtl L/G0LHvD+YRL2xzaHFr6fX2L1KYwMPhfb4np2llzK4n/1ad74f//H3twu+5oj23M4ps7TnPU rE37waKm06PEUpyRaKjFXFScCACpKEirAAQAAA== X-CMS-MailID: 20240515055731eucas1p12cbbba88e24a011ef5871f90ff25ae73 X-Msg-Generator: CA X-RootMTR: 20240515055731eucas1p12cbbba88e24a011ef5871f90ff25ae73 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240515055731eucas1p12cbbba88e24a011ef5871f90ff25ae73 References: <20240515055719.32577-1-da.gomez@samsung.com> When reclaiming some space by splitting a large folio through shmem_unused_huge_shrink(), a large folio is split regardless of its uptodate status. Mark all the blocks as uptodate in the reclaim path so split_folio() can release the folio private struct (shmem_folio_state). Signed-off-by: Daniel Gomez --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/shmem.c b/mm/shmem.c index 04992010225f..68fe769d91b1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -842,6 +842,7 @@ static unsigned long shmem_unused_huge_shrink(struct sh= mem_sb_info *sbinfo, goto move_back; } =20 + shmem_set_range_uptodate(folio, 0, folio_size(folio)); ret =3D split_folio(folio); folio_unlock(folio); folio_put(folio); --=20 2.43.0