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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D65C5C3ABAC for ; Tue, 6 May 2025 11:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=O93la1WGyI+VnhBtkGgEAAHk/pmN1JFxqNXja/4wWOg=; b=rkgXrYdd3etXOUzif/1TvKbFJo dgMTL7R13LSLOiOy/HEfXQcwJK4bNsCvnPIuhltg1/0iBvz/Ax/irSnGCI+X5S05tGxJ6vNX+M0KS cDHlZYv2XeqkvuM9cIE2Vc45Q7wvyEcXXskr334/OImhgSSoCfNuymr04s+rcHRFWOviu0fK/js4E JdCgx1MngNngAsXQqDJi0vgm/byrvjqlS3CWeqjf8PH+9giVL/++xfgvmwdPpc8W3dpzr7N3s0Tpc ztKH5YW4ymhc5y1RIEOhA5QbRXt4yNjWSi2PxgZuRH+u5l7e4KJIJIEDhMnW7C0tLnLPVMIIW8yKH UHpsDG4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uCGr3-0000000Bo3f-2bXF; Tue, 06 May 2025 11:52:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uCFBD-0000000BVlR-0NXB for linux-arm-kernel@lists.infradead.org; Tue, 06 May 2025 10:05:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1D0B113E; Tue, 6 May 2025 03:05:28 -0700 (PDT) Received: from [10.57.93.118] (unknown [10.57.93.118]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 158083F5A1; Tue, 6 May 2025 03:05:35 -0700 (PDT) Message-ID: <2a90ec6c-1725-4c32-8819-c46e8c0e4630@arm.com> Date: Tue, 6 May 2025 11:05:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v4 0/5] Readahead tweaks for larger folios Content-Language: en-GB To: Andrew Morton , "Matthew Wilcox (Oracle)" , Alexander Viro , Christian Brauner , Jan Kara , David Hildenbrand , Dave Chinner , Catalin Marinas , Will Deacon , Kalesh Singh , Zi Yan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20250430145920.3748738-1-ryan.roberts@arm.com> From: Ryan Roberts In-Reply-To: <20250430145920.3748738-1-ryan.roberts@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250506_030539_256706_9C098B64 X-CRM114-Status: GOOD ( 21.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30/04/2025 15:59, Ryan Roberts wrote: > Hi All, > > This RFC series adds some tweaks to readahead so that it does a better job of > ramping up folio sizes as readahead extends further into the file. And it > additionally special-cases executable mappings to allow the arch to request a > preferred folio size for text. > > Previous versions of the series focussed on the latter part only (large folios > for text). See [3]. But after discussion with Matthew Wilcox last week, we > decided that we should really be fixing some of the unintended behaviours in how > a folio size is selected in general before special-casing for text. As a result > patches 1-4 make folio size selection behave more sanely, then patch 5 > introduces large folios for text. Patch 5 depends on patch 1, but does not > depend on patches 2-4. > > --- > > I'm leaving this marked as RFC for now as I intend to do more testing, and > haven't yet updated the benchmark results in patch 5 (although I expect them to > be similar). Thanks Jan, David and Anshuman for the reviews! I'll do the suggested changes and complete my testing, then aim to post again against -rc1, to hopefully get it into linux-next. Thanks, Ryan > > Applies on top of Monday's mm-unstable (b18dec6a6ad3) and passes all mm > kselftests. > > Changes since v3 [3] > ==================== > > - Added patchs 1-4 to do better job of ramping up folio order > - In patch 5: > - Confine readahead blocks to vma boundaries (per Kalesh) > - Rename arch_exec_folio_order() to exec_folio_order() (per Matthew) > - exec_folio_order() now returns unsigned int and defaults to order-0 > (per Matthew) > - readahead size is honoured (including when disabled) > > Changes since v2 [2] > ==================== > > - Rename arch_wants_exec_folio_order() to arch_exec_folio_order() (per Andrew) > - Fixed some typos (per Andrew) > > Changes since v1 [1] > ==================== > > - Remove "void" from arch_wants_exec_folio_order() macro args list > > [1] https://lore.kernel.org/linux-mm/20240111154106.3692206-1-ryan.roberts@arm.com/ > [2] https://lore.kernel.org/all/20240215154059.2863126-1-ryan.roberts@arm.com/ > [3] https://lore.kernel.org/linux-mm/20250327160700.1147155-1-ryan.roberts@arm.com/ > > Thanks, > Ryan > > Ryan Roberts (5): > mm/readahead: Honour new_order in page_cache_ra_order() > mm/readahead: Terminate async readahead on natural boundary > mm/readahead: Make space in struct file_ra_state > mm/readahead: Store folio order in struct file_ra_state > mm/filemap: Allow arch to request folio size for exec memory > > arch/arm64/include/asm/pgtable.h | 8 +++++ > include/linux/fs.h | 4 ++- > include/linux/pgtable.h | 11 +++++++ > mm/filemap.c | 55 ++++++++++++++++++++++++-------- > mm/internal.h | 3 +- > mm/readahead.c | 27 +++++++++------- > 6 files changed, 81 insertions(+), 27 deletions(-) > > -- > 2.43.0 >