[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <beb38138-2266-1ff8-cc82-8fe914bed862@redhat.com>
Date: Fri, 11 Feb 2022 17:15:25 +0100
From: David Hildenbrand <david@...hat.com>
To: Alex Sierra <alex.sierra@....com>, akpm@...ux-foundation.org,
Felix.Kuehling@....com, linux-mm@...ck.org, rcampbell@...dia.com,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
hch@....de, jgg@...dia.com, jglisse@...hat.com, apopple@...dia.com,
willy@...radead.org
Subject: Re: [PATCH v6 01/10] mm: add zone device coherent type memory support
On 01.02.22 16:48, Alex Sierra wrote:
> Device memory that is cache coherent from device and CPU point of view.
> This is used on platforms that have an advanced system bus (like CAPI
> or CXL). Any page of a process can be migrated to such memory. However,
> no one should be allowed to pin such memory so that it can always be
> evicted.
>
> Signed-off-by: Alex Sierra <alex.sierra@....com>
> Acked-by: Felix Kuehling <Felix.Kuehling@....com>
> Reviewed-by: Alistair Popple <apopple@...dia.com>
So, I'm currently messing with PageAnon() pages and CoW semantics ...
all these PageAnon() ZONE_DEVICE variants don't necessarily make my life
easier but I'm not sure yet if they make my life harder. I hope you can
help me understand some of that stuff.
1) What are expected CoW semantics for DEVICE_COHERENT?
I assume we'll share them just like other PageAnon() pages during fork()
readable, and the first sharer writing to them receives an "ordinary"
!ZONE_DEVICE copy.
So this would be just like DEVICE_EXCLUSIVE CoW handling I assume, just
that we don't have to go through the loop of restoring a device
exclusive entry?
2) How are these pages freed to clear/invalidate PageAnon() ?
I assume for PageAnon() ZONE_DEVICE pages we'll always for via
free_devmap_managed_page(), correct?
3) FOLL_PIN
While you write "no one should be allowed to pin such memory", patch #2
only blocks FOLL_LONGTERM. So I assume we allow ordinary FOLL_PIN and
you might want to be a bit more precise?
... I'm pretty sure we cannot FOLL_PIN DEVICE_PRIVATE pages, but can we
FILL_PIN DEVICE_EXCLUSIVE pages? I strongly assume so?
Thanks for any information.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists