Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6152475rdb; Mon, 18 Sep 2023 05:55:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEB4etflVTyxBNDC8aa4FhFYd7EZi5ir8JLBjPhEyDbt45bkfSk3qLmgIpuahv03sEmZoCF X-Received: by 2002:a05:6830:14d2:b0:6bc:952a:1032 with SMTP id t18-20020a05683014d200b006bc952a1032mr10859841otq.14.1695041735277; Mon, 18 Sep 2023 05:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695041735; cv=none; d=google.com; s=arc-20160816; b=DULH9r1dV+QHFkFKnPZkw3fZTDS2eirP1aNQkw4s/RvB5rwD3LJeklN3/GTFMRlWF4 XcSbPgqRVJSh9fUXYMwrrOBVvFquzo62my/BbuFu598mAnpMzEzOTcoSx2YwFE/jKeqy fzhQGLwSBdjioEGOrtWcB2wD8dPHyIBoz1KPzr9DGfHnbdquUWYAQjbN7WC7zxWqlY9d G/tcO6p0gj6cn24uDtzi77cO9tja51cw0SBJ8x64dahCO5/x4wprdRgpuoNaS6kFSZhR JfA9kYzNX3qZqjqGvAM9KiAaTvZfgehfpe51W9fU8N4I3BTAtjL/SfMqkAJQcIR7P1C5 k7gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:mime-version :content-transfer-encoding:content-id:content-language :accept-language:in-reply-to:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-filter; bh=dbgURMvRB5vglPwXNEinmDiIBwhTERpqxwujlCbmGpc=; fh=P8U8pOGZ8s8/fN4NMs790pQa4V8ss2Li6hh4jIdpSNg=; b=iD9qtUZDBm7UWoScOvDaSPZ0f32rh9dpqCEWWYq0rRkHuPO8aP78M0+EouVORFhmsP jQJ/fmcywmQ6V/D/shGq7rDkjLJkM4iNsgMb10y/qU7RAJNtDNPS5xtknHcLhDLiEJh8 QIK/+WTArq8gxya/1BRmrvoqA8ynxKkM8bLZF9L5UkkfzSXS6/Uc0ex2waQHzACkwKnX uNJhmGav5DvazijhDZ8Lqgm2maEKdUeZhI0waw2nHpumlazyG+qS/Z+VDRTHUTIU9KY4 nwlfpuAKUdwXFrGGalrDMK4I1OxOzmjLnUmThtmWkciwSTDLDqdmVJKntRv8j9++CtQu 3I/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rwf73w9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m9-20020a654389000000b005638355e989si7464762pgp.773.2023.09.18.05.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 05:55:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rwf73w9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 075C98029A29; Mon, 18 Sep 2023 00:34:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240368AbjIRHdh (ORCPT + 99 others); Mon, 18 Sep 2023 03:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240613AbjIRHd0 (ORCPT ); Mon, 18 Sep 2023 03:33:26 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C5FE50 for ; Mon, 18 Sep 2023 00:33:03 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230918073300euoutp026151c5e6341cdb8996356d0d5eaf537e~F7d-ZBoLj2801528015euoutp02z for ; Mon, 18 Sep 2023 07:33:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230918073300euoutp026151c5e6341cdb8996356d0d5eaf537e~F7d-ZBoLj2801528015euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1695022380; bh=dbgURMvRB5vglPwXNEinmDiIBwhTERpqxwujlCbmGpc=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=rwf73w9ncRjC3brjfD2715hl1hXTN9ifCUZWS6AqyxjK1saqp/dwicu0ASeLR8B9v M8ZAO9HxO0PODwhFOtBXAkg7xHFTwD+U3Tc/kZ5euqBdpJY35IahXFk91ADBGIuXVq GpcVCsPJrdp3OqBVb7PXSAHL1CgqA4BkLxv2gXbk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230918073300eucas1p1c9a31881336f26a495b69de4e7d0c071~F7d-DshJ-1309713097eucas1p1g; Mon, 18 Sep 2023 07:33:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 6E.9B.11320.B2DF7056; Mon, 18 Sep 2023 08:33:00 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230918073259eucas1p1cfcfbfd6a8c37c7cebd0b4734beffbc5~F7d_ue6-f0660306603eucas1p1s; Mon, 18 Sep 2023 07:32:59 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230918073259eusmtrp287fc632a8e38eea9a64656ffaf30256d~F7d_s7iJo3259532595eusmtrp2T; Mon, 18 Sep 2023 07:32:59 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-9b-6507fd2bc863 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 28.AB.10549.B2DF7056; Mon, 18 Sep 2023 08:32:59 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230918073259eusmtip2f600a41fd36323b49a478548a33828b6~F7d_frRyu1441814418eusmtip2j; Mon, 18 Sep 2023 07:32:59 +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; Mon, 18 Sep 2023 08:32:58 +0100 Received: from CAMSVWEXC02.scsc.local ([::1]) by CAMSVWEXC02.scsc.local ([fe80::3c08:6c51:fa0a:6384%13]) with mapi id 15.00.1497.012; Mon, 18 Sep 2023 08:32:58 +0100 From: Daniel Gomez To: David Hildenbrand , "minchan@kernel.org" , "senozhatsky@chromium.org" , "axboe@kernel.dk" , "djwong@kernel.org" , "willy@infradead.org" , "hughd@google.com" , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" CC: "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH 0/6] shmem: high order folios support in write path Thread-Topic: [PATCH 0/6] shmem: high order folios support in write path Thread-Index: AQHZ57ou5Qxd50H2CkCAi/G4rRLLzbAb8riAgAQxuQA= Date: Mon, 18 Sep 2023 07:32:57 +0000 Message-ID: <20230918073252.7nljdakmdk5kcpdt@sarkhan> In-Reply-To: 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.110.32.103] Content-Type: text/plain; charset="us-ascii" Content-ID: <7FB5FC383E12CC4DB148D262FACCE602@scsc.local> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUxTZxjd297eXmraXFoiT1icpmxjo7UI6naZylAxXlmWmOzHAppoxTvK N2utTmIMokamia2bASkkYCcgyCRcwRAsEIvCKh/tIAPGmA65bKSkdPIVPoTNcmvSf+d5znnP eU7yEkL5C1EYkZZ9itFnazOVuAR72LnUt1W9Kma2cU8QVVZfh1P3/jTh1Hz9spAa4GTUxMx1 jGodUVG2VgdGDbSU4dTzuv9EVMvrZjE1bJ5AVNW8V0w9arDi1MpiGR4vo0vzf8XoCtZIP7gb SQ/0Gmm29nucZmd+ENO/3FrBaG/bbzg9y753OChZsvskk5l2mtFHxR2X6LoW/kC5bPB3tjGH MB9dk11FQQSQO2D8ygS6iiSEnLyLwN3jFvPDHILfC6b9zCyC1qeV+Nsns51eEU9UI2ivuif2 EeuqzqWjPNGDoKD7J5wfahAU/tUq8qlw8mNoc7DrISFkhwicdYWYjxCSSVBkYtetFORBqC7o Qz4cQtLw+MZNEY8/g3+9JW80BIGRH8DiVK5vLSV3wkhpu8C3DiLj4M6Pp31rRG6ClzXLYt49 FEa4cgHfIBispTYhjzfCWsuYv5kaeoc4xONt0FTZhvFYCa8LbyPeRw0Vj2ZwHseCZ9Tl91dB 1e0pIX9OMDhKOMxXEchKCXDWm37TBPhn6I4/TAHurka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UvdohN4hK3nsxngvhAQGLJnvPMELaoxMvH /6A+05E4e/0J1McGEluX7mOBsJUk/nQsZISYoyOxYPcnNgjbUuLtnQtQ87Ulli18zQxxmqDE yZlPWCYwysxCsnoWkvZZSNpnIWmfhaR9ASPrKkaR1NLi3PTcYkO94sTc4tK8dL3k/NxNjMAU t+3Yz807GOe9+qh3iJGJg/EQowQHs5II70xDtlQh3pTEyqrUovz4otKc1OJDjKbAkJvILCWa nA9Msnkl8YZmBqaGJmaWBqaWZsZK4ryeBR2JQgLpiSWp2ampBalFMH1MHJxSDUw9R2977tHt u7zI1qvx3Dod3s2SM/lsLEM+1mcaNed3dUgfe/55c7jqN/v/L9Zl3hTb5PH7sWDhp8ur+8Vv TOPc4/FVQIH98plyFb1bXPdLLmr5XskWC5z/MdA4adGVHxb80i8/tHW6V7DNUnhVYrzmoUHj /1uyGx9fn3QiwensvRZPq3/ZR/rTDsbez/odtMArhTP/6N3Kz+lFFzfXR2RZfLr8sUm99Mez lX8eWd5982/+Br1TwbVLZe047t2IfrW6ZJ9b9hM2pu7Dz7NOl+65cHz7zI+HVT4G6X1gCHWc 4nnvdAD/B70rwhFpcyeHyBf+PDs9aU7/4n6LVdW5V1cvNcqyXXBa4H7xJrkyzuizSizFGYmG WsxFxYkAyQ+4L/oDAAA= X-CMS-MailID: 20230918073259eucas1p1cfcfbfd6a8c37c7cebd0b4734beffbc5 X-Msg-Generator: CA X-RootMTR: 20230915095123eucas1p2c23d8a8d910f5a8e9fd077dd9579ad0a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230915095123eucas1p2c23d8a8d910f5a8e9fd077dd9579ad0a References: <20230915095042.1320180-1-da.gomez@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 18 Sep 2023 00:34:33 -0700 (PDT) On Fri, Sep 15, 2023 at 05:29:51PM +0200, David Hildenbrand wrote: > On 15.09.23 11:51, Daniel Gomez wrote: > > This series add support for high order folios in shmem write > > path. > > > > This is a continuation of the shmem work from Luis here [1] > > following Matthew Wilcox's suggestion [2] regarding the path to take > > for the folio allocation order calculation. > > > > [1] RFC v2 add support for blocksize > PAGE_SIZE > > https://lore.kernel.org/all/ZHBowMEDfyrAAOWH@bombadil.infradead.org/T/#= md3e93ab46ce2ad9254e1eb54ffe71211988b5632 > > [2] https://lore.kernel.org/all/ZHD9zmIeNXICDaRJ@casper.infradead.org/ > > > > Patches have been tested and sent from next-230911. They do apply > > cleanly to the latest next-230914. > > > > fsx and fstests has been performed on tmpfs with noswap with the > > following results: > > - fsx: 2d test, 21,5B > > - fstests: Same result as baseline for next-230911 [3][4][5] > > > > [3] Baseline next-230911 failures are: generic/080 generic/126 > > generic/193 generic/633 generic/689 > > [4] fstests logs baseline: https://gitlab.com/-/snippets/3598621 > > [5] fstests logs patches: https://gitlab.com/-/snippets/3598628 > > > > There are at least 2 cases/topics to handle that I'd appreciate > > feedback. > > 1. With the new strategy, you might end up with a folio order matching > > HPAGE_PMD_ORDER. However, we won't respect the 'huge' flag anymore if > > THP is enabled. > > 2. When the above (1.) occurs, the code skips the huge path, so > > xa_find with hindex is skipped. > > Similar to large anon folios (but different to large non-shmem folios in = the > pagecache), this can result in memory waste. > > We discussed that topic in the last bi-weekly mm meeting, and also how to > eventually configure that for shmem. > > Refer to of a summary. [1] > > [1] https://lkml.kernel.org/r/4966f496-9f71-460c-b2ab-8661384ce626@arm.co= m Thanks for the summary David (I was missing linux-MM from kvack in lei). I think the PMD_ORDER-1 as max would suffice here to honor/respect the huge flag. Although, we would end up having a different max value than pagecache/readahead. > > -- > Cheers, > > David / dhildenb >=