[lkml]   [2008]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] x86: create array based interface to change page attribute
    Arjan van de Ven wrote:
    > Thomas Hellström wrote:
    > > to fix the long standing uc/wc aliasing issue, provided we
    > I'm not opposed to a real fix. I am opposed to a bad hack.
    Great. So a real clean fix involves setting all "default" kernel
    mappings either to WC (which will require PAT) or
    Unmapped, for a pool of pages used in the graphics tables.

    To reduce the number of attribute changes for mappings that are
    frequently switched, and also to reduce the number of clflushes, and to
    avoid waiting for upcoming wc versions of set_memory_xx, I have a strong
    preference for unmapping the pages.

    Now is where I need some guidance, because interface design is not my
    strong side. I see three possible ways to do this.

    1) Use set_memory_np(). Not desirable since we want to be able to use
    that function on a single mapping, and not imply other semantics.
    2) Have the driver try to find out which "default" mappings the kernel
    has set up on a page and call set_memory_np() on each one of them. This
    seems very fragile and ugly even to me.
    3) Have code in x86/pageattr.c decide which "default" mappings are
    present on the given pages and set them all as non-present.
    In fact, there is already such a function in pageattr.c:

    kernel_map_pages(struct page *pages, int numpages, bool enable);

    But it's for debugging purposes only, could we use and export a variant
    of this?

    I guess I need a hint as to what's considered allowable here, to avoid
    spending a lot of time on something that will in the end get rejected



    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2008-04-02 20:01    [W:0.023 / U:24.980 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site