Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: dayou5941@163.com
Cc: akpm@linux-foundation.org, david@kernel.org, ziy@nvidia.com,
	 linux-mm@kvack.org, Li Youhong <liyouhong@kylinos.cn>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: Re: [PATCH] mm/huge_memory: add VM_WARN_ON_ONCE_FOLIO() in min_order_for_split()
Date: Thu, 6 Aug 2026 07:32:41 +0100	[thread overview]
Message-ID: <anQqEfCEbWmm5vX8@lucifer> (raw)
In-Reply-To: <20260806032116.681060-1-dayou5941@163.com>

Sigh. NAK.

This will trigger immediately.

You're sending this separate from the fix that makes this make any sense,
and I literally told you to send it as a single patch.

Please do what maintainers tell you to do.

I'm pretty convinced you're just doing unacknowledged AI slopping here
because you don't seem to have any understanding of the basics.

Again inclined to just do the patch myself on that basis...!

On Thu, Aug 06, 2026 at 11:21:16AM +0800, dayou5941@163.com wrote:
> From: Li Youhong <liyouhong@kylinos.cn>
>
> min_order_for_split() expects to be called with the folio locked,
> but does not enforce this itself. Add a VM_WARN_ON_ONCE_FOLIO()
> check to validate this assumption and document the locking requirement.
>
> Suggested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Signed-off-by: Li Youhong <liyouhong@kylinos.cn>
> ---
>  mm/huge_memory.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 58cabe6af33d..e3f16dadc1d4 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -4300,6 +4300,8 @@ int folio_split(struct folio *folio, unsigned int new_order,
>   */
>  unsigned int min_order_for_split(struct folio *folio)
>  {
> +	VM_WARN_ON_ONCE_FOLIO(!folio_test_locked(folio), folio);
> +
>  	if (folio_test_anon(folio))
>  		return 0;
>
> --
> 2.25.1
>

--
Cheers, Lorenzo


  reply	other threads:[~2026-08-06  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  3:21 [PATCH] mm/huge_memory: add VM_WARN_ON_ONCE_FOLIO() in min_order_for_split() dayou5941
2026-08-06  6:32 ` Lorenzo Stoakes (ARM) [this message]
2026-08-06  7:34   ` 李佑鸿 
2026-08-06  7:36     ` Lorenzo Stoakes (ARM)
2026-08-06 11:15       ` David Hildenbrand (Arm)

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=anQqEfCEbWmm5vX8@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=dayou5941@163.com \
    --cc=linux-mm@kvack.org \
    --cc=liyouhong@kylinos.cn \
    --cc=lorenzo.stoakes@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox