From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 DE7AD1C84C0 for ; Mon, 1 Dec 2025 21:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764625123; cv=none; b=E9Znwl54tEgDJcDLbffNNlibe6uXqv9tw5kAh1Z7j2bEAdzrEHPcPkc3LGAqRb02iha/9yb+YG7KK++w0myp0PQkYfsZEIr1jVJ7Gmu9mqX1I6xRff476hiLIOYVAjiGkL60Ih//Z6yk03VICJRb7Hw6EbaLg3lW8pY8CYOs8F0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764625123; c=relaxed/simple; bh=rjTuSgvIc2QN5iTWkf8zmK3eFqt8ucrdtGgJQdGwxQ0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IeE6jS0Ij89svswuTsPnN6JOqBk1/YN7mbjomG3JrqgVy9jffgfpr1EYW6a2mDehMEmRb5G6DT1aCtXFAzcv5GgLaZEXkxuMT/67G6KK38DMSTKqmBHTyyKMtmt0PgvhZK3pN2/AjpV6PSIr4HvVAYiCCTgQnExpjhhe+bjBzq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=BScuargN; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BScuargN" 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=IC+JbYTz4wUsAbVSDTKYVEaA4vy5MxR+ihBKqV1SwpY=; b=BScuargNrc58wdjz1s1pvVAF3f S7Z44Udh/Va6F/2fFBtK4irt8nS9jqp8otvn9ZEKOpAhQlLPwza4nL/P5OgJYQYJfhU33qBVR6Ift 4Mf/Ic+H0/RxqD5wyCLW8INkT3UPhBjjvtd0Byn2sOEqsSsnPcZb88XM9fG2MvCU0a0fNW09KhIkA 52YVC8klo6DfOr2cVomZf7kuvhNfS0dFfDQxairGo0Kgngptz1+GDkbcCGIispYlaA8BRAbHeIHMz cATdI15rflahY9IvrEcDxtFP4Vr7kD8dp/RXsJXQjEZVTxnyKrYqC4gbMsYZ1oC3mRFjN5QltrrTI oJSCju8w==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQBbT-00000000GWw-0WWk; Mon, 01 Dec 2025 21:38:39 +0000 Date: Mon, 1 Dec 2025 21:38:38 +0000 From: Matthew Wilcox To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org Subject: Re: [PATCH 3/4] mm/readahead: add a_ops->ra_folio_order to get a desired folio order Message-ID: References: <20251201210152.909339-1-jaegeuk@kernel.org> <20251201210152.909339-4-jaegeuk@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Dec 01, 2025 at 09:24:41PM +0000, Jaegeuk Kim wrote: > On 12/01, Matthew Wilcox wrote: > > On Mon, Dec 01, 2025 at 09:01:26PM +0000, Jaegeuk Kim wrote: > > > This patch introduces a new address operation, a_ops->ra_folio_order(), which > > > proposes a new folio order based on the adjusted order for page_cache_sync_ra. > > > > > > Hence, each filesystem can set the desired minimum order of folio allocation > > > when requesting fadvise(POSIX_FADV_WILLNEED). > > > > Again, you've said what but not why. Does the mm code not ramp up the > > folio order sufficiently quickly? What are you trying to accomplish? > > That's why I posted a series of the patches to provide more details. Could you > please check the last patch in the series to show fadvise() does not increase > the folio order? > > https://lore.kernel.org/linux-f2fs-devel/20251201210152.909339-5-jaegeuk@kernel.org/T/#u So what you're trying to say is that readahead() currently only uses order-0 pages and you want it to use larger order pages? I agree with that! But I don't think this is the way to do it. We should just use larger order allocations, always. None of this "call the filesystem, check a sysfs parameter". Just use the largest order page that fits.