__get_free_pages() is strange interface:
It has underscores, yet get_free_pages() does not exists.
It returns long when most people need pointer.
(And it takes order, when many people want to pass size).
What about creating void *get_free_pages(flags, order) version, then
slowly converting users to it?
Pavel
---
Remove hand-coded get_order() from page_alloc.c.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 402a504..c48aa45 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4339,9 +4339,7 @@ void *__init alloc_large_system_hash(con
else if (hashdist)
table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
else {
- unsigned long order;
- for (order = 0; ((1UL << order) << PAGE_SHIFT) < size; order++)
- ;
+ unsigned long order = get_order(size);
table = (void*) __get_free_pages(GFP_ATOMIC, order);
/*
* If bucketsize is not a power-of-two, we may free
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
git: | |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: Data corruption issue with splice() on 2.6.27.10 |
| Steven Rostedt | Re: -rt scheduling: wakeup bug? |
