From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Daniel Hokka Zakrisson" <daniel@hozac.com>,
linux-kernel@vger.kernel.org,
"Björn Steinbrink" <B.Steinbrink@gmx.de>,
greg@kroah.com, matthew@wil.cx,
"Christoph Lameter" <clameter@sgi.com>,
manfred@colorfullife.com, akpm@osdl.org
Subject: Re: [PATCH] fs: fcntl_setlease defies lease_init assumptions
Date: Mon, 08 May 2006 19:06:51 +0300 [thread overview]
Message-ID: <1147104412.22096.8.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.0605080807430.3718@g5.osdl.org>
On Mon, 2006-05-08 at 08:12 -0700, Linus Torvalds wrote:
> Yeah, but CONFIG_DEBUG_SLAB is _really_ expensive.
>
> We do have a lot of very basic debug checks (unconditionally) in the
> kernel to verify various "must be true" kinds of things. It might slow
> things down a bit, but in general, I think anything that helps catch
> problems early tends to pay itself back very quickly. So I'm more than
> happy with a simple BUG_ON() in even a hot path, if it just ends up being
> compiled into a "test and branch to unlikely" and doesn't need any costly
> locking etc around it.
I was under the impression that virt_to_page() is expensive, even more
so on NUMA. Do we really want this check included unconditionally in
slab free hot path?
Pekka
text data bss dec hex filename
9279 664 80 10023 2727 mm/slab.o (vanilla uma)
9327 664 80 10071 2757 mm/slab.o (debug uma)
13464 2596 24 16084 3ed4 mm/slab.o (vanilla numa)
13492 2596 24 16112 3ef0 mm/slab.o (debug numa)
diff --git a/mm/slab.c b/mm/slab.c
index c32af7e..8ace45b 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3077,6 +3077,8 @@ static inline void __cache_free(struct k
check_irq_off();
objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
+ BUG_ON(!PageSlab(virt_to_page(objp)));
+
/* Make sure we are not freeing a object from another
* node to the array cache on this cpu.
*/
next prev parent reply other threads:[~2006-05-08 16:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-07 23:21 [PATCH] fs: fcntl_setlease defies lease_init assumptions Daniel Hokka Zakrisson
2006-05-08 3:33 ` Linus Torvalds
2006-05-08 3:34 ` Linus Torvalds
2006-05-08 8:02 ` Daniel Hokka Zakrisson
2006-05-08 7:57 ` Daniel Hokka Zakrisson
2006-05-08 8:31 ` Pekka Enberg
2006-05-08 8:34 ` Pekka Enberg
2006-05-08 15:12 ` Linus Torvalds
2006-05-08 16:06 ` Pekka Enberg [this message]
2006-05-08 16:28 ` Linus Torvalds
2006-05-08 19:36 ` Pekka Enberg
2006-05-09 3:38 ` Christoph Lameter
2006-05-09 3:49 ` Martin J. Bligh
2006-05-09 5:31 ` Christoph Lameter
2006-05-09 6:16 ` Martin J. Bligh
2006-05-09 6:22 ` Manfred Spraul
2006-05-09 6:35 ` Keith Owens
2006-05-09 6:37 ` Nick Piggin
2006-05-09 10:26 ` Pekka J Enberg
2006-05-09 18:25 ` Manfred Spraul
2006-05-09 18:56 ` Linus Torvalds
2006-05-09 19:05 ` Pekka Enberg
2006-05-09 19:15 ` Pekka Enberg
2006-05-09 14:40 ` Linus Torvalds
2006-05-09 23:59 ` Christoph Lameter
2006-05-08 16:36 ` Dave Jones
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=1147104412.22096.8.camel@localhost \
--to=penberg@cs.helsinki.fi \
--cc=B.Steinbrink@gmx.de \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=daniel@hozac.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=matthew@wil.cx \
--cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).