[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251128175108.GG812105@ziepe.ca>
Date: Fri, 28 Nov 2025 13:51:08 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Jordan Niethe <jniethe@...dia.com>
Cc: linux-mm@...ck.org, balbirs@...dia.com, matthew.brost@...el.com,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, david@...hat.com, ziy@...dia.com,
apopple@...dia.com, lorenzo.stoakes@...cle.com, lyude@...hat.com,
dakr@...nel.org, airlied@...il.com, simona@...ll.ch,
rcampbell@...dia.com, mpenttil@...hat.com, willy@...radead.org
Subject: Re: [RFC PATCH 6/6] mm: Remove device private pages from the
physical address space
On Fri, Nov 28, 2025 at 03:41:46PM +1100, Jordan Niethe wrote:
> Introduce helpers:
>
> - device_private_page_to_offset()
> - device_private_folio_to_offset()
>
> to take a given device private page / folio and return its offset within
> the device private address space (this is essentially a PFN within the
> device private address space).
It would be nice if we rarely/never needed to see number space outside
the pte itself or the internal helpers..
Like, I don't think there should be stuff like this:
> entry = make_writable_migration_device_private_entry(
> - page_to_pfn(page));
> + device_private_page_to_offset(page));
make_writable_migration_device_private_entry() should accept the
struct page as the handle?
If it really is needed I think it should have its own dedicated type
and not be intermixed with normal pfns..
Jason
Powered by blists - more mailing lists