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

From: Christophe Leroy
Date: Mon Dec 04 2023 - 06:20:12 EST




Le 15/11/2023 à 22:37, Andrew Morton a écrit :
On Wed, 15 Nov 2023 16:30:05 +0000 Ryan Roberts <ryan.roberts@xxxxxxx> 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