[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200930133055.sdejarcv7nyhc2yc@box>
Date: Wed, 30 Sep 2020 16:30:55 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Peter Xu <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Jason Gunthorpe <jgg@...pe.ca>,
John Hubbard <jhubbard@...dia.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@....de>, Yang Shi <shy828301@...il.com>,
Oleg Nesterov <oleg@...hat.com>,
Kirill Tkhai <ktkhai@...tuozzo.com>,
Hugh Dickins <hughd@...gle.com>, Jann Horn <jannh@...gle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>, Jan Kara <jack@...e.cz>,
Andrea Arcangeli <aarcange@...hat.com>,
Leon Romanovsky <leonro@...dia.com>
Subject: Re: [PATCH v2 2/4] mm/fork: Pass new vma pointer into
copy_page_range()
On Fri, Sep 25, 2020 at 06:25:58PM -0400, Peter Xu wrote:
> This prepares for the future work to trigger early cow on pinned pages during
> fork(). No functional change intended.
>
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
> include/linux/mm.h | 2 +-
> kernel/fork.c | 2 +-
> mm/memory.c | 14 +++++++++-----
> 3 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index b2f370f0b420..ae914be004b3 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1646,7 +1646,7 @@ struct mmu_notifier_range;
> void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
> unsigned long end, unsigned long floor, unsigned long ceiling);
> int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
> - struct vm_area_struct *vma);
> + struct vm_area_struct *vma, struct vm_area_struct *new);
It makes dst/src mm_struct arguments redundant. There's always vma->vm_mm.
--
Kirill A. Shutemov
Powered by blists - more mailing lists