From: "David S. Miller" <davem@redhat.com>
To: akpm@digeo.com
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/4] prepare_to_wait/finish_wait sleep/wakeup API
Date: Wed, 25 Sep 2002 21:24:59 -0700 (PDT) [thread overview]
Message-ID: <20020925.212459.118951005.davem@redhat.com> (raw)
In-Reply-To: <3D928813.7EAD7F3C@digeo.com>
From: Andrew Morton <akpm@digeo.com>
Date: Wed, 25 Sep 2002 21:07:47 -0700
The main objective of this is to reduce the CPU cost of the wait/wakeup
operation. When a task is woken up, its waitqueue is removed from the
waitqueue_head by the waker (ie: immediately), rather than by the woken
process.
I don't want to say that your changes cannot be made to work,
but it's been one of my understandings all these years that
the fact that the task itself controls it's presence on the
wait queue is what allows many races to be handled properly and
cleanly.
For example, the ordering of the test and add/remove from
the wait queue is pretty important.
It probably doesn't matter when there is a higher level of locking
done around the sleep/wakeup (TCP sockets are one good example)
and if that is what this is aimed at, great.
next prev parent reply other threads:[~2002-09-26 4:26 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 [this message]
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
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=20020925.212459.118951005.davem@redhat.com \
--to=davem@redhat.com \
--cc=akpm@digeo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.