From: Jarek Poplawski <jarkao2@o2.pl>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: Eric Dumazet <dada1@cosmosbay.com>,
Andrew Morton <akpm@linux-foundation.org>,
mpm@selenic.com, Christoph Lameter <clameter@sgi.com>,
"ast\@domdv\.de" <ast@domdv.de>,
"linux-kernel\@vger\.kernel\.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] slab: deal with NULL pointers passed to kmem_cache_free
Date: Wed, 21 Mar 2007 11:11:43 +0100 [thread overview]
Message-ID: <20070321101143.GB1939@ff.dom.local> (raw)
In-Reply-To: <Pine.LNX.4.64.0703200943430.3622@sbz-30.cs.Helsinki.FI>
On 20-03-2007 08:47, Pekka J Enberg wrote:
> On 3/19/07, Andrew Morton <akpm@linux-foundation.org> wrote:
...
> On Tue, 20 Mar 2007, Eric Dumazet wrote:
>> CPU: AMD64 processors, speed 1992.52 MHz (estimated)
>> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit
>> mask of 0x00 (No unit mask) count 100000
>> samples % symbol name
>> 1861563 4.7882 tg3_start_xmit_dma_bug
>> 1375727 3.5386 memcpy_c
>> 1166438 3.0002 tcp_v4_rcv
>> 1157334 2.9768 kmem_cache_free
>>
>> In this workload (real server), you can see kmem_cache_free() is number four.
>
> Thanks for the profile. I still wonder where exactly thouse super-hot
> call-sites are...
>
> On Tue, 20 Mar 2007, Eric Dumazet wrote:
>> Adding one test and conditional branch in this super-hot function just to
>> correct a bug in a SCSI driver (or whatever) is not *SANE*.
Sure! My proposal is to remove a few more - so we could
transmit this data from mostly not buggy SCSI drivers
really fast!
>
> Agreed. Unless we can get kmem_cache_free() out of those hot paths, of
> course =).
>
> Pekka
IMHO admins care far more about infallibility than speed. Every
such "saving" causes the bugs are harder to follow, it takes more
time and people to find bug's paths and more bugs goes to stable.
I'm sure this admin with SCSI - st problem will next time think
3 times before upgrading to the next "stable" - and it'll be only
because of this one buggy driver. (Of course then we don't get his
next bug report, either - so the next SCSI bug will be diagnosed at
least one kernel version later.)
I think Pekka was right (it looks he changed his mind now) something
should be done here. I think something like this should be a minimum:
BUG_ON(!objp || virt_to_cache(objp) != cachep);
to show distinctly what's going on. (BTW, kfree isn't exceptional
with NULL treatment - neighbouring slob.c works alike.)
Regards,
Jarek P.
next prev parent reply other threads:[~2007-03-21 10:07 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 8:27 Pekka J Enberg
2007-03-19 11:31 ` Andrew Morton
2007-03-19 11:40 ` Pekka J Enberg
2007-03-19 17:08 ` Christoph Lameter
2007-03-19 17:31 ` Pekka J Enberg
2007-03-19 20:49 ` Matt Mackall
2007-03-19 21:10 ` Andrew Morton
2007-03-19 21:25 ` Pekka Enberg
2007-03-19 21:41 ` Andrew Morton
2007-03-19 21:49 ` Matt Mackall
2007-03-20 7:06 ` Pekka Enberg
2007-03-20 18:41 ` Christoph Lameter
2007-03-21 11:42 ` Pekka J Enberg
2007-03-20 7:14 ` Pekka Enberg
2007-03-20 7:39 ` Eric Dumazet
2007-03-20 7:47 ` Pekka J Enberg
2007-03-20 7:56 ` Eric Dumazet
2007-03-21 10:11 ` Jarek Poplawski [this message]
2007-03-21 12:13 ` Pekka Enberg
2007-03-21 13:31 ` Jarek Poplawski
2007-03-21 13:36 ` Pekka J Enberg
2007-03-21 14:11 ` Rafael J. Wysocki
2007-03-21 14:41 ` Pekka Enberg
2007-03-21 16:30 ` Andrew Morton
2007-03-21 17:54 ` Jörn Engel
2007-03-21 18:32 ` Pekka Enberg
2007-03-21 14:45 ` Jarek Poplawski
2007-03-19 22:04 ` Jörn Engel
2007-03-19 21:16 ` Christoph Lameter
2007-03-19 21:44 ` Matt Mackall
2007-03-19 23:32 ` Andreas Steinmetz
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=20070321101143.GB1939@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=akpm@linux-foundation.org \
--cc=ast@domdv.de \
--cc=clameter@sgi.com \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=penberg@cs.helsinki.fi \
/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
all inboxes | Powered by JetHome®