Re: [PATCH v3 1/2] mm: add per-order mTHP split counters

From: David Hildenbrand
Date: Fri Jul 05 2024 - 06:14:29 EST


On 05.07.24 12:12, Barry Song wrote:
On Fri, Jul 5, 2024 at 9:08 PM David Hildenbrand <david@xxxxxxxxxx> wrote:

@@ -3253,8 +3259,9 @@ int split_huge_page_to_list_to_order(struct page *page, struct list_head *list,
i_mmap_unlock_read(mapping);
out:
xas_destroy(&xas);
- if (is_thp)
+ if (order >= HPAGE_PMD_ORDER)

We likely should be using "== HPAGE_PMD_ORDER" here, to be safe for the
future.

I feel this might need to be separate since all other places are using
folio_test_pmd_mappable() ?

Likely, but as you are moving away from this ... this counter here does and will always only care about HPAGE_PMD_ORDER.

--
Cheers,

David / dhildenb