From: Andrea Arcangeli <andrea@suse.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Christoph Hellwig <hch@caldera.de>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.10pre7aa1
Date: Sun, 16 Sep 2001 19:23:16 +0200 [thread overview]
Message-ID: <20010916192316.A13248@athlon.random> (raw)
In-Reply-To: <20010910210607.C715@athlon.random> <Pine.LNX.4.33L.0109161359040.9536-100000@imladris.rielhome.conectiva>
In-Reply-To: <Pine.LNX.4.33L.0109161359040.9536-100000@imladris.rielhome.conectiva>; from riel@conectiva.com.br on Sun, Sep 16, 2001 at 02:00:10PM -0300
On Sun, Sep 16, 2001 at 02:00:10PM -0300, Rik van Riel wrote:
> On Mon, 10 Sep 2001, Andrea Arcangeli wrote:
>
> > > My problem with this appropech is just that we use kernel threads for
> > > more and more stuff - always creating new ones. I think at some point
> > > they will sum up badly.
> >
> > They almost only costs memory. I also don't like unnecessary kernel
> > threads but I can see usefulness for this one, OTOH as you said the
> > latency of the wait_for_rcu isn't very critical but usually I prefer to
> > save cycles with memory where I can and where it's even cleaner to do so.
>
> I can't quite remember if it was Linus or Larry who said:
>
> "Threads are for people who don't understand state machines"
>
>
> If you cannot make your code clean without adding another
> thread, it's probably a bad sign ;)
Ask yourself why libaio in glibc uses threads. When there's no async-io
hook you have no choice. Adding the hook is an advantage if you're going
to use it during production, much better than
rescheduling/creating/destroying various threads during production, but
if you only need to register the hook once per day you'd waste time all
the production time checking if somebody is registered in the hook.
So while the "Threads are for people who don't understand state
machines" argument works for the userspace fileservers, it really
doesn't apply to the rcu slow path where we don't want to hurt the
schedule fast path with an hook.
However the issue with keventd and the fact we can get away with a
single per-cpu counter increase in the scheduler fast path made us to
think it's cleaner to just spend such cycle for each schedule rather
than having yet another 8k per cpu wasted and longer taskslists (a
local cpu increase is cheaper than a conditional jump).
Andrea
next prev parent reply other threads:[~2001-09-16 17:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010910175416.A714@athlon.random>
2001-09-10 17:41 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 18:03 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 18:49 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:01 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 19:03 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:08 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 18:52 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:06 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 17:00 ` 2.4.10pre7aa1 Rik van Riel
2001-09-16 17:23 ` Andrea Arcangeli [this message]
2001-09-16 17:34 ` 2.4.10pre7aa1 Rik van Riel
2001-09-16 18:16 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 19:04 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-12 8:24 ` 2.4.10pre7aa1 Rusty Russell
2001-09-11 8:51 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 11:04 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 12:40 ` 2.4.10pre7aa1 Alan Cox
2001-09-11 13:49 ` 2.4.10pre7aa1 Andrea Arcangeli
-- strict thread matches above, loose matches on Subject: below --
2001-09-11 9:39 2.4.10pre7aa1 Maneesh Soni
2001-09-11 11:12 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 11:53 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 11:57 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 12:22 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 13:05 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 13:56 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 14:27 ` 2.4.10pre7aa1 Dipankar Sarma
2001-09-12 11:04 2.4.10pre7aa1 Dipankar Sarma
2001-09-12 14:03 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-12 14:42 ` 2.4.10pre7aa1 Dipankar Sarma
2001-09-12 14:53 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 12:23 ` 2.4.10pre7aa1 Rusty Russell
2001-09-17 9:13 2.4.10pre7aa1 Dipankar Sarma
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=20010916192316.A13248@athlon.random \
--to=andrea@suse.de \
--cc=hch@caldera.de \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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