* SLEEP_ON_BKLCHECK
@ 2005-04-14 0:42 tsuchiya yoshihiro
2005-04-14 6:46 ` SLEEP_ON_BKLCHECK Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: tsuchiya yoshihiro @ 2005-04-14 0:42 UTC (permalink / raw)
To: linux-kernel; +Cc: yt
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 ? Lock_kernel shoud be held
during sleep_on_timeout? And I also wonder why 2.6.11 does not check it.
Thank you,
Please CC me because I am not subscribing this list.
Yoshi Tsuchiya
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SLEEP_ON_BKLCHECK
2005-04-14 0:42 SLEEP_ON_BKLCHECK tsuchiya yoshihiro
@ 2005-04-14 6:46 ` Arjan van de Ven
2005-04-14 7:17 ` SLEEP_ON_BKLCHECK tsuchiya yoshihiro
0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2005-04-14 6:46 UTC (permalink / raw)
To: tsuchiya yoshihiro; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
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!!!!
Can you give the URL to the code where you use this in?
(it is GPL code, right?)
Greetings,
Arjan van de Ven
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: SLEEP_ON_BKLCHECK
2005-04-14 6:46 ` SLEEP_ON_BKLCHECK Arjan van de Ven
@ 2005-04-14 7:17 ` tsuchiya yoshihiro
2005-04-14 7:21 ` SLEEP_ON_BKLCHECK Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: tsuchiya yoshihiro @ 2005-04-14 7:17 UTC (permalink / raw)
To: linux-kernel; +Cc: arjanv, yt
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?
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?
Thank you,
Yoshi Tsuchiya
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SLEEP_ON_BKLCHECK
2005-04-14 7:17 ` SLEEP_ON_BKLCHECK tsuchiya yoshihiro
@ 2005-04-14 7:21 ` Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2005-04-14 7:21 UTC (permalink / raw)
To: tsuchiya yoshihiro; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-14 7:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` SLEEP_ON_BKLCHECK Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox