[2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize()
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.0 +0200 +++ linux-2.6.13-rc6/mm/slab.c 2005-08-20 09:39:42.0 +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;
[2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize()
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.0 +0200 +++ linux-2.6.13-rc6/mm/slab.c 2005-08-20 09:39:42.0 +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;