All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>,
	"David Hildenbrand" <david@kernel.org>, "Zi Yan" <ziy@nvidia.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Liam R. Howlett" <liam@infradead.org>,
	"Nico Pache" <nico.pache@linux.dev>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	"Dev Jain" <dev.jain@arm.com>, "Barry Song" <baohua@kernel.org>,
	"Lance Yang" <lance.yang@linux.dev>,
	"Usama Arif" <usama.arif@linux.dev>,
	"Kiryl Shutsemau" <kas@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH v3 3/3] mm/khugepaged: release contended mmap read lock after scanning enough VMAs
Date: Wed, 11 Nov 2026 17:19:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-209401@kernel.org> (raw)
In-Reply-To: <20261110-khugepaged-latency-fix-v3-3-6eea743cf9a3@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm/khugepaged: stale jiffies-based check description in commit
  message
--

commit bce7aeac77f8f4e7344a0f568e13d01a781dac5f
Author: Lorenzo Stoakes (ARM) <ljs@kernel.org>

mm/khugepaged: release contended mmap read lock after scanning enough VMAs

This commit drops and reacquires the mmap read lock in
collapse_scan_mm_slot() if the lock is contended after walking a batch of
1024 VMAs.

Link: https://lore.kernel.org/all/20261105-rwsem-dont-steal-from-queued-writer-v1-1-275e070f426f@kernel.org/

> Address this by checking whether the mmap lock is contended after 1-10
> ms (depending on CONFIG_HZ), i.e. the granularity of jiffies. This is a
> long time for a lock to be held, so is a reasonable compromise for
> determining when best to do this.

[Severity: Low]
Is this paragraph left over from an earlier jiffies-based version of the
patch?  The code checks mmap_lock_is_contended() every
KHUGEPAGED_MAX_VMA_SCAN_BATCH (1024) VMAs, as described in the following
paragraph, rather than using jiffies.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-khugepaged-latency-fix-v3-0-6eea743cf9a3@kernel.org?part=3


  parent reply	other threads:[~2026-11-11 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 17:19 [PATCH v3 0/3] mm/khugepaged: bound mmap_lock hold time when walking an mm's VMAs Lorenzo Stoakes (ARM)
2026-11-10 17:19 ` [PATCH v3 1/3] Revert "mm/khugepaged: remove definition of struct khugepaged_mm_slot" Lorenzo Stoakes (ARM)
2026-11-10 17:19 ` [PATCH v3 2/3] mm/khugepaged: scan mm's more efficiently under mmap_lock contention Lorenzo Stoakes (ARM)
2026-11-10 17:19 ` [PATCH v3 3/3] mm/khugepaged: release contended mmap read lock after scanning enough VMAs Lorenzo Stoakes (ARM)
2026-11-10 19:09   ` Lorenzo Stoakes (ARM)
2026-11-12  9:26     ` David Hildenbrand (Arm)
2026-11-12 10:55       ` Lorenzo Stoakes (ARM)
2026-11-11  9:27   ` David Hildenbrand (Arm)
2026-11-11  9:30     ` Lorenzo Stoakes (ARM)
2026-11-11 17:19   ` sashiko-bot [this message]
2026-11-12  9:39 ` [PATCH v3 0/3] mm/khugepaged: bound mmap_lock hold time when walking an mm's VMAs David Hildenbrand

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=sashiko-outbox-209401@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=kas@kernel.org \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=nico.pache@linux.dev \
    --cc=ryan.roberts@arm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=usama.arif@linux.dev \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.