[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9eb2c4a-d8cc-9553-57b7-fd1622679aaa@amd.com>
Date: Thu, 26 Aug 2021 18:27:31 -0400
From: Felix Kuehling <felix.kuehling@....com>
To: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@....com>,
Christoph Hellwig <hch@....de>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
rcampbell@...dia.com, linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, jgg@...dia.com, jglisse@...hat.com
Subject: Re: [PATCH v1 03/14] mm: add iomem vma selection for memory migration
Am 2021-08-25 um 2:24 p.m. schrieb Sierra Guiza, Alejandro (Alex):
>
> On 8/25/2021 2:46 AM, Christoph Hellwig wrote:
>> On Tue, Aug 24, 2021 at 10:48:17PM -0500, Alex Sierra wrote:
>>> } else {
>>> - if (!(migrate->flags & MIGRATE_VMA_SELECT_SYSTEM))
>>> + if (!(migrate->flags & MIGRATE_VMA_SELECT_SYSTEM) &&
>>> + !(migrate->flags & MIGRATE_VMA_SELECT_IOMEM))
>>> goto next;
>>> pfn = pte_pfn(pte);
>>> if (is_zero_pfn(pfn)) {
>> .. also how is this going to work for the device public memory? That
>> should be pte_special() an thus fail vm_normal_page.
> Perhaps we're missing something, as we're not doing any special
> marking for the device public pfn/entries.
> pfn_valid return true, pte_special return false and pfn_t_devmap
> return false on these pages. Same as system pages.
> That's the reason vm_normal_page returns the page correctly through
> pfn_to_page helper.
Hi Christoph,
I think we're missing something here. As far as I can tell, all the work
we did first with DEVICE_GENERIC and now DEVICE_PUBLIC always used
normal pages. Are we missing something in our driver code that would
make these PTEs special? I don't understand how that can be, because
driver code is not really involved in updating the CPU mappings. Maybe
it's something we need to do in the migration helpers.
Thanks,
Felix
>
> Regards,
> Alex S.
Powered by blists - more mailing lists