From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Denis Vlasenko <vda@ilport.com.ua>,
Arjan van de Ven <arjan@infradead.org>,
Jens Axboe <axboe@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: kmalloc without GFP_xxx?
Date: Wed, 29 Jun 2005 17:10:53 +0200 [thread overview]
Message-ID: <20050629151053.GC2130@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0506291046020.22775@localhost.localdomain>
On Wed, 29 June 2005 10:53:10 -0400, Steven Rostedt wrote:
> On Wed, 29 Jun 2005, Jörn Engel wrote:
> > On Wed, 29 June 2005 17:14:32 +0300, Denis Vlasenko wrote:
> > >
> > > This is why I always use _irqsave. Less error prone.
> > > And locking is a very easy to get 'slightly' wrong, thus
> > > I trade 0.1% of performance for code simplicity.
> >
> > But sometimes you get lucky and trade 100ms latency for code
> > simplicity. Of course, the audio people don't mind anymore, now that
> > we have all sorts of realtime patches. Everyone's happy!
> >
>
> God! If you are holding a spin_lock for 100ms, something is terribly
> wrong, especialy since you better not schedule holding that spin_lock.
> Spinlocks are _suppose_ to be for quick things. The difference in latency
> between a *_lock and *_lock_irqsave only effects UP, on SMP both will give
> the same latency, since another CPU might be busy spinning while waiting
> for that lock, heck, on SMP the latency of *_lock can actually be higher,
> since, as I already said, the other CPU will even have to wait while the
> CPU that has the lock is servicing interrupts.
All nice and well. But still, for the sake of simplicity and me not
wanting to think, I prefer always using spin_lock_irqsave for
everything. Since when should I stop and think about my own code?
In fact, why don't we all sit down and start using KCSP for kernel
hacking? ;)
Jörn
--
I can say that I spend most of my time fixing bugs even if I have lots
of new features to implement in mind, but I give bugs more priority.
-- Andrea Arcangeli, 2000
next prev parent reply other threads:[~2005-06-29 15:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 11:02 Denis Vlasenko
2005-06-29 11:15 ` Jens Axboe
2005-06-29 11:18 ` Denis Vlasenko
2005-06-29 11:25 ` Jens Axboe
2005-06-29 11:15 ` Arjan van de Ven
2005-06-29 11:20 ` Denis Vlasenko
2005-06-29 11:37 ` Arjan van de Ven
2005-06-29 13:44 ` Steven Rostedt
2005-06-29 14:14 ` Denis Vlasenko
2005-06-29 14:23 ` Jörn Engel
2005-06-29 14:53 ` Steven Rostedt
2005-06-29 15:10 ` Jörn Engel [this message]
2005-06-29 15:48 ` Steven Rostedt
2005-06-29 15:54 ` Jörn Engel
2005-06-29 16:04 ` Steven Rostedt
2005-06-29 15:12 ` Oliver Neukum
2005-06-29 16:48 ` Timur Tabi
2005-06-29 17:22 ` Steven Rostedt
2005-06-29 17:43 ` Richard B. Johnson
2005-06-29 18:07 ` Steven Rostedt
2005-06-30 7:52 ` Denis Vlasenko
2005-06-30 8:05 ` Steven Rostedt
2005-06-30 1:02 ` Benjamin Herrenschmidt
2005-06-30 6:02 ` Steven Rostedt
2005-06-29 20:28 Manfred Spraul
2005-06-29 20:44 Manfred Spraul
2005-06-30 5:57 ` Steven Rostedt
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=20050629151053.GC2130@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=arjan@infradead.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=vda@ilport.com.ua \
/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®