et's enable the while loop such that it gets executed nr_iterations
> times. Simplify the code a bit as well.
>
> Reviewed-by: Sidhartha Kumar
> Signed-off-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/protection_keys.c | 4 +---
> 1 file changed, 1 inser
ftests/mm/split_huge_page_test.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
LGTM. Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
() with more
> precise check")
> Signed-off-by: David Hildenbrand
> ---
> tools/testing/selftests/mm/split_huge_page_test.c | 15 +++----
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
LGTM. Thanks for fixing it. Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
et's enable the while loop such that it gets executed nr_iterations
> times. Simplify the code a bit as well.
>
> Reviewed-by: Sidhartha Kumar
> Signed-off-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/protection_keys.c | 4 +---
> 1 file changed, 1 in
| 5 ++---
> tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 +-
> tools/testing/selftests/mm/split_huge_page_test.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
LGTM. Reviewed-by: Zi Yan
--
Best Regards,
Yan, Zi
On 20 Aug 2025, at 5:22, Baolin Wang wrote:
> On 2025/8/19 02:46, Zi Yan wrote:
>> The helper gathers a folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise folio order check instead
On 19 Aug 2025, at 12:50, Zi Yan wrote:
> On 19 Aug 2025, at 4:54, David Hildenbrand wrote:
>
>> On 18.08.25 20:46, Zi Yan wrote:
>>> and rename it to is_backed_by_folio().
>>>
>>> is_backed_by_folio() checks if the given vaddr is backed a folio with
On 19 Aug 2025, at 4:54, David Hildenbrand wrote:
> On 18.08.25 20:46, Zi Yan wrote:
>> and rename it to is_backed_by_folio().
>>
>> is_backed_by_folio() checks if the given vaddr is backed a folio with
>> a given order. It does so by:
>> 1. getting the pfn of the
the range being split multiple times due to debugfs split function always
perform splits with a pagesize step for a given range.
The following tests are not changed:
1. split_pte_mapped_thp: the test already uses kpageflags to check;
2. split_file_backed_thp: no vaddr available.
Signed-off-by: Zi
The helper gathers a folio order statistics of folios within a virtual
address range and checks it against a given order list. It aims to provide
a more precise folio order check instead of just checking the existence of
PMD folios.
The helper will be used the upcoming commit.
Signed-off-by: Zi
kpageflags of all tail pfns.
pmd_order is added to split_huge_page_test.c and replaces max_order.
Signed-off-by: Zi Yan
Reviewed-by: Wei Yang
Reviewed-by: wang lian
---
.../selftests/mm/split_huge_page_test.c | 88 ++-
tools/testing/selftests/mm/vm_util.c | 13 +++
tools
All functions are only used within the file.
Signed-off-by: Zi Yan
Reviewed-by: Wei Yang
Reviewed-by: wang lian
Acked-by: David Hildenbrand
---
.../selftests/mm/split_huge_page_test.c | 22 +--
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools
They are useful information for debugging split huge page tests.
Signed-off-by: Zi Yan
Reviewed-by: Wei Yang
Reviewed-by: Donet Tom
Reviewed-by: wang lian
Reviewed-by: Baolin Wang
Reviewed-by: Barry Song
Acked-by: David Hildenbrand
---
mm/huge_memory.c | 8
1 file changed, 4
rnel.org/linux-mm/20250815023915.1394655-1-...@nvidia.com/
[5]
Zi Yan (5):
mm/huge_memory: add new_order and offset to split_huge_pages*()
pr_debug.
selftests/mm: mark all functions static in split_huge_page_test.c
selftests/mm: reimplement is_backed_by_thp() with more precise
On 18 Aug 2025, at 4:33, David Hildenbrand wrote:
> On 15.08.25 04:39, Zi Yan wrote:
>> and rename it to is_backed_by_folio().
>>
>> is_backed_by_folio() checks if the given vaddr is backed a folio with
>> a given order. It does so by:
>> 1. getting the pfn of the
On 16 Aug 2025, at 3:30, Andrew Morton wrote:
> I hit a large reject. Can you please redo against next mm-new?
Sure.
--
Best Regards,
Yan, Zi
867c-31405cbba...@redhat.com/
[2] https://lore.kernel.org/linux-mm/20250806022045.342824-1-...@nvidia.com/
[3] https://lore.kernel.org/linux-mm/20250808190144.797076-1-...@nvidia.com/
[4] https://lore.kernel.org/linux-mm/20250812155512.926011-1-...@nvidia.com/
Zi Yan (5):
mm/huge_memory: add new_or
The helper gathers a folio order statistics of folios within a virtual
address range and checks it against a given order list. It aims to provide
a more precise folio order check instead of just checking the existence of
PMD folios.
The helper will be used the upcoming commit.
Signed-off-by: Zi
the range being split multiple times due to debugfs split function always
perform splits with a pagesize step for a given range.
The following tests are not changed:
1. split_pte_mapped_thp: the test already uses kpageflags to check;
2. split_file_backed_thp: no vaddr available.
Signed-off-by: Zi
kpageflags of all tail pfns.
pmd_order is added to split_huge_page_test.c and replaces max_order.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 90 ++-
tools/testing/selftests/mm/vm_util.c | 13 +++
tools/testing/selftests/mm/vm_util.h | 4
All functions are only used within the file.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 22 +--
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c
b/tools/testing/selftests/mm
They are useful information for debugging split huge page tests.
Signed-off-by: Zi Yan
Reviewed-by: Wei Yang
Reviewed-by: Donet Tom
Reviewed-by: wang lian
Reviewed-by: Baolin Wang
Reviewed-by: Barry Song
Acked-by: David Hildenbrand
---
mm/huge_memory.c | 8
1 file changed, 4
On 12 Aug 2025, at 23:38, wang lian wrote:
>> On Aug 12, 2025, at 23:55, Zi Yan wrote:
>>
>> The helper gathers an folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise fol
On 14 Aug 2025, at 5:16, Wei Yang wrote:
> On Tue, Aug 12, 2025 at 11:55:12AM -0400, Zi Yan wrote:
>> Instead of just checking the existence of PMD folios before and after folio
>> split tests, use check_folio_orders() to check after-split folio orders.
>>
>> The foll
On 13 Aug 2025, at 17:41, Wei Yang wrote:
> On Tue, Aug 12, 2025 at 11:55:11AM -0400, Zi Yan wrote:
>> and rename it to is_backed_by_folio().
>>
>> is_backed_by_folio() checks if the given vaddr is backed a folio with
>> a given order. It does so by:
>> 1. g
On 13 Aug 2025, at 17:12, Wei Yang wrote:
> On Tue, Aug 12, 2025 at 11:55:10AM -0400, Zi Yan wrote:
> [...]
>> +/*
>> + * gather_folio_orders - scan through [vaddr_start, len) and record folio
>> orders
>> + * @vaddr_start: start vaddr
>> + * @len: r
available.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 85 +--
1 file changed, 61 insertions(+), 24 deletions(-)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c
b/tools/testing/selftests/mm/split_huge_page_test.c
index 3aaf783f339f
kpageflags of all tail pfns.
pmd_order is added to split_huge_page_test.c and replaces max_order.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 67 +--
tools/testing/selftests/mm/vm_util.c | 2 +-
tools/testing/selftests/mm/vm_util.h | 1
ed variable length variables and used malloc instead.
[1]
https://lore.kernel.org/linux-mm/e2f32bdb-e4a4-447c-867c-31405cbba...@redhat.com/
[2] https://lore.kernel.org/linux-mm/20250806022045.342824-1-...@nvidia.com/
[3] https://lore.kernel.org/linux-mm/20250808190144.797076-1-...@nvidia.com/
The helper gathers an folio order statistics of folios within a virtual
address range and checks it against a given order list. It aims to provide
a more precise folio order check instead of just checking the existence of
PMD folios.
Signed-off-by: Zi Yan
---
.../selftests/mm
They are useful information for debugging split huge page tests.
Signed-off-by: Zi Yan
Reviewed-by: Wei Yang
Reviewed-by: Donet Tom
Reviewed-by: wang lian
Reviewed-by: Baolin Wang
Reviewed-by: Barry Song
Acked-by: David Hildenbrand
---
mm/huge_memory.c | 8
1 file changed, 4
On 11 Aug 2025, at 3:52, Baolin Wang wrote:
> On 2025/8/9 03:01, Zi Yan wrote:
>> The helper gathers an folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise folio order check instead
On 10 Aug 2025, at 12:49, Donet Tom wrote:
> On 8/9/25 12:31 AM, Zi Yan wrote:
>> The helper gathers an folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise folio order check instead
On 9 Aug 2025, at 16:18, Wei Yang wrote:
> On Fri, Aug 08, 2025 at 03:01:43PM -0400, Zi Yan wrote:
>> The helper gathers an folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise foli
On 10 Aug 2025, at 12:53, Donet Tom wrote:
> On 8/9/25 12:31 AM, Zi Yan wrote:
>> Instead of just checking the existence of PMD folios before and after folio
>> split tests, use check_folio_orders() to check after-split folio orders.
>>
>> The following
They are useful information for debugging split huge page tests.
Signed-off-by: Zi Yan
---
mm/huge_memory.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2b4ea5a2ce7d..ebf875928bac 100644
--- a/mm/huge_memory.c
+++ b/mm
available.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 98 ++-
1 file changed, 72 insertions(+), 26 deletions(-)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c
b/tools/testing/selftests/mm/split_huge_page_test.c
index 5ab488fab1cd
The helper gathers an folio order statistics of folios within a virtual
address range and checks it against a given order list. It aims to provide
a more precise folio order check instead of just checking the existence of
PMD folios.
Signed-off-by: Zi Yan
---
.../selftests/mm
linux-mm/20250806022045.342824-1-...@nvidia.com/
Zi Yan (3):
mm/huge_memory: add new_order and offset to split_huge_pages*()
pr_debug.
selftests/mm: add check_folio_orders() helper.
selftests/mm: check after-split folio orders in split_huge_page_test.
mm/huge_memory.c
On 8 Aug 2025, at 11:24, Zi Yan wrote:
> On 7 Aug 2025, at 23:15, Wei Yang wrote:
>
>> On Thu, Aug 07, 2025 at 01:05:09PM -0400, Zi Yan wrote:
>>> On 7 Aug 2025, at 4:55, Wei Yang wrote:
>>>
>>>> On Tue, Aug 05, 2025 at 10:20:43PM -0400, Zi Yan
On 7 Aug 2025, at 23:15, Wei Yang wrote:
> On Thu, Aug 07, 2025 at 01:05:09PM -0400, Zi Yan wrote:
>> On 7 Aug 2025, at 4:55, Wei Yang wrote:
>>
>>> On Tue, Aug 05, 2025 at 10:20:43PM -0400, Zi Yan wrote:
>>> [...]
>>>
On 7 Aug 2025, at 4:45, Wei Yang wrote:
> On Tue, Aug 05, 2025 at 10:20:43PM -0400, Zi Yan wrote:
>> Current behavior is to move to next PAGE_SIZE and split, but that makes it
>> hard to check after-split folio orders. This is a preparation patch to
>> allow more precise
On 7 Aug 2025, at 2:49, Baolin Wang wrote:
> On 2025/8/6 10:20, Zi Yan wrote:
>> The helper gathers an folio order statistics of folios within a virtual
>> address range and checks it against a given order list. It aims to provide
>> a more precise folio order check instead
On 7 Aug 2025, at 4:55, Wei Yang wrote:
> On Tue, Aug 05, 2025 at 10:20:43PM -0400, Zi Yan wrote:
> [...]
>>
>> -if (in_folio_offset < 0 ||
>> -in_folio_offset >= folio_nr_pages(folio)) {
>> +if (in_folio_offse
On 6 Aug 2025, at 23:00, wang lian wrote:
> Hi Zi,
>
> Thanks for the patch.
>
> I have a nit suggestion to centralize some of the macro definitions
> for better consistency and reusability.
>
> On [Date of patch], Zi Yan wrote:
>> diff --git a/tools/testing/self
On 6 Aug 2025, at 8:47, David Hildenbrand wrote:
> On 06.08.25 04:20, Zi Yan wrote:
>> Current behavior is to move to next PAGE_SIZE and split, but that makes it
>> hard to check after-split folio orders. This is a preparation patch to
>> allow more precise split_huge_
available.
Signed-off-by: Zi Yan
---
.../selftests/mm/split_huge_page_test.c | 67 +--
1 file changed, 46 insertions(+), 21 deletions(-)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c
b/tools/testing/selftests/mm/split_huge_page_test.c
index 3c761228e451
The helper gathers an folio order statistics of folios within a virtual
address range and checks it against a given order list. It aims to provide
a more precise folio order check instead of just checking the existence of
PMD folios.
Signed-off-by: Zi Yan
---
tools/testing/selftests/mm
on its current behavior.
Signed-off-by: Zi Yan
---
mm/huge_memory.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 8a11c2d402d4..b2ce8ac0c5a9 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -4341,6 +4341,7
They are useful information for debugging split huge page tests.
Signed-off-by: Zi Yan
---
mm/huge_memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2b4ea5a2ce7d..8a11c2d402d4 100644
--- a/mm/huge_memory.c
+++ b/mm
-867c-31405cbba...@redhat.com/
[2] https://lore.kernel.org/linux-mm/20250805175140.241656-1-...@nvidia.com/
Zi Yan (4):
mm/huge_memory: add new_order and offset to split_huge_pages*()
pr_debug.
mm/huge_memory: move to next folio after folio_split() succeeds.
selftests/mm: add check_folio_o
On 5 Aug 2025, at 15:00, Lorenzo Stoakes wrote:
> On Tue, Aug 05, 2025 at 01:51:40PM -0400, Zi Yan wrote:
>> FORCE_READ() converts input value x to its pointer type then reads from
>> address x. This is wrong. If x is a non-pointer, it would be caught it
>> easily. But all
On 5 Aug 2025, at 14:38, Jann Horn wrote:
> On Tue, Aug 5, 2025 at 7:51 PM Zi Yan wrote:
>> FORCE_READ() converts input value x to its pointer type then reads from
>> address x. This is wrong. If x is a non-pointer, it would be caught it
>> easily. But all FORCE_READ() calle
typed pointer. Almost no access violation was found, except the one from
split_huge_page_test.
Fix it by implementing a simplified READ_ONCE() instead.
Fixes: 3f6bfd4789a0 ("selftests/mm: reuse FORCE_READ to replace "asm
volatile("" : "+r" (XXX));"")
Signed-off
On 21 Jul 2025, at 7:46, wang lian wrote:
> Add tests for process_madvise(), focusing on verifying behavior under
> various conditions including valid usage and error cases.
>
> Signed-off-by: wang lian
> Suggested-by: Lorenzo Stoakes
> Suggested-by: David Hildenbrand
>
y: Ye Liu
> ---
> include/linux/mm.h| 9 +
> kernel/rcu/rcuscale.c | 2 +-
> kernel/sched/fair.c | 5 ++---
> mm/backing-dev.c | 2 +-
> mm/huge_memory.c | 2 +-
> mm/swap.c | 2 +-
> 6 files changed, 15 insertions(+), 7 deletions(-)
>
Thanks.
Acked-by: Zi Yan
--
Best Regards,
Yan, Zi
On 11 Jul 2025, at 9:29, David Hildenbrand wrote:
> On 09.07.25 03:27, Zi Yan wrote:
>> PID_FMT does not have an offset field, so folio_split() tests are not
>> performed. Add PID_FMT_OFFSET with an offset field and use it to perform
>> folio_split() tests.
>>
>>
On 10 Jul 2025, at 4:42, Mark Brown wrote:
> On Wed, Jul 09, 2025 at 10:46:07AM -0400, Zi Yan wrote:
>> On 9 Jul 2025, at 8:32, wang lian wrote:
>
>>> Thanks for testing the patch and reporting this build failure.
>>> I don't have an arm64 environment
On 10 Jul 2025, at 9:42, Mark Brown wrote:
> On Thu, Jul 10, 2025 at 07:22:49PM +0800, wang lian wrote:
>
>> Add tests for process_madvise(), focusing on verifying behavior under
>> various conditions including valid usage and error cases.
>
>> --- a/tools/testing/selftests/mm/guard-regions.c
>> +
On 9 Jul 2025, at 8:32, wang lian wrote:
> Hi Zi Yan,
> Thanks for testing the patch and reporting this build failure.
> I don't have an arm64 environment readily available for testing, so I
> appreciate you catching this. I suspect this is caused by missing or
> older user
PID_FMT does not have an offset field, so folio_split() tests are not
performed. Add PID_FMT_OFFSET with an offset field and use it to perform
folio_split() tests.
Fixes: 80a5c494c89f ("selftests/mm: add tests for folio_split(), buddy
allocator like split")
Signed-off-by: Zi Yan
On 3 Jul 2025, at 0:43, wang lian wrote:
> Add tests for process_madvise(), focusing on verifying behavior under
> various conditions including valid usage and error cases.
>
> Signed-off-by: wang lian
> Suggested-by: Lorenzo Stoakes
> Suggested-by: David Hildenbrand
> Acked-by: SeongJae Park
On 3 Jul 2025, at 10:44, Dev Jain wrote:
> On 03/07/25 8:11 pm, Zi Yan wrote:
>> On 3 Jul 2025, at 2:06, Aboorva Devarajan wrote:
>>
>>> From: Donet Tom
>>>
>>> PowerPC64 supports a 4PB virtual address space, but this test was
>>> previously l
break;
>
> Note that we have in tools/testing/selftests/mm/config
>
> CONFIG_USERFAULTFD=y
I added the same fix to guard-regions.c since I did not know the config
file existed.
And from git history, I learnt that I could use the command below to merge
these config to my local config:
“./scripts/kconfig/merge_config.sh .config tools/testing/selftests/xxx/config”
Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
29 thuge-gen ~ SKIP
>
> Signed-off-by: Aboorva Devarajan
> ---
> tools/testing/selftests/mm/thuge-gen.c | 11 +++
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
code to say PowerPC64 also
supports 4PB virtual address space?
>From the comment, arm64 supports 4PB but its NR_CHUNKS_HIGH is only 3840TB,
whereas PowerPC64 here can get to 3968TB. I do not know why arm64’s
4PB is smaller. ;)
Otherwise, the patch looks good to me.
Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
}
> hchunks = i;
It looks like it was a copy-paste error. Thank you for fixing it.
Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
t; split_thp_in_pagecache_to_order_at(fd_size, fs_loc, i, -1);
>
> - for (i = 0; i < 9; i++)
> + for (i = 0; i < max_order; i++)
> for (offset = 0;
>offset < pmd_pagesize / pagesize;
>offset += MAX(pmd_pagesize / pagesize / 4, 1 << i))
With the change to get_order() proposed by David and ksft_set_plan()
simplification, Reviewed-by: Zi Yan
Best Regards,
Yan, Zi
On 3 Jul 2025, at 4:58, Donet Tom wrote:
> On 7/3/25 1:52 PM, David Hildenbrand wrote:
>> On 03.07.25 08:06, Aboorva Devarajan wrote:
>>> From: Donet Tom
>>>
>>> The split_huge_page_test fails on systems with a 64KB base page size.
>>> This is because the order of a 2MB huge page is different:
>>
/testing/selftests/mm/run_vmtests.sh | 4
> 1 file changed, 4 insertions(+)
>
Acked-by: Zi Yan
Best Regards,
Yan, Zi
,
> usleep(TICK);
> }
>
> - madvise(p, nr_hpages * hpage_pmd_size, MADV_NOHUGEPAGE);
> -
> return timeout == -1;
> }
>
I assume you are going to just remove this madvise based on your discussion
with David. With that, feel free to add Reviewed-by: Zi Yan
Thanks.
Best Regards,
Yan, Zi
When running hugevm tests in a machine without kernel config present, e.g.,
a VM running a kernel without CONFIG_IKCONFIG_PROC nor /boot/config-*,
skip hugevm tests, which reads kernel config to get page table level
information.
Signed-off-by: Zi Yan
Acked-by: Lorenzo Stoakes
---
.../selftests
When userfaultfd is not compiled into kernel, userfaultfd() returns -1,
causing guard_regions.uffd tests to fail. Skip the tests instead.
Signed-off-by: Zi Yan
Reviewed-by: Lorenzo Stoakes
Reviewed-by: Pedro Falcato
---
tools/testing/selftests/mm/guard-regions.c | 17 +++--
1 file
Two guard_regions tests on userfaultfd fail when userfaultfd is not
present. Skip them instead.
hugevm test reads kernel config to get page table level information and
fails when neither /proc/config.gz nor /boot/config-* is present. Skip
it instead.
Zi Yan (2):
selftests/mm: skip
On 15 May 2025, at 14:49, Lorenzo Stoakes wrote:
> On Thu, May 15, 2025 at 02:46:41PM -0400, Zi Yan wrote:
>> On 15 May 2025, at 14:41, Lorenzo Stoakes wrote:
>>
>>> Ah you got to this first :) thanks!
>>>
>>> Could you do this with a cover letter thoug
n overview, thanks!
>
> On Thu, May 15, 2025 at 02:23:32PM -0400, Zi Yan wrote:
>> When userfaultfd is not compiled into kernel, userfaultfd() returns -1,
>> causing uffd tests in madv_guard fail. Skip the tests instead.
>
> 'madv_guard'? I'd just say the guard_re
When running hugevm tests in a machine without kernel config present, e.g.,
a VM running a kernel without CONFIG_IKCONFIG_PROC nor /boot/config-*,
skip hugevm tests, which reads kernel config to get page table level
information.
Signed-off-by: Zi Yan
---
.../selftests/mm/va_high_addr_switch.sh
When userfaultfd is not compiled into kernel, userfaultfd() returns -1,
causing uffd tests in madv_guard fail. Skip the tests instead.
Signed-off-by: Zi Yan
---
tools/testing/selftests/mm/guard-regions.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a
On 14 May 2025, at 15:51, David Hildenbrand wrote:
> Thanks a bucnh for the review!
>
>>> +
>>> + if (PageOffline(page) && PageOfflineSkippable(page))
>>> + continue;
>>> +
>>
>> Some comment like "Skippable PageOffline() pages are not migratable but are
>> skipped duri
e pages for memory offlining.
>*/
> - if ((flags & MEMORY_OFFLINE) && PageOffline(page))
> + if ((flags & MEMORY_OFFLINE) && PageOffline(page) &&
> + PageOfflineSkippable(page))
> continue;
With this change, we are no longer give non-virtio-mem driver a chance
to decrease PageOffline(page) refcount? Or virtio-mem is the only driver
doing this?
>
> if (__PageMovable(page) || PageLRU(page))
> @@ -577,11 +572,11 @@ __test_page_isolated_in_pageblock(unsigned long pfn,
> unsigned long end_pfn,
> /* A HWPoisoned page cannot be also PageBuddy */
> pfn++;
> else if ((flags & MEMORY_OFFLINE) && PageOffline(page) &&
> - !page_count(page))
> + PageOfflineSkippable(page))
The same question as above.
> /*
> - * The responsible driver agreed to skip PageOffline()
> - * pages when offlining memory by dropping its
> - * reference in MEM_GOING_OFFLINE.
> + * If the page is a skippable PageOffline() page,
> + * we can offline the memory block, as the driver will
> + * re-discover them when re-onlining the memory.
>*/
> pfn++;
> else
> --
> 2.49.0
Otherwise, LGTM. Acked-by: Zi Yan
--
Best Regards,
Yan, Zi
On 14 May 2025, at 13:28, David Hildenbrand wrote:
>>>
>>> Note that PageOffline() is a bit confusing because it's "Memory block
>>> online but page is logically offline (e.g., has a memmap that can be
>>> touched, but the page content should not be touched)".
>>
>> So PageOffline() is before me
On 14 May 2025, at 10:12, David Hildenbrand wrote:
> On 14.05.25 15:45, Zi Yan wrote:
>> On 14 May 2025, at 7:15, David Hildenbrand wrote:
>>
>>> This is a requirement for making PageOffline pages not have a refcount
>>> in the long future ("frozen"),
car Salvador
> Cc: Vlastimil Babka
> Cc: Suren Baghdasaryan
> Cc: Michal Hocko
> Cc: Brendan Jackman
> Cc: Johannes Weiner
> Cc: Zi Yan
> Cc: "Matthew Wilcox (Oracle)"
>
> David Hildenbrand (2):
> mm/memory_hotplug: PG_offline_skippable for off
On 10 Mar 2025, at 12:14, Zi Yan wrote:
> On 7 Mar 2025, at 12:39, Zi Yan wrote:
>
>> This is a preparation patch, both added functions are not used yet.
>>
>> The added __split_unmapped_folio() is able to split a folio with its
>> mapping removed in two manners:
On 10 Mar 2025, at 4:54, Hugh Dickins wrote:
> On Thu, 6 Mar 2025, Zi Yan wrote:
>> On 5 Mar 2025, at 17:38, Hugh Dickins wrote:
>>> On Wed, 5 Mar 2025, Zi Yan wrote:
>>>> On 5 Mar 2025, at 16:03, Hugh Dickins wrote:
>>>>>
>>>>> Beyon
On 10 Mar 2025, at 13:32, Zi Yan wrote:
> On 10 Mar 2025, at 12:14, Zi Yan wrote:
>
>> On 7 Mar 2025, at 12:39, Zi Yan wrote:
>>
>>> This is a preparation patch, both added functions are not used yet.
>>>
>>> The added __split_unmapped_folio() is able
On 10 Mar 2025, at 13:00, Matthew Wilcox wrote:
> On Mon, Mar 10, 2025 at 12:42:06PM -0400, Zi Yan wrote:
>>> Because of the “Careful” comment. But new_folio->* should be fine,
>>> since it is the same as new_head. So I probably can replace all
>>> new
On 10 Mar 2025, at 12:39, Zi Yan wrote:
> On 10 Mar 2025, at 12:30, Matthew Wilcox wrote:
>
>> On Fri, Mar 07, 2025 at 12:39:55PM -0500, Zi Yan wrote:
>>> + for (index = new_nr_pages; index < nr_pages; index += new_nr_pages) {
>>> +
f-f9a7-2853b5318...@google.com/
Cc: sta...@vger.kernel.org
Signed-off-by: Zi Yan
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 3d3ebdc002d5..373781b21e5c 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3304,7 +
On 10 Mar 2025, at 12:30, Matthew Wilcox wrote:
> On Fri, Mar 07, 2025 at 12:39:55PM -0500, Zi Yan wrote:
>> +for (index = new_nr_pages; index < nr_pages; index += new_nr_pages) {
>> +struct page *head = &folio->page;
>> +struc
On 7 Mar 2025, at 12:39, Zi Yan wrote:
> This is a preparation patch, both added functions are not used yet.
>
> The added __split_unmapped_folio() is able to split a folio with its
> mapping removed in two manners: 1) uniform split (the existing way), and
> 2) buddy allocat
Now split_huge_page_to_list_to_order() uses the new backend split code in
__split_unmapped_folio(), the old __split_huge_page() and
__split_huge_page_tail() can be removed.
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc
outside __folio_split() in the
following commit.
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc: Miaohe Lin
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu Zhao
Cc: Kairui Song
---
mm
It splits page cache folios to orders from 0 to 8 at different in-folio
offset.
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc: Miaohe Lin
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu
-...@nvidia.com
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc: Miaohe Lin
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu Zhao
Cc: Kairui Song
Signed-off-by: Andrew Morton
---
include
This allows to test folio_split() by specifying an additional in folio
page offset parameter to split_huge_page debugfs interface.
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc
-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc: Miaohe Lin
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu Zhao
Cc: Kairui Song
---
mm/huge_memory.c | 112
given page to one lower
order.
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Matthew Wilcox
Cc: Miaohe Lin
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu Zhao
Cc: Kairui Song
---
mm/huge_memory.c | 348
|
---
Signed-off-by: Zi Yan
Cc: Baolin Wang
Cc: David Hildenbrand
Cc: Hugh Dickins
Cc: John Hubbard
Cc: Kefeng Wang
Cc: Kirill A. Shuemov
Cc: Miaohe Lin
Cc: Matthew Wilcox
Cc: Ryan Roberts
Cc: Yang Shi
Cc: Yu Zhao
Cc: Zi Yan
Cc: Kairui Song
---
Documentation/core-api/xarray.rst | 14
/
[12]
https://lore.kernel.org/linux-mm/d45d4f01-e5a5-47e6-8724-01610cc19...@nvidia.com/
[13] https://lore.kernel.org/linux-mm/20250226210032.2044041-1-...@nvidia.com/
[14]
https://lore.kernel.org/linux-mm/2fae27fe-6e2e-3587-4b68-072118d80...@google.com/
[15] https://lore.kernel.org/all/202503031630
1 - 100 of 703 matches
Mail list logo