On Wed, Sep 17, 2025 at 12:18:39PM -0400, Pasha Tatashin wrote:
> On Wed, Sep 17, 2025 at 8:22 AM Jason Gunthorpe <j...@nvidia.com> wrote:
> >
> > On Tue, Sep 16, 2025 at 07:50:16PM -0700, Jason Miu wrote:
> > > + * kho_order_table
> > > + * +-------------------------------+--------------------+
> > > + * | 0 order| 1 order| 2 order ... | HUGETLB_PAGE_ORDER |
> > > + * ++------------------------------+--------------------+
> > > + *  |
> > > + *  |
> > > + *  v
> > > + * ++------+
> > > + * |  Lv6  | kho_page_table
> > > + * ++------+
> >
> > I seem to remember suggesting this could be simplified without the
> > special case 7h level table table for order.
> >
> > Encode the phys address as:
> >
> > (order << 51) | (phys >> (PAGE_SHIFT + order))
> 
> Why 51 and not 52, this limits to 63bit address space, is it not?

Yeah, might have got the math off

> I like the idea, but I'm trying to find the benefits compared to the
> current per-order tree approach.

It is probably about half the code compared to what I see here because
everything is agressively simplified.

> 3. It slightly complicates the logic in the new kernel. Instead of
> simply iterating a known tree for a specific order, the boot-time
> walker would need to reconstruct the per-order subtrees, and walk
> them.

The core walker just runs over a range, it is easy to compute the
range.

Jason

Reply via email to