OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 2/2] selftests/ve: check memory.numa_migrate keeps the folio order
Date: Wed, 28 Oct 2026 15:08:35 +0100	[thread overview]
Message-ID: <6fdfdb8c-fa29-45e9-9070-06b2e6f25a94@virtuozzo.com> (raw)
In-Reply-To: <179319176711.3675392.15233415613664788908.b4-review@b4>

On 10/28/26 13:49, Pavel Tikhomirov wrote:
>> memcg_numa_migrate_new_folio() used to allocate a PMD-sized destination
>> for every large folio. A page cache folio of a smaller order then ended
>> up with a 512-page destination carrying its index and reference count.
>> Only the source pages were copied into it, so a read of the folios that
>> followed in the same 2 MB range was served from the uninitialised part
>> of the destination, and the inode died in clear_inode() on eviction.
>>
>> The test writes a file on an XFS image, where 64K writes produce large
>> folios, from a cgroup bound to one NUMA node, migrates the cgroup to a
>> second node, checks that something was migrated and reads the file back
>> against the written pattern. On an unfixed kernel the comparison fails;
>> the test then leaves the image mounted, because unlinking or unmounting
>> would evict the inode and crash the node.
>>
>> It needs root, two NUMA nodes with memory (numa=fake=2 is enough),
>> cgroup2 with the memory and cpuset controllers, and mkfs.xfs, and skips
>> otherwise.
> 
> This case looks a bit implicit, we rely on the size of huge pages XFS
> allocates, maybe we can add folio size check, or somehow force
> allocation of proper order. This is not blocking I guess.

Agreed, v1 took the folio order on faith.
v2 will read the compound flags of the file's pages through
/proc/self/pagemap and /proc/kpageflags before the migration.

A file without a large folio fails the test, on purpose
a skip would hide that the test no longer reaches the bug,
while a failure tells us the XFS write path stopped giving large
folios on that setup and the test needs another way to get them.



_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-10-28 14:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:22 [Devel] [PATCH hci-8.1 0/2] mm/memcontrol: numa_migrate destinations of the source " Konstantin Khorenko
2026-10-28 12:22 ` [Devel] [PATCH hci-8.1 1/2] mm/memcontrol: allocate numa_migrate targets " Konstantin Khorenko
2026-10-28 12:26   ` no-reply
2026-10-28 13:09   ` Vasileios Almpanis
2026-10-28 14:14     ` Konstantin Khorenko
2026-10-28 12:22 ` [Devel] [PATCH hci-8.1 2/2] selftests/ve: check memory.numa_migrate keeps the " Konstantin Khorenko
2026-10-28 12:28   ` no-reply
2026-10-28 12:49   ` Pavel Tikhomirov
2026-10-28 14:08     ` Konstantin Khorenko [this message]
2026-10-28 13:09   ` Vasileios Almpanis
2026-10-28 14:12     ` Konstantin Khorenko
2026-10-28 12:49 ` [Devel] [PATCH hci-8.1 0/2] mm/memcontrol: numa_migrate destinations of the source " Pavel Tikhomirov
2026-10-28 13:09 ` Vasileios Almpanis

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=6fdfdb8c-fa29-45e9-9070-06b2e6f25a94@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=ptikhomirov@virtuozzo.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