[lkml]   [2001]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: add page argument to copy/clear_user_page

    On Mon, 21 May 2001, Paul Mackerras wrote:
    > As for the `to' argument, yes it is redundant since it is just kmap(page).

    And why not let "clear_page()" just do that itself?

    The only place that doesn't already do "kmap(page)" is basically
    get_zeroed_page(), and the only reason it doesn't do that is because the
    whole function is fundamentally not able to handle high memory pages (it
    returns a fixed address, not the "struct page *".

    But that function is also likely to not care about the extra five cycles
    or so of having to do the kmap() by making clear_page() (and copy_page())
    always use "struct page *" and do kmap() internally. Because most people
    who care about performance are already using other functions (in fact, the
    functions that _can_ allocate high memory).

    And I hate redundancy, and having different functions for the same thing.

    > But copy/clear_user_page isn't the interface that gets called from the
    > MM stuff, copy/clear_user_highpage is, defined in include/linux/highmem.h.
    > These are two of a whole series of functions which all do kmap, do
    > something, kunmap.

    The thing is, copy/clear_page shouldn't exist at all (or rather, the
    "highpage" versions should be renamed to the non-highpage names, because
    the non-highmem case simply isn't interesting any more).

    The highmem special casing used to make sense back when highmem was a rare
    special case. These days, we should just get rid of the distinction as
    much as possible,


    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: 2005-03-22 13:17    [W:0.022 / U:0.596 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site