Re: [RFC V2] mm: add the zero case to page[1].compound_nr in set_compound_order

From: Mike Kravetz
Date: Tue Dec 13 2022 - 20:02:56 EST


On 12/13/22 17:27, Nico Pache wrote:
> According to the document linked the following approach is even faster
> than the one I used due to CPU parallelization:

I do not think we are very concerned with speed here. This routine is being
called in the creation of compound pages, and in the case of hugetlb the
tear down of gigantic pages. In general, creation and tear down of gigantic
pages happens infrequently. Usually only at system/application startup and
system/application shutdown.

I think the only case where we 'might' be concerned with speed is in the
creation of compound pages for THP. Do note that this code path is
still using set_compound_order as it has not been converted to folios.
--
Mike Kravetz