From: Arjan van de Ven <arjanv@redhat.com>
To: tsuchiya yoshihiro <yt@labs.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SLEEP_ON_BKLCHECK
Date: Thu, 14 Apr 2005 09:21:49 +0200 [thread overview]
Message-ID: <20050414072149.GB15460@devserv.devel.redhat.com> (raw)
In-Reply-To: <425E190E.6000809@labs.fujitsu.com>
On Thu, Apr 14, 2005 at 04:17:34PM +0900, tsuchiya yoshihiro wrote:
> Arjan van de Ven wrote:
>
> >On Thu, 2005-04-14 at 09:42 +0900, tsuchiya yoshihiro wrote:
> >
> >
> >>Hi,
> >>In Fedora Core3, interruptible_sleep_on() checks if the system is
> >>lock_kernel()'ed
> >>by SLEEP_ON_BKLCHECK. Same thing is done in RedHatEL4.
> >>Also I found a patch including SLEEP_ON_BKLCHECK was posted before,
> >>but is not included in 2.6.11.
> >>Why SLEEP_ON_BKLCHECK checks lock_kernel ?
> >>
> >>
> >
> >Because you really need to hold the BKL when you call sleep_on() family
> >of APIs, otherwise you have a very big race.
> >
> >Also note that you in your code really should not call any of the
> >sleep_on() family of functions at all! It is a very very deprecated and
> >defective API!!!!
> >
> >
> >
> Oh, I did not know that.
> What do you use instead? I found wait_event. Is that what you use?
yep
>
> Actually, I am porting my friend's code that runs on 2.4.X to 2.6.
> How is sleep_on in 2.4? You should not use sleep_on in 2.4 also?
correct, sleep_on in 2.4 is also broken and racey
prev parent reply other threads:[~2005-04-14 7:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-14 0:42 SLEEP_ON_BKLCHECK tsuchiya yoshihiro
2005-04-14 6:46 ` SLEEP_ON_BKLCHECK Arjan van de Ven
2005-04-14 7:17 ` SLEEP_ON_BKLCHECK tsuchiya yoshihiro
2005-04-14 7:21 ` Arjan van de Ven [this message]
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=20050414072149.GB15460@devserv.devel.redhat.com \
--to=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yt@labs.fujitsu.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