On Tue, Nov 24, 2026 at 09:46:21AM -0400, Jason Gunthorpe wrote:
> On Tue, Nov 24, 2026 at 07:00:00PM +0530, Aneesh Kumar K.V wrote:
> 
> > Taking Jason's feedback into account, we could have the allocator
> > request compound pages and recover the actual allocation order with
> > compound_order(). That would avoid passing an order to free:
> > 
> > void *alloc_cc_shared_node(int nid, gfp_t gfp, unsigned int order);
> > void *alloc_cc_shared(gfp_t gfp, unsigned int order);
> > void free_cc_shared(void *addr);
> 
> It probably shouldn't be order here, that is hard to use. Just size_t
> len
> 
> And round up internally

Minor point in favour of keeping the '_pages' naming and order is that
it makes it more obvious what alignment is returned for code that needs
it like the ITS. Otherwise we can just document it, I don't have a
strong opinion either way (only that it's simpler than what was proposed
earlier).

-- 
Catalin

Reply via email to