From: Andrew Morton <akpm@digeo.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "David S. Miller" <davem@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/4] prepare_to_wait/finish_wait sleep/wakeup API
Date: Wed, 25 Sep 2002 22:24:22 -0700 [thread overview]
Message-ID: <3D929A06.8D8C8AE0@digeo.com> (raw)
In-Reply-To: Pine.LNX.4.44.0209252211280.1203-100000@home.transmeta.com
Linus Torvalds wrote:
>
> On Wed, 25 Sep 2002, David S. Miller wrote:
> >
> > Ok, so if the condition retest fails at wakeup (someone got to the
> > event before us), it's ok because we add ourselves back to the wait
> > queue first, mark ourselves as sleeping, _then_ retest.
>
> Right. The looping case (if somebody else was first) is slowed down
> marginally, but the common case is sped up and needs one less time through
> the waitqueue lock.
>
Most of the gain I saw in Badari's profiles (dd to 60 disks) was
in fact in __wake_up. 60 tasks parked on a waitqueue, waiting
for memory to come clean, wakeups being delivered to them faster
than they can wake up and get off the queue.
Yeah, my code is bust ;) The heavy __wake_up cost in there seems
to be specific to the profusion chipset, which is two quads joined
by wet string, but the principle still applies.
I expect a decent win would come from using this technique in
select/poll, but that code relies on the remains-on-the-waitqueue
semantics, and would need some fiddling.
next prev parent reply other threads:[~2002-09-26 5:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-26 4:07 [patch 1/4] prepare_to_wait/finish_wait sleep/wakeup API Andrew Morton
2002-09-26 4:24 ` David S. Miller
2002-09-26 4:37 ` Linus Torvalds
2002-09-26 4:34 ` David S. Miller
2002-09-26 5:12 ` Linus Torvalds
2002-09-26 5:24 ` Andrew Morton [this message]
2002-09-26 14:41 ` Linus Torvalds
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=3D929A06.8D8C8AE0@digeo.com \
--to=akpm@digeo.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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