[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240823223559.942b53cea16d5cfc6b70bf2d@linux-foundation.org>
Date: Fri, 23 Aug 2024 22:35:59 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Zhiguo Jiang <justinjiang@...o.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
oe-lkp@...ts.linux.dev, lkp@...el.com, opensource.kernel@...o.com
Subject: Re: [PATCH v2] vma remove the unneeded avc bound with non-CoWed
folio
On Fri, 23 Aug 2024 23:02:06 +0800 Zhiguo Jiang <justinjiang@...o.com> wrote:
> After CoWed by do_wp_page, the vma established a new mapping relationship
> with the CoWed folio instead of the non-CoWed folio. However, regarding
> the situation where vma->anon_vma and the non-CoWed folio's anon_vma are
> not same, the avc binding relationship between them will no longer be
> needed, so it is issue for the avc binding relationship still existing
> between them.
>
> This patch will remove the avc binding relationship between vma and the
> non-CoWed folio's anon_vma, which each has their own independent
> anon_vma. It can also alleviates rmap overhead simultaneously.
I assume any performance benefits are unmeasurable?
I'll queue it for testing and shall await reviewer input.
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1522,6 +1522,59 @@ void folio_add_file_rmap_pmd(struct folio *folio, struct page *page,
> #endif
> }
>
> +/**
> + * folio_remove_anon_avc - remove the avc binding relationship between
> + * folio and vma with different anon_vmas.
> + * @folio: The folio with anon_vma to remove the binded avc from
> + * @vma: The vm area to remove the binded avc with folio's anon_vma
> + *
> + * The caller is currently used for CoWed scene.
> + */
> +void folio_remove_anon_avc(struct folio *folio,
> + struct vm_area_struct *vma)
> +{
>
> ...
>
In mm-unstable a lot of vma functions have been moved into the new file
mm/vma.c. I suspect folio_remove_anon_avc() should be there also?
Powered by blists - more mailing lists