Messages in this thread | | | Date | Tue, 22 May 2001 10:19:02 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: 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,
Linus
- 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/
| |