public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: "Oscar Salvador (SUSE)" <osalvador@kernel•org>
To: Usama Arif <usama.arif@linux•dev>
Cc: Andrew Morton <akpm@linux-foundation•org>,
	david@kernel•org, willy@infradead•org, ryan.roberts@arm•com,
	linux-mm@kvack•org, pfalcato@suse•de, 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>,
	ziy@nvidia•com, hannes@cmpxchg•org, kas@kernel•org,
	shakeel.butt@linux•dev, kernel-team@meta•com
Subject: Re: [PATCH v7 1/2] mm: bypass mmap_miss heuristic for VM_EXEC readahead
Date: Tue, 2 Jun 2026 05:51:03 +0200	[thread overview]
Message-ID: <ah5TJ8tNqcztGS4F@localhost.localdomain> (raw)
In-Reply-To: <20260601102205.3985788-2-usama.arif@linux.dev>

On Mon, Jun 01, 2026 at 03:21:17AM -0700, Usama Arif wrote:
> The mmap_miss heuristic is intended to stop speculative mmap readahead
> when a file looks like a random-access workload. That does not fit the
> VM_EXEC path very well.
> 
> VM_EXEC readahead is already constrained differently from ordinary mmap
> read-around: it is bounded by the VMA, uses exec_folio_order() to choose
> an order useful for executable mappings, and sets async_size to 0 so it
> does not create follow-on readahead. When VM_HUGEPAGE is also present,
> the larger readahead is an explicit userspace opt-in.
> 
> The mmap_miss counter is decremented from cache-hit paths in
> do_async_mmap_readahead() and filemap_map_pages(). Those paths are not
> always enough to balance the synchronous miss increments for executable
> mappings. In particular, when fault-around is effectively disabled, such
> as configurations where fault_around_pages is 1, filemap_map_pages() is
> not reached from the fault path. The counter can then become a stale
> throttle for VM_EXEC mappings and suppress the readahead behavior that
> the executable-specific path is trying to provide.
> 
> Skip both mmap_miss increments and decrements for VM_EXEC mappings,
> matching the existing VM_SEQ_READ treatment and keeping the counter
> accounting symmetric.
> 
> Signed-off-by: Usama Arif <usama.arif@linux•dev>
> Reviewed-by: Jan Kara <jack@suse•cz>
> Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel•org>

Reviewed-by: Oscar Salvador (SUSE) <osalvador@kernel•org>


-- 
Oscar Salvador
SUSE Labs


  reply	other threads:[~2026-06-02  3:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 10:21 [PATCH v7 0/2] mm: improve large folio readahead for exec memory Usama Arif
2026-06-01 10:21 ` [PATCH v7 1/2] mm: bypass mmap_miss heuristic for VM_EXEC readahead Usama Arif
2026-06-02  3:51   ` Oscar Salvador (SUSE) [this message]
2026-06-04 19:30   ` Pedro Falcato
2026-06-01 10:21 ` [PATCH v7 2/2] mm: use mapping_max_folio_order() for force_thp_readahead order Usama Arif
2026-06-01 16:22   ` Jan Kara
2026-06-04 19:33   ` Pedro Falcato
2026-06-01 23:10 ` [PATCH v7 0/2] mm: improve large folio readahead for exec memory Andrew Morton

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=ah5TJ8tNqcztGS4F@localhost.localdomain \
    --to=osalvador@kernel$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)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=pfalcato@suse$(echo .)de \
    --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=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