On Thu, Aug 28, 2025 at 12:31:40PM -0700, Dave Hansen wrote:
On 8/28/25 12:10, Jason Gunthorpe wrote:
The biggest single chunk of code is defining ptdesc_*_kernel(). The rest of it is painfully simple.
Seems not great to be casting ptdesc to folio just to use folio_set_referenced(), I'm pretty sure that is no the direction things are going in..
Ideally, the ptdesc->__page_flags fields would have their own set of macros just like folios do, right? Alas, I was too lazy to go to the trouble of conjuring those up for this single bit.
There's a bunch of "Ideally" in ptdesc, but I'm equially too lazy to do that before I've proven everything works great with slab and/or folios. It'll have to be changed no matter which way we do it, so as long as it's obvious where needs to be changed, it's fine. I deem this "good enough for now".