* - slob-fix-page-order-calculation-on-not-4kb-page.patch removed from -mm tree
@ 2007-05-08 0:04 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-05-08 0:04 UTC (permalink / raw)
To: akinobu.mita, mpm, stable, mm-commits
The patch titled
slob: fix page order calculation on not 4KB page
has been removed from the -mm tree. Its filename was
slob-fix-page-order-calculation-on-not-4kb-page.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: slob: fix page order calculation on not 4KB page
From: Akinobu Mita <akinobu.mita@gmail.com>
SLOB doesn't calculate correct page order when page size is not 4KB. This
patch fixes it with using get_order() instead of find_order() which is SLOB
version of get_order().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/slob.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff -puN mm/slob.c~slob-fix-page-order-calculation-on-not-4kb-page mm/slob.c
--- a/mm/slob.c~slob-fix-page-order-calculation-on-not-4kb-page
+++ a/mm/slob.c
@@ -150,15 +150,6 @@ static void slob_free(void *block, int s
spin_unlock_irqrestore(&slob_lock, flags);
}
-static int FASTCALL(find_order(int size));
-static int fastcall find_order(int size)
-{
- int order = 0;
- for ( ; size > 4096 ; size >>=1)
- order++;
- return order;
-}
-
void *__kmalloc(size_t size, gfp_t gfp)
{
slob_t *m;
@@ -174,7 +165,7 @@ void *__kmalloc(size_t size, gfp_t gfp)
if (!bb)
return 0;
- bb->order = find_order(size);
+ bb->order = get_order(size);
bb->pages = (void *)__get_free_pages(gfp, bb->order);
if (bb->pages) {
@@ -318,7 +309,7 @@ void *kmem_cache_alloc(struct kmem_cache
if (c->size < PAGE_SIZE)
b = slob_alloc(c->size, flags, c->align);
else
- b = (void *)__get_free_pages(flags, find_order(c->size));
+ b = (void *)__get_free_pages(flags, get_order(c->size));
if (c->ctor)
c->ctor(b, c, SLAB_CTOR_CONSTRUCTOR);
@@ -345,7 +336,7 @@ void kmem_cache_free(struct kmem_cache *
if (c->size < PAGE_SIZE)
slob_free(b, c->size);
else
- free_pages((unsigned long)b, find_order(c->size));
+ free_pages((unsigned long)b, get_order(c->size));
}
EXPORT_SYMBOL(kmem_cache_free);
_
Patches currently in -mm which might be from akinobu.mita@gmail.com are
origin.patch
git-alsa.patch
auth_gss-unregister-gss_domain-when-unloading-module.patch
fault-injection-disable-stacktrace-filter-for-x86-64.patch
use-slab_panic-flag-cleanup.patch
simplify-the-stacktrace-code.patch
dtlk-fix-error-checks-in-module_init.patch
procfs-use-simple_read_from_buffer.patch
cm4000_cs-fix-error-paths.patch
cm4000_cs-use-bitrev.patch
use-simple_read_from_buffer-in-fs.patch
use-simple_read_from_buffer-in-kernel.patch
sunrpc-fix-error-path-in-module_init.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-08 0:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-08 0:04 - slob-fix-page-order-calculation-on-not-4kb-page.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.