[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a4d4992-4c8a-43b9-8c41-a938bc3cec67@redhat.com>
Date: Mon, 13 May 2024 17:37:47 +0200
From: David Hildenbrand <david@...hat.com>
To: Chen Taotao <chentt10@...natelecom.cn>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/rmap: optimize folio_move_anon_rmap()
On 12.05.24 14:35, Chen Taotao wrote:
> When a folio belongs exclusively to one process after a COW event,
> folio_move_anon_rmap() always moves the folio into the anon_vma
> belongs only to this process.
>
> However, if the folio already belongs to the anon_vma of the this
> process, we don't need to move it again. In this case, we first
> check if the folio already belongs to the anna_vma of the this
> process, and only move it if it does not.
>
> The above changes may improve the performance of vm faults in some
> scenarios, because the performance loss caused by WRITE_ONCE() is
> much more than the performance loss caused by add a judgment.
Please proof that by real numbers. I don't think it will make a real
difference, and we likely don't want that change.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists