From: Linus Torvalds <torvalds@linux-foundation.org>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Sitsofe Wheeler <sitsofe@yahoo.com>,
Borislav Petkov <bp@alien8.de>, Meelis Roos <mroos@linux.ee>,
Andrew Morton <akpm@linux-foundation.org>,
Kay Sievers <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 2/3 v2.6.39-rc7] block: make disk_block_events() properly wait for work cancellation
Date: Tue, 17 May 2011 08:15:38 -0700 [thread overview]
Message-ID: <BANLkTikpwk-hJs+TF7TJB38JsvOvHk2UMQ@mail.gmail.com> (raw)
In-Reply-To: <20110517151107.GQ20624@htj.dyndns.org>
On Tue, May 17, 2011 at 8:11 AM, Tejun Heo <tj@kernel.org> wrote:
>
> Heh, okay. It's not a lock tho. It's multiple waiter waiting for a
> single event - so either explicit waitqueue or completion. I was
> doing a waitqueue but bit waitqueue didn't seem to add too much
> complexity, so...
No.
Semantically what it is is a LOCK.
Turning it into something else just screws up everything. It just
means you have to have ANOTHER lock to protect the things that the
completion/waitqueue would use.
Don't f*&^ around. Just make it a lock, and don't do a
"lock+completion " or something crazy.
If you can do it with a completion but with no locking, go ahead. I
doubt you can. You want the locking for the whole "do I need to wait
for the completion" thing anyway, so why mess things up?
Linus
next prev parent reply other threads:[~2011-05-17 15:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 10:27 [PATCH RESEND 1/3 v2.6.39-rc7] block: don't use non-syncing event blocking in disk_check_events() Tejun Heo
2011-05-17 10:28 ` [PATCH RESEND 2/3 v2.6.39-rc7] block: remove non-syncing __disk_block_events() and fold it into disk_block_events() Tejun Heo
2011-05-17 10:28 ` [PATCH RESEND 2/3 v2.6.39-rc7] block: make disk_block_events() properly wait for work cancellation Tejun Heo
2011-05-17 14:46 ` Linus Torvalds
2011-05-17 15:11 ` Tejun Heo
2011-05-17 15:15 ` Linus Torvalds [this message]
2011-05-17 15:27 ` Tejun Heo
2011-05-17 22:40 ` Linus Torvalds
2011-05-18 5:07 ` Tejun Heo
2011-05-18 9:46 ` Linus Torvalds
2011-05-18 10:04 ` Tejun Heo
2011-05-18 11:07 ` Tejun Heo
2011-05-18 10:26 ` Jens Axboe
2011-05-17 15:47 ` [PATCH UPDATED " Tejun Heo
2011-05-17 19:34 ` Jens Axboe
2011-05-17 20:22 ` Borislav Petkov
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=BANLkTikpwk-hJs+TF7TJB38JsvOvHk2UMQ@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=sitsofe@yahoo.com \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).