mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Peng <zippermonkey@icloud.com>
To: david@kernel.org
Cc: akpm@linux-foundation.org, axelrasmussen@google.com,
	baohua@kernel.org, bruzzhang@tencent.com, hannes@cmpxchg.org,
	kasong@tencent.com, liam@infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, ljs@kernel.org,
	mhocko@kernel.org, mhocko@suse.com, qi.zheng@linux.dev,
	rppt@kernel.org, shakeel.butt@linux.dev, surenb@google.com,
	vbabka@kernel.org, weixugc@google.com, yuanchu@google.com,
	zippermonkey@icloud.com
Subject: Re: [PATCH v4 1/5] mm/vmscan: introduce folio_activate_locked() helper
Date: Mon, 29 Jun 2026 00:09:03 +0800	[thread overview]
Message-ID: <a0683d92-8a81-4e21-bbe8-a5f8af2c4933@icloud.com> (raw)
In-Reply-To: <8a8240ad-049f-4bf8-af65-d5bab2c19024@kernel.org>

On Wed, Jun 17, 2026 at 01:59:55PM +0200, David Hildenbrand wrote:
 > Passing nr_pages to this helper is rather questionable. Just use
 > folio_nr_pages(folio) here and make the function less weird.
 >
 > Do we want to add a
 >     VM_WARN_ON_ONCE_FOLIO(!folio_test_locked(folio), folio);
 >
 > While at it, do we want to turn this to a VM_WARN_ON_ONCE_FOLIO?
 > (and can we move that to the beginning of the function?)

Yep, all makes sense.  Will drop nr_pages, add the locked check at the
top, and switch the BUG_ON to WARN_ON_ONCE — panicking over a bogus
active flag is overkill.


  reply	other threads:[~2026-06-28 16:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 14:57 [PATCH v4 0/5] mm: batch TLB flushing for dirty folios in vmscan Zhang Peng
2026-05-25 14:57 ` [PATCH v4 1/5] mm/vmscan: introduce folio_activate_locked() helper Zhang Peng
2026-06-17 11:59   ` David Hildenbrand (Arm)
2026-06-28 16:09     ` Zhang Peng [this message]
2026-05-25 14:57 ` [PATCH v4 2/5] mm/vmscan: extract folio_free() from shrink_folio_list() Zhang Peng
2026-06-17 12:17   ` David Hildenbrand (Arm)
2026-06-17 12:24     ` David Hildenbrand (Arm)
2026-06-28 16:09     ` Zhang Peng
2026-05-25 14:57 ` [PATCH v4 3/5] mm/vmscan: extract pageout_one() " Zhang Peng
2026-06-17 12:19   ` David Hildenbrand (Arm)
2026-06-17 12:25     ` David Hildenbrand (Arm)
2026-06-28 16:10     ` Zhang Peng
2026-05-25 14:57 ` [PATCH v4 4/5] mm/vmscan: extract folio unmap logic into folio_try_unmap() Zhang Peng
2026-06-17 12:28   ` David Hildenbrand (Arm)
2026-06-28 16:10     ` Zhang Peng
2026-05-25 14:57 ` [PATCH v4 5/5] mm/vmscan: flush TLB for every 31 folios evictions Zhang Peng
2026-06-17 12:47   ` David Hildenbrand (Arm)
2026-06-28 16:11     ` Zhang Peng
2026-05-25 18:58 ` [PATCH v4 0/5] mm: batch TLB flushing for dirty folios in vmscan 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=a0683d92-8a81-4e21-bbe8-a5f8af2c4933@icloud.com \
    --to=zippermonkey@icloud.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=bruzzhang@tencent.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=qi.zheng@linux.dev \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®