lkml.org 
[lkml]   [2005]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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 <dada1@cosmosbay.com>

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;
\
 
 \ /
  Last update: 2005-08-20 10:05    [W:0.029 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site