[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210518194509.GF1002214@nvidia.com>
Date: Tue, 18 May 2021 16:45:09 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Peter Xu <peterx@...hat.com>
Cc: Alistair Popple <apopple@...dia.com>, linux-mm@...ck.org,
nouveau@...ts.freedesktop.org, bskeggs@...hat.com,
akpm@...ux-foundation.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
jhubbard@...dia.com, rcampbell@...dia.com, jglisse@...hat.com,
hch@...radead.org, daniel@...ll.ch, willy@...radead.org,
bsingharora@...il.com, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v8 5/8] mm: Device exclusive memory access
On Tue, May 18, 2021 at 02:01:36PM -0400, Peter Xu wrote:
> > > Indeed it'll be odd for a COW page since for COW page then it means after
> > > parent/child writting to the page it'll clone into two, then it's a mistery on
> > > which one will be the one that "exclusived owned" by the device..
> >
> > For COW pages it is like every other fork case.. We can't reliably
> > write-protect the device_exclusive page during fork so we must copy it
> > at fork time.
> >
> > Thus three reasonable choices:
> > - Copy to a new CPU page
> > - Migrate back to a CPU page and write protect it
> > - Copy to a new device exclusive page
>
> IMHO the ownership question would really help us to answer this one..
I'm confused about what device ownership you are talking about
It is just a page and it is tied to some specific pgmap?
If the thing providing the migration stuff goes away then all
device_exclusive pages should revert back to CPU pages and destroy the
pgmap?
Jason
Powered by blists - more mailing lists