From: Eric Dumazet <dada1@cosmosbay.com>
To: linux-kernel@vger.kernel.org
Subject: [2.6 PATCH] SLAB : removes local_irq_save()/local_irq_restore() pair in ksize()
Date: Sat, 20 Aug 2005 10:01:09 +0200 [thread overview]
Message-ID: <4306E345.90102@cosmosbay.com> (raw)
In-Reply-To: <20050819233828.GC3615@stusta.de>
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
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>
[-- Attachment #2: patch_ksize --]
[-- Type: text/plain, Size: 433 bytes --]
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;
prev parent reply other threads:[~2005-08-20 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 23:38 [RFC: 2.6 patch] remove the second arg of do_timer_interrupt() Adrian Bunk
2005-08-20 8:01 ` Eric Dumazet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4306E345.90102@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox