Re: [PATCH v2 01/14] mm: Batch-copy PTE ranges during fork()

Christophe Leroy
2023-12-04T11:20:12Z

Le 15/11/2023 à 22:37, Andrew Morton a écrit :
> On Wed, 15 Nov 2023 16:30:05 +0000 Ryan Roberts <ryan.roberts@arm.com> wrote:
>
>> However, the primary motivation for this change is to reduce the number
>> of tlb maintenance operations that the arm64 backend has to perform
>> during fork
>
> Do you have a feeling for how much performance improved due to this?
>
> Are there other architectures which might similarly benefit? By
> implementing ptep_set_wrprotects(), it appears. If so, what sort of
> gains might they see?
>

I think powerpc 8xx would benefit.

We have 16k hugepages which are implemented with 4 identical PTE which
have the _PAGE_SPS bit set. _PAGE_SPS says it is a 16k page.

We have 512k hugepages which are implemented with 128 identical PTE
which have _PAGE_HUGE bit set. _PAGE_HUGE tells it is a 512k page.

FWIW, PMD size is 4M and there is no 4M page size so no way to implement
leaf PMD huge pages.

Christophe