[2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch removes unnecessary critical section in ksize() function, as cli/sti are rather expensive on modern CPUS.


Signed-off-by: Eric Dumazet <[email protected]>

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;

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux