From mboxrd@z Thu Jan 1 00:00:00 1970 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 A67F9C48BC1 for ; Wed, 14 Feb 2024 19:00:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D7548D0012; Wed, 14 Feb 2024 14:00:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 186268D0001; Wed, 14 Feb 2024 14:00:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0779F8D0012; Wed, 14 Feb 2024 14:00:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EC9628D0001 for ; Wed, 14 Feb 2024 14:00:14 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BA529120E0B for ; Wed, 14 Feb 2024 19:00:14 +0000 (UTC) X-FDA: 81791324748.05.E86BAE9 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP id 2146C1C0030 for ; Wed, 14 Feb 2024 19:00:12 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rnKVOBoV; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707937213; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=foFpJZ54BtuTBxARzlxsAzGeWzKOUcYpxd8wVsdim80=; b=6Dwio+AgFa254HHfCRqudRpvMalyVmTNKlY3aDZzqH57aW2V05G8RwBmrTYMtmPUVORCna 5K5NyAr8a5+X5an1wREpWTPiiC+MBb6uEYTygKRxcgCGdB9Jlg1f31lQx0IFSc9e6M8KB/ 7zR6x+dzKYI4fsPf2BGEKBmBGFb4mWQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707937213; a=rsa-sha256; cv=none; b=0D2hBE+SihfSKzp5aHd0iM6yamwt26G42KPHWDesUGiBmmIXAPP2hfbcmiZLTVHo7URoGn tWNGPBN9sEoC+Va5woOztNZRik5pH+9RKPNv0ieJ1OmPOq8Cpw6ieCDo9U8TB+aiMb3iNw O+TiuhgV8G7qfBB3LGbbvug+uBpHo5I= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rnKVOBoV; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=foFpJZ54BtuTBxARzlxsAzGeWzKOUcYpxd8wVsdim80=; b=rnKVOBoVsKHPVo9eorBDHNjwb1 EcBJGnPvXMtjFIbHfea3Ga6ZHoG5SkT5KlUzJVQUFepY4phy/SvafFD35XeDH6Ctq9MHWar+cKcVa EQMlXBgs8QO1ORaGVw9ShO8ydsuceXqkAs57A2+b+YBnIiUFiMJ3/ga7+2sZ3lOlD8H8DNibwnzB5 mQZApnvIkELdtV2Rx+ZPi8ZxNhhUNVQt/pl+DbAmAh1XiKa0Ox7JNgORj77D1q35Kk/7femrVqfg7 PjE9sSzYHtRqZr8LA+dmMu9o/WGPpiLCXszW0TGV56lDa5nQs9XYFc68RmdhsdPH9jNcM82eHZJCA wUGm2WHQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1raKUH-0000000HLkn-3GS2; Wed, 14 Feb 2024 19:00:06 +0000 Date: Wed, 14 Feb 2024 19:00:05 +0000 From: Matthew Wilcox To: "Darrick J. Wong" Cc: "Pankaj Raghav (Samsung)" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, gost.dev@samsung.com, akpm@linux-foundation.org, kbusch@kernel.org, chandan.babu@oracle.com, p.raghav@samsung.com, linux-kernel@vger.kernel.org, hare@suse.de, linux-mm@kvack.org, david@fromorbit.com Subject: Re: [RFC v2 01/14] fs: Allow fine-grained control of folio sizes Message-ID: References: <20240213093713.1753368-1-kernel@pankajraghav.com> <20240213093713.1753368-2-kernel@pankajraghav.com> <20240213163431.GS6184@frogsfrogsfrogs> <20240213212914.GW616564@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240213212914.GW616564@frogsfrogsfrogs> X-Stat-Signature: g8t3i4fscip554msbh66mkuf7br1ay3d X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2146C1C0030 X-Rspam-User: X-HE-Tag: 1707937212-810417 X-HE-Meta: U2FsdGVkX18uhF5tZiW4NXvhjHy4oBsGoznORwjaqlJ/5oB0+mUtCN+kgRD09olkGmQ2hZ00A4f7nvXpi7qiwpwkUH9ihXGs9uTrtj2v24YUk/9LxpDBhOO0aypi0L57sRbH2ML8iyzQWLJf8i2+meZT5KM0QQInYWiH+lec9GFatJjK6nIeyOQs4vkcdwVri27jqplvqGCOxRYYAU7Fpa7Of7ZDPenxuJWeAarELR06xtNC4Mhs7xSWhRbQUfWlBahZS1sLObVmJQ7FPhDF3BLUPW6c+MayxpBLw7stTggW0zkgzbHUiCURje+corU4j/esU0ah9XusL/g2pZcO7QGRBgofqCERzaxSZdtSPSRmDpDg9Sd5rEU4QU8HUcM0zF7wa8LJXZPEz/2sKcCXKuaF2J7jibZVB7C/kAhlCU2kvRccwQecQLfe7gBd5FbWkQucYoZtj06mRE2fkppQxBT1dE0250V73FbgCRehcppcT4jW6xWLodoG/9wcNV/5fASHDcBdmEW9uUM2IOKQ3USUsyAKpU1rUFz4PgDaCVXaTuoQJrUtMP+W262WpjtD2cT4Hu7Q9EwOXWhU6CPAexiMVHLiKj2RKlq6wXxxtW60ndu44qTQlC5/fUTei4YWTSNUlmx6gvnK/pb2DCweXJWTwTbWUULIxnZAjocMnfzok+uuifl666wmTlSfSZHp6cmDf5S3ilq8f2zRvirWDGLSYX0PKqs8vyCrstViMBKtgiTb5R9DcwiIxQvxnblpkp7slNm8Oy8AnTe9RHP7lOVPU0NeTkMbZjaCkxVPvQywsjo6NQLqDCGwqPhJuHM+9hlkU4D5PJ1PT05Cy/ieHqSYEZE2NUjIxv6QumTSiAbzaqbAva50WHKC4W3/kPZnJGm6tl7qEWj7i/510YasXPBoVW5d2MIhyhbXgCCUG9zoAeXerZLhVskKX2ZuyUaFeQCRVNp8ZaTZj+d1opM lt5IpncJ CCNdXIdTH2FCMko2GlNd2w+nw7AN/0H+cwHVfrGTV6yFPdZo6KBoZZoV9wi5iY28VXM30bjxhTVfhHQfHiqqO7lRIJUhET9g8o/8lnL2HMaNhe5r5CqvwKXGS8bfpBDFJPCNBq47+mIOy8EzhPfkbodub2wNO44ZwJIUknK5S7rTKU//nL+7X2oFHfXN0xKU8FhPV 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: On Tue, Feb 13, 2024 at 01:29:14PM -0800, Darrick J. Wong wrote: > On Tue, Feb 13, 2024 at 10:05:54PM +0100, Pankaj Raghav (Samsung) wrote: > > On Tue, Feb 13, 2024 at 08:34:31AM -0800, Darrick J. Wong wrote: > > > On Tue, Feb 13, 2024 at 10:37:00AM +0100, Pankaj Raghav (Samsung) wrote: > > > > From: "Matthew Wilcox (Oracle)" > > > > > > > > Some filesystems want to be able to limit the maximum size of folios, > > > > and some want to be able to ensure that folios are at least a certain > > > > size. Add mapping_set_folio_orders() to allow this level of control. > > > > The max folio order parameter is ignored and it is always set to > > > > MAX_PAGECACHE_ORDER. > > > > > > Why? If MAX_PAGECACHE_ORDER is 8 and I instead pass in max==3, I'm > > > going to be surprised by my constraint being ignored. Maybe I said that > > > because I'm not prepared to handle an order-7 folio; or some customer > > > will have some weird desire to twist this knob to make their workflow > > > faster. > > > > > > --D > > Maybe I should have been explicit. We are planning to add support > > for min order in the first round, and we want to add support for max order > > once the min order support is upstreamed. It was done mainly to reduce > > the scope and testing of this series. > > > > I definitely agree there are usecases for setting the max order. It is > > also the feedback we got from LPC. > > > > So one idea would be not to expose max option until we add the support > > for max order? So filesystems can only set the min_order with the > > initial support? > > Yeah, there's really no point in having an argument that's deliberately > ignored. I favour introducing the right APIs even if they're not fully implemented. We have no filesystems today that need this, so it doesn't need to be implemented, but if we have to go back and add it, it's more churn for every filesystem. I'm open to better ideas about the API; I think for a lot of filesystems they only want to set the minimum, so maybe introducing that API now would be a good thing.