[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200928171321.GA59869@xz-x1>
Date: Mon, 28 Sep 2020 13:13:21 -0400
From: Peter Xu <peterx@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Leon Romanovsky <leonro@...dia.com>,
Jason Gunthorpe <jgg@...pe.ca>,
John Hubbard <jhubbard@...dia.com>,
Linux-MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jan Kara <jack@...e.cz>, Michal Hocko <mhocko@...e.com>,
Kirill Tkhai <ktkhai@...tuozzo.com>,
Kirill Shutemov <kirill@...temov.name>,
Hugh Dickins <hughd@...gle.com>,
Christoph Hellwig <hch@....de>,
Andrea Arcangeli <aarcange@...hat.com>,
Oleg Nesterov <oleg@...hat.com>, Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned
On Sun, Sep 27, 2020 at 11:16:34AM -0700, Linus Torvalds wrote:
> - split up the "copy page" into its own function kind of like I had
> done for my minimal patch
I didn't do that majorly because of the wrprotect() (of the fast-gup race) that
can potentially be kept if it's a normal cow. Maybe we'd add one more comment
above the caller of copy_present_page() (even if we have a "NOTE!" section
already inside the helper) since it'll change *src_pte and it's hard to notice
from the function name "copy_present_page()". Not that important, though.
Thanks for doing the changes. I went over the whole patch and it looks indeed
cleaner than before (I also didn't spot anything wrong either).
Regarding the other even rarer "hardware race on dirty/access bits" - maybe we
can simply set all these two bits always when page copy happens and we want to
recover the ptes? I also agree it's trivial enough, so that maybe we even
don't need to care about that.
--
Peter Xu
Powered by blists - more mailing lists