* trying to summarize/organize the page allocation routines
@ 2007-06-07 9:04 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2007-06-07 9:04 UTC (permalink / raw)
To: Linux Kernel Mailing List
not surprisingly, there's a bit of chaos in the variety of page
allocation routines that can be used to do equivalent things.
just related to the previously-discussed DMA stuff, there are the
variations:
* page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
* (void *)__get_free_pages(__GFP_DMA,...
* __get_dma_pages(...)
so you can use the type flag "GFP_DMA", or the modifier flag
"__GFP_DMA", or call __get_dma_pages() directly. so is there a
consensus on what a uniform usage should be? (i think it's already
agreed that __get_dma_pages() can be tossed.) but there's more.
while get_zeroed_page() exists to allocate a single zero-filled page
and return its logical address, there's a number of calls to
__get_free_page that use an action modifier of __GFP_ZERO that
could be rewritten as get_zeroed_page(), no?
and if get_zeroed_page() is a useful shortcut, why not an equivalent
get_zeroed_pages() for consistency with alloc_page/alloc_pages and
__get_free_page/__get_free_pages?
a single piece of documentation explaining stuff like this would be
handy, as well as a consistent usage of all of the above.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-07 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-07 9:04 trying to summarize/organize the page allocation routines Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®