lkml.org 
[lkml]   [2002]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 15/21] multiple pte pointers per pte_chain
    Andrew Morton wrote:
    > Pages which are mapped by only a single process continue to not have a
    > pte_chain. The pointer in struct page points directly at the mapping
    > pte (a "PageDirect" pte pointer). Once the page is shared a pte_chain
    > is allocated and both the new and old pte pointers are moved into it.

    May I suggest that the final pte in the list of ptes for a page is
    _always_ pointed to directly?

    In other words, a pte_chain looks like this:

    struct page -> pte_chain -> pte_chain -> pte_chain -> pte
    | | |
    v v v
    pte pte pte

    pte_chain vs. pte would be distinguished by the least significant bit of
    the pointer, or something similar.

    This adds a special case in the list walker -- on the other hand, it
    also removes two special cases ("PageDirect" is no longer required, and
    there is no 0 to indicate end-of-list). But the best part is: it saves
    more memory, has no cache line cost, and reduces the amount of work
    needed to share a page :-)

    -- Jamie

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:3.766 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site