From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: trying to summarize/organize the page allocation routines
Date: Thu, 7 Jun 2007 05:04:27 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0706070442530.6253@localhost.localdomain> (raw)
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
========================================================================
reply other threads:[~2007-06-07 9:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0706070442530.6253@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®