public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation•org>
To: Usama Arif <usama.arif@linux•dev>
Cc: david@kernel•org, willy@infradead•org, ryan.roberts@arm•com,
	linux-mm@kvack•org, r@hev•cc, jack@suse•cz,
	Andrew Donnellan <andrew+kernel@donnellan•id.au>,
	apopple@nvidia•com, baohua@kernel•org,
	baolin.wang@linux•alibaba.com, brauner@kernel•org,
	catalin.marinas@arm•com, dev.jain@arm•com, kees@kernel•org,
	kevin.brodsky@arm•com, lance.yang@linux•dev,
	Liam R.Howlett <liam@infradead•org>,
	linux-arm-kernel@lists•infradead.org,
	linux-fsdevel@vger•kernel.org, linux-kernel@vger•kernel.org,
	ljs@kernel•org, mhocko@suse•com, npache@redhat•com,
	pasha.tatashin@soleen•com, rmclure@linux•ibm.com,
	rppt@kernel•org, surenb@google•com, vbabka@kernel•org,
	Al Viro <viro@zeniv•linux.org.uk>,
	wilts.infradead.org@hp2•hsd1.ca.comcast.net,
	"linux-fsdevel@vger.kernel.l"@kernel.org, ziy@nvidia•com,
	hannes@cmpxchg•org, kas@kernel•org, shakeel.butt@linux•dev,
	kernel-team@meta•com
Subject: Re: [PATCH v6 0/2] mm: improve large folio readahead for exec memory
Date: Thu, 28 May 2026 13:27:28 -0700	[thread overview]
Message-ID: <20260528132728.c47a38e7506483d587f64eb7@linux-foundation.org> (raw)
In-Reply-To: <20260528165635.2068012-1-usama.arif@linux.dev>

On Thu, 28 May 2026 09:55:18 -0700 Usama Arif <usama.arif@linux•dev> wrote:

> Two checks in do_sync_mmap_readahead() limit large-folio readahead:
> 
>   1. The mmap_miss heuristic is meant to throttle wasteful speculative
>      readahead. It is currently also applied to the VM_EXEC readahead
>      path, which is targeted rather than speculative. Once mmap_miss exceeds
>      MMAP_LOTSAMISS, exec readahead - including the large-folio
>      order requested by exec_folio_order() - is disabled. On
>      configurations where the mmap_miss decrement paths are not
>      active (see patch 1) the counter only grows, so exec readahead
>      is permanently disabled after the first 100 faults.
> 
>   2. The force_thp_readahead path is gated only on
>      HPAGE_PMD_ORDER <= MAX_PAGECACHE_ORDER and always drives the
>      readahead at HPAGE_PMD_ORDER. Configurations where
>      HPAGE_PMD_ORDER exceeds MAX_PAGECACHE_ORDER never reach this
>      path, even when the mapping itself supports usefully large
>      folios well below the cap.
> 
> Both issues are most visible on arm64 with a 64K base page size,
> where HPAGE_PMD_ORDER is 13 (512MB) -- above MAX_PAGECACHE_ORDER
> (11) -- and where fault_around_pages collapses to 1 disabling
> should_fault_around() (one of the two mmap_miss decrement sites).
> However the fixes are architecture-agnostic: patch 1 reflects the
> nature of VM_EXEC readahead regardless of base page size, and
> patch 2 generalises the gate so any mapping advertising a usefully
> large maximum folio order can benefit.

OK, thanks, it's getting late and [2/2] hasn't yet been reviewed.  I'll
add it, just, because I'm a sucker for speedups.



       reply	other threads:[~2026-05-28 21:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260528165635.2068012-1-usama.arif@linux.dev>
2026-05-28 20:27 ` Andrew Morton [this message]
     [not found] ` <20260528165635.2068012-2-usama.arif@linux.dev>
2026-05-29  9:47   ` [PATCH v6 1/2] mm: bypass mmap_miss heuristic for VM_EXEC readahead Pedro Falcato
     [not found] ` <20260528165635.2068012-3-usama.arif@linux.dev>
2026-05-29 10:01   ` [PATCH v6 2/2] mm: use mapping_max_folio_order() for force_thp_readahead order Pedro Falcato
2026-05-29 12:19     ` Usama Arif
2026-05-29 13:40       ` Pedro Falcato
2026-05-29 14:11         ` Usama Arif
2026-05-30 15:16           ` Jan Kara
2026-06-01  9:43             ` Usama Arif
2026-06-02 17:35             ` Pedro Falcato
2026-06-03 10:10               ` Usama Arif
2026-06-03 11:51                 ` Pedro Falcato
2026-06-02 17:46           ` Pedro Falcato
2026-05-29 12:36   ` Usama Arif

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260528132728.c47a38e7506483d587f64eb7@linux-foundation.org \
    --to=akpm@linux-foundation$(echo .)org \
    --cc="linux-fsdevel@vger.kernel.l"@kernel.org \
    --cc=andrew+kernel@donnellan$(echo .)id.au \
    --cc=apopple@nvidia$(echo .)com \
    --cc=baohua@kernel$(echo .)org \
    --cc=baolin.wang@linux$(echo .)alibaba.com \
    --cc=brauner@kernel$(echo .)org \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=david@kernel$(echo .)org \
    --cc=dev.jain@arm$(echo .)com \
    --cc=hannes@cmpxchg$(echo .)org \
    --cc=jack@suse$(echo .)cz \
    --cc=kas@kernel$(echo .)org \
    --cc=kees@kernel$(echo .)org \
    --cc=kernel-team@meta$(echo .)com \
    --cc=kevin.brodsky@arm$(echo .)com \
    --cc=lance.yang@linux$(echo .)dev \
    --cc=liam@infradead$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=ljs@kernel$(echo .)org \
    --cc=mhocko@suse$(echo .)com \
    --cc=npache@redhat$(echo .)com \
    --cc=pasha.tatashin@soleen$(echo .)com \
    --cc=r@hev$(echo .)cc \
    --cc=rmclure@linux$(echo .)ibm.com \
    --cc=rppt@kernel$(echo .)org \
    --cc=ryan.roberts@arm$(echo .)com \
    --cc=shakeel.butt@linux$(echo .)dev \
    --cc=surenb@google$(echo .)com \
    --cc=usama.arif@linux$(echo .)dev \
    --cc=vbabka@kernel$(echo .)org \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    --cc=willy@infradead$(echo .)org \
    --cc=wilts.infradead.org@hp2$(echo .)hsd1.ca.comcast.net \
    --cc=ziy@nvidia$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox