Re: [PATCH v5 01/15] genpt: Generic Page Table base API

Nicolin Chen
2025-09-18T19:43:38Z

On Thu, Sep 18, 2025 at 11:49:43AM -0300, Jason Gunthorpe wrote:
> On Thu, Sep 18, 2025 at 12:14:27AM -0700, Nicolin Chen wrote:
> > > > Then, the "entry" sounds like a physical (v.s. "logical") table
> > > > entry, e.g. a PTE that we usually say?
> > >
> > > I choose entry because it is related to PTE and in most cases you want
> > > to work on the entries. The replication of entry to item is somewhat
> > > hidden.
> > >
> > > From a HW perspective the TLB should be loading entries.
> >
> > In that case, "entry" should be a single "physical" element v.s.
> > "logical", right? Because that's what HW/TLB physically loads.
>
> I would say HW/TLB loads logical entries when it supports
> contiguity. It read a single table item and expand it to the larger
> TLB "entry".

Oh, I got wrong. Thanks for elaborating.

"item" is a PTE and "entry" is a group of items/PTEs that set the
CONTIG bit. TLB loads all those items/PTEs and combines them into
a single TLB "entry".

It seems difficult to define which one is physical or logical, as
both "item" and "entry" physically exist in page table and in TLB
respectively.

Nicolin