[2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pairin ksize()
From: Eric Dumazet
Date: Sat Aug 20 2005 - 03:03:17 EST
This patch removes unnecessary critical section in ksize() function, as cli/sti are rather expensive on modern CPUS.
Signed-off-by: Eric Dumazet <dada1@xxxxxxxxxxxxx>
diff -Nru linux-2.6.13-rc6-ed/mm/slab.c linux-2.6.13-rc6/mm/slab.c
--- linux-2.6.13-rc6-ed/mm/slab.c 2005-08-20 09:22:29.000000000 +0200
+++ linux-2.6.13-rc6/mm/slab.c 2005-08-20 09:39:42.000000000 +0200
@@ -3080,10 +3080,8 @@
unsigned int size = 0;
if (likely(objp != NULL)) {
- local_irq_save(flags);
c = GET_PAGE_CACHE(virt_to_page(objp));
size = kmem_cache_size(c);
- local_irq_restore(flags);
}
return size;