can TLB's be used with multilevel page tables? - Minix

This is a discussion on can TLB's be used with multilevel page tables? - Minix ; Hi I was also reading about TLB's and multilevel page tables in osdi and now I'm starting to wonder if and how the TLB's could possibly be used in conjunction with multilevel page tables: the virtual address contains 3 indices: ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: can TLB's be used with multilevel page tables?

  1. can TLB's be used with multilevel page tables?

    Hi
    I was also reading about TLB's and multilevel page tables in osdi and
    now I'm starting to wonder if and how the TLB's could possibly be used
    in conjunction with multilevel page tables: the virtual address
    contains 3 indices: one into the top-level table, another one into the
    second-level table and yet another one into the actual page
    so if when i've cached a couple top-level page entries in my TLB's,
    then the top-level look-up would (hopefully) give me the base of a
    second level page table IN MEMORY, which is precisely the kind of
    thing I'm trying to avoid with the TLB, right? So, is there a way for
    an entry in the top-level entry to indicate that the second level page
    entry is in the TLB? do i Make sense, anyone got my point?

    thanks,

    Martin


  2. Re: can TLB's be used with multilevel page tables?

    In article <1174832185.251135.46220@l75g2000hse.googlegroups.c om>,
    "sancho1980" wrote:

    > Hi
    > I was also reading about TLB's and multilevel page tables in osdi and
    > now I'm starting to wonder if and how the TLB's could possibly be used
    > in conjunction with multilevel page tables: the virtual address
    > contains 3 indices: one into the top-level table, another one into the
    > second-level table and yet another one into the actual page
    > so if when i've cached a couple top-level page entries in my TLB's,
    > then the top-level look-up would (hopefully) give me the base of a
    > second level page table IN MEMORY, which is precisely the kind of
    > thing I'm trying to avoid with the TLB, right? So, is there a way for
    > an entry in the top-level entry to indicate that the second level page
    > entry is in the TLB? do i Make sense, anyone got my point?
    >
    > thanks,
    >
    > Martin


    The top-level table is pointers to the actual page table entries. The
    TLB contains the actual page table entries.

    If you have a hit in the TLB you needn't go to the page table at all.

    Think of a 2-level page table as a 1-level page table that need not be
    fully stored in memory.

    1-level table:

    entry 0 translation 0
    entry 1 translation 1
    entry 2 translation 2
    entry 3 translation 3
    :
    :
    :
    entry N translation N

    That's the whole page table.

    Let's say for simplicity that the L1 table partitions the whole thing
    into frames 4 entries long.

    Then the top-level table is pointers to the 2nd-level table which will
    consist of chunks like this:

    entry 0 translation 0
    entry 1 translation 1
    entry 2 translation 2
    entry 3 translation 3

    Next chunk

    entry 4 translation 4
    entry 5 translation 5
    entry 6 translation 6
    entry 7 translation 2

    Each line in the table is the same as the equivalent line in a 1-level
    table. But because it is allocated in frames, it need not all exist at
    once.

    Hard to explain without pictures...

    --
    Philip Machanick

  3. Re: can TLB's be used with multilevel page tables?

    On Mar 26, 8:19 am, Philip Machanick wrote:
    > In article <1174832185.251135.46...@l75g2000hse.googlegroups.c om>,
    >
    >
    >
    >
    >
    > "sancho1980" wrote:
    > > Hi
    > > I was also reading about TLB's and multilevel page tables in osdi and
    > > now I'm starting to wonder if and how the TLB's could possibly be used
    > > in conjunction with multilevel page tables: the virtual address
    > > contains 3 indices: one into the top-level table, another one into the
    > > second-level table and yet another one into the actual page
    > > so if when i've cached a couple top-level page entries in my TLB's,
    > > then the top-level look-up would (hopefully) give me the base of a
    > > second level page table IN MEMORY, which is precisely the kind of
    > > thing I'm trying to avoid with the TLB, right? So, is there a way for
    > > an entry in the top-level entry to indicate that the second level page
    > > entry is in the TLB? do i Make sense, anyone got my point?

    >
    > > thanks,

    >
    > > Martin

    >
    > The top-level table is pointers to the actual page table entries. The
    > TLB contains the actual page table entries.
    >
    > If you have a hit in the TLB you needn't go to the page table at all.
    >
    > Think of a 2-level page table as a 1-level page table that need not be
    > fully stored in memory.
    >
    > 1-level table:
    >
    > entry 0 translation 0
    > entry 1 translation 1
    > entry 2 translation 2
    > entry 3 translation 3
    > :
    > :
    > :
    > entry N translation N
    >
    > That's the whole page table.
    >
    > Let's say for simplicity that the L1 table partitions the whole thing
    > into frames 4 entries long.
    >
    > Then the top-level table is pointers to the 2nd-level table which will
    > consist of chunks like this:
    >
    > entry 0 translation 0
    > entry 1 translation 1
    > entry 2 translation 2
    > entry 3 translation 3
    >
    > Next chunk
    >
    > entry 4 translation 4
    > entry 5 translation 5
    > entry 6 translation 6
    > entry 7 translation 2
    >
    > Each line in the table is the same as the equivalent line in a 1-level
    > table. But because it is allocated in frames, it need not all exist at
    > once.
    >
    > Hard to explain without pictures...
    >
    > --
    > Philip Machanick- Hide quoted text -
    >
    > - Show quoted text -


    Thank you for the explanation. I did actually understand the two-level
    mechanism, what I didn't get was how the TLB could possibly be useful
    when using multi-level page tables. But I got the answer later in the
    chapter where it said that with multi-level page tables, the TLB
    stores (first-level, second-level)-combinations and not just one
    level!

    Thanks anyway,

    Martin


+ Reply to Thread