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 72B791427A for ; Tue, 2 Dec 2025 22:56:36 +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=1764716200; cv=none; b=RWNgpFhkGZn//yFVT3MGhTA8JivQnHULB37vf7ZuP8Mve5DIrAexUJ4y1N7adnCDwQLTeeUU0ca1ebFP4CGtM9UqPlykmC77CZh3RIRgmE5niDv8FtzVZpJ5zKEmDlHqlD/tgYo5UGBj5XgPv4dOyphAlc2+0fkg7+uJkaWttmk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764716200; c=relaxed/simple; bh=Nje28C08BnpYeSAXD1tdzWT0ZhZ7doMllmSooWR0rTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=emoAY5w5Thxgd1v4UOOk7XW8GoOFnKATCtG8v7rUqgCAYufqYMpdNAqpkOCT9b4jiZrw4e7XK3Zd/d1eH1vMP/89fbUkfTflGuHGxdb/70IiPYhcwh/TxBFBLcPt6NQkxARSxfywfgy4n8rQQNfT5RR4AXCQZx5iRUxhluH8IGs= 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=eGR1Ms5b; 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="eGR1Ms5b" 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=/gOBQqE/HyGqpgfqgim1hZAdMA8Tl09+44pTCSGAB7A=; b=eGR1Ms5bvq4eQIpTsJqVcmrbsR s6CfxzUISzPI4tVx6/cUxHWayuqHm3crBH0ilaQ8GehgOb5zUZu4CfoXpizymJOVr5Ifc1eGZ4+KD 7yJ++EdZnpwZkUAdXps40p/xitjdwv4kl/hbmoFoNix7IIvOsv3NO0GwU4yEVBdgt9ph2JQNBsJie gAF66dMBTQ8pZ1ZifgQgveYCDZevgeedk0Zi9MDIMRUfr5AOTEgz+JzuV3NC5gNv4OjS77UrggpmN gu8nWRugQSqCV4tA6V88rgrutCw75dV6+7BQIJiz3lVnZRmKepIZqErUu0zBjt/i4SnHOT1AomzOU m5kWT8oQ==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQZIP-00000001tG7-48Vi; Tue, 02 Dec 2025 22:56:34 +0000 Date: Tue, 2 Dec 2025 22:56:33 +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/3] mm/readahead: try to allocate high order pages for FADVISE_FAV_WILLNEED Message-ID: References: <20251202013212.964298-1-jaegeuk@kernel.org> <20251202013212.964298-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: <20251202013212.964298-4-jaegeuk@kernel.org> On Tue, Dec 02, 2025 at 01:30:13AM +0000, Jaegeuk Kim wrote: > @@ -627,7 +628,7 @@ void page_cache_sync_ra(struct readahead_control *ractl, > ra->size = min(contig_count + req_count, max_pages); > ra->async_size = 1; > readit: > - ra->order = 0; > + ra->order = mapping_max_folio_order(ractl->mapping); > ractl->_index = ra->start; > page_cache_ra_order(ractl, ra); > } I suspect this is in the wrong place, but I'm on holiday and not going to go spelunking through the readahead code looking for the right place. Also, going directly to max folio order is wrong, we should use the same approach as the write order code, encapsulated in filemap_get_order(). See 4f6617011910