linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jinjiang Tu <tujinjiang@huawei.com>,
	osalvador@suse.de, nao.horiguchi@gmail.com,
	zi.yan@cs.rutgers.edu, linux-mm@kvack.org,
	wangkefeng.wang@huawei.com, sunnanyong@huawei.com
Subject: Re: [PATCH] mm/memory_hotplug: fix call folio_test_large with tail page in do_migrate_range
Date: Tue, 1 Apr 2025 18:44:06 +0200	[thread overview]
Message-ID: <0a636dd6-3d19-4a3b-8645-21c7b85a4aff@redhat.com> (raw)
In-Reply-To: <20250328163700.82c9b426bf199102f3d90dcd@linux-foundation.org>

On 29.03.25 00:37, Andrew Morton wrote:
> On Tue, 25 Mar 2025 20:05:50 +0100 David Hildenbrand <david@redhat.com> wrote:
> 
>> On 25.03.25 04:02, Jinjiang Tu wrote:
>>>
>>>> Moving that will not make it able to skip the large frozen
>>>> (refcount==0, e.g., free hugetlb) folio in the continue/put_folio case
>>>> above. Hmmmm ..
>>> For free hugetlb, pfn is increased by 1 in each loop. This leads to skip
>>> free hugetlb slower.
>>
>> Yes. But now I realize that we have the same issue with free buddy pages
>> already (folio_try_get of each individual page :( ).
>>
>>>>
>>>> We could similarly to dumping folios, snapshot them, so we can read
>>>> stable data.
>>> extract the code in __dump_page()? But snapshot may lead to
>>> do_migrate_range() slower too.
>>
>> There is a patch series on the list to do that, but it might take a
>> while to clean that up. Ideally, we'd also jump over free buddy pages.
>> In the future we might have better ways to do that.
>>
>> I don't consider this change here really important, but if all it
>> affects is free hugetlb folios, it's not really worth it to have this
>> code around.
>>
>> Acked-by: David Hildenbrand <david@redhat.com>
>>
>> But: I suspect 8135d8926c08 is not the introducing commit. Please re-verify.
>>
>> We should not CC stable.
> 

Sorry for the late reply.

> Why shouldn't we cc:stable?  A userspace-triggerable BUG?

My reasoning was that it's a VM_BUG_ON_PAGE, and nothing is actually 
broken on !CONFIG_DEBUG_VM systems ... combined with hugetlb allocation 
and memory offlining usually being rare and usually privileged operations.

It would be a different story if the VM_BUG_ON_PAGE revealed an actual 
issue; but this is a well documented race.

One might argue that unplugging a DIMM could automatically trigger it 
(rare operation ..), and as we discovered in the meantime, THPs are also 
affected. But again, CONFIG_VM_DEBUG ... which even Fedora stopped setting.

So I don't think CC stable is warranted here, but I wouldn't object if 
there are good reasons to do it: like assuming that there are 
CONFIG_VM_DEBUG stable users out there that rely on these features.

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2025-04-01 16:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 13:17 Jinjiang Tu
2025-03-24 13:44 ` David Hildenbrand
2025-03-25  3:02   ` Jinjiang Tu
2025-03-25 13:18     ` Oscar Salvador
2025-03-25 19:05     ` David Hildenbrand
2025-03-26  2:40       ` Jinjiang Tu
2025-03-26 12:53         ` David Hildenbrand
2025-03-27 11:19           ` Jinjiang Tu
2025-03-28 23:37       ` Andrew Morton
2025-04-01 16:44         ` David Hildenbrand [this message]
2025-04-07  1:59           ` Andrew Morton
2025-04-07  7:07             ` David Hildenbrand
2025-03-28 13:23 ` Oscar Salvador

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=0a636dd6-3d19-4a3b-8645-21c7b85a4aff@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=sunnanyong@huawei.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=zi.yan@cs.rutgers.edu \
    /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