* Sleep
@ 2002-10-03 1:48 linuxguruguy
2002-10-04 2:05 ` Sleep William Lee Irwin III
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: linuxguruguy @ 2002-10-03 1:48 UTC (permalink / raw)
To: linux-kernel
Do kernel hackers ever sleep
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-03 1:48 Sleep linuxguruguy
@ 2002-10-04 2:05 ` William Lee Irwin III
2002-10-04 2:26 ` Sleep Andrew Morton
2002-10-07 13:54 ` Sleep Bernd Petrovitsch
2002-10-04 3:15 ` Sleep Joe Kellner
2002-10-04 8:07 ` Sleep jbradford
2 siblings, 2 replies; 13+ messages in thread
From: William Lee Irwin III @ 2002-10-04 2:05 UTC (permalink / raw)
To: linuxguruguy; +Cc: linux-kernel
On Wed, Oct 02, 2002 at 09:48:15PM -0400, linuxguruguy wrote:
> Do kernel hackers ever sleep
No.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-04 2:05 ` Sleep William Lee Irwin III
@ 2002-10-04 2:26 ` Andrew Morton
2002-10-04 5:39 ` Sleep Gerrit Huizenga
2002-10-07 13:54 ` Sleep Bernd Petrovitsch
1 sibling, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2002-10-04 2:26 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: linuxguruguy, linux-kernel
William Lee Irwin III wrote:
>
> On Wed, Oct 02, 2002 at 09:48:15PM -0400, linuxguruguy wrote:
> > Do kernel hackers ever sleep
>
> No.
Only in illegal contexts.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-03 1:48 Sleep linuxguruguy
2002-10-04 2:05 ` Sleep William Lee Irwin III
@ 2002-10-04 3:15 ` Joe Kellner
2002-10-04 8:07 ` Sleep jbradford
2 siblings, 0 replies; 13+ messages in thread
From: Joe Kellner @ 2002-10-04 3:15 UTC (permalink / raw)
To: linux-kernel
Well, as a whole they don't all sleep at the same time. I believe they all sleep
at different times corresponding (or not as the case may be) with their natural
sleep cycle. More than one kernel hacker may sleep at once, however.
Hope this clears things up for you sir.
Quoting linuxguruguy <linuxguruguy@aaahawk.com>:
> Do kernel hackers ever sleep
>
>
>
-------------------------------------------------
sent via KingsMeade secure webmail http://www.kingsmeadefarm.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-04 2:26 ` Sleep Andrew Morton
@ 2002-10-04 5:39 ` Gerrit Huizenga
0 siblings, 0 replies; 13+ messages in thread
From: Gerrit Huizenga @ 2002-10-04 5:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: William Lee Irwin III, linuxguruguy, linux-kernel
In message <3D9CFC53.C5871B95@digeo.com>, > : Andrew Morton writes:
> William Lee Irwin III wrote:
> >
> > On Wed, Oct 02, 2002 at 09:48:15PM -0400, linuxguruguy wrote:
> > > Do kernel hackers ever sleep
> >
> > No.
>
> Only in illegal contexts.
And then Andrew nabs them on photo radar.
gerrit
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-03 1:48 Sleep linuxguruguy
2002-10-04 2:05 ` Sleep William Lee Irwin III
2002-10-04 3:15 ` Sleep Joe Kellner
@ 2002-10-04 8:07 ` jbradford
2 siblings, 0 replies; 13+ messages in thread
From: jbradford @ 2002-10-04 8:07 UTC (permalink / raw)
To: linuxguruguy; +Cc: linux-kernel
> Do kernel hackers ever sleep
No, and they don't have girlfriends either, but they do add people to their killfile :-)
John.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Sleep
2002-10-04 2:05 ` Sleep William Lee Irwin III
2002-10-04 2:26 ` Sleep Andrew Morton
@ 2002-10-07 13:54 ` Bernd Petrovitsch
1 sibling, 0 replies; 13+ messages in thread
From: Bernd Petrovitsch @ 2002-10-07 13:54 UTC (permalink / raw)
To: linux-kernel
William Lee Irwin III <wli@holomorphy.com> wrote:
>On Wed, Oct 02, 2002 at 09:48:15PM -0400, linuxguruguy wrote:
>> Do kernel hackers ever sleep
>
>No.
ACK.
---- snip ----
{16}man 2 sleep
No entry for sleep in section 2 of the manual
---- snip ----
Bernd
--
Bernd Petrovitsch Email : bernd@gams.at
g.a.m.s gmbh Fax : +43 1 205255-900
Prinz-Eugen-Straße 8 A-1040 Vienna/Austria/Europe
LUGA : http://www.luga.at
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
@ 2017-10-26 0:12 Tobin C. Harding
2017-10-28 12:41 ` sleep Bogdan Lazic
2017-11-14 16:52 ` sleep Bruno E. O. Meneguele
0 siblings, 2 replies; 13+ messages in thread
From: Tobin C. Harding @ 2017-10-26 0:12 UTC (permalink / raw)
To: kernelnewbies
Is there any 'non-process' context apart from interrupt context? I had a
re-read of sleep sections in ldd3 and in Robert Love's book but am still
not totally clear on this.
The reason for the question is understanding when we cannot sleep.
thanks in advance,
Tobin.
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
2017-10-26 0:12 sleep Tobin C. Harding
@ 2017-10-28 12:41 ` Bogdan Lazic
2017-11-14 16:52 ` sleep Bruno E. O. Meneguele
1 sibling, 0 replies; 13+ messages in thread
From: Bogdan Lazic @ 2017-10-28 12:41 UTC (permalink / raw)
To: kernelnewbies
Sleeping while holding the spin lock is forbidden.
Sleeping in Tasklets is forbidden.
Best regards,
Bogdan
On 26.10.2017 02:12, Tobin C. Harding wrote:
> Is there any 'non-process' context apart from interrupt context? I had a
> re-read of sleep sections in ldd3 and in Robert Love's book but am still
> not totally clear on this.
>
> The reason for the question is understanding when we cannot sleep.
>
> thanks in advance,
> Tobin.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
2017-10-26 0:12 sleep Tobin C. Harding
2017-10-28 12:41 ` sleep Bogdan Lazic
@ 2017-11-14 16:52 ` Bruno E. O. Meneguele
2017-11-14 20:41 ` sleep Tobin C. Harding
2017-11-14 20:53 ` sleep Max Filippov
1 sibling, 2 replies; 13+ messages in thread
From: Bruno E. O. Meneguele @ 2017-11-14 16:52 UTC (permalink / raw)
To: kernelnewbies
On 26-10, Tobin C. Harding wrote:
> Is there any 'non-process' context apart from interrupt context? I had a
> re-read of sleep sections in ldd3 and in Robert Love's book but am still
> not totally clear on this.
>
> The reason for the question is understanding when we cannot sleep.
Well, AFAIK you can simplify things to interrupt vs process context, but
you might be aware that inside interrupt context there are others (NMI,
HWIRQ, SOFTIRQ, ..), infos that you can find in Robert's book. What
confused me for sometime was the 'atomic' vs 'interrupt' naming, but
after reading Robert's book it cames to the fact that they're the same.
The general rule is that in any interrupt context you can't sleep, and
why is that? Because interrupts aren't processes, there isn't an actual
process that the scheduler can put to sleep and wake it up later. It's
basically a design decision. Kernel-RT patches provide the feature of
sleepable interrupts, since the goal there is the latency and not
performance. That said, in short, the idea in Linux Kernel (I'm not an
expert, far from that actually, so anyone can correct me) is to make
interrupts atomic in behalf of simplicity and performance.
But hey, be careful, there are that talk about top vs bottom halves
mechanisms (to defer work) right? Top are always in interrupt context,
but bottom ones can run in process context. The most basic ones are
Softirqs, Tasklets and Workqueues, the former is the most low-level
available and I won't talk about it, but basicaly softirqs and tasklets
run in interrupt context, thus can't sleep, while workqueues is handled
in process context, thus can sleep normally (it can be rescheduled).
But as I said, I'm far from expert in the subject. What I've said here
is just what I know about :)
Hope it helps you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171114/d5bd8b2e/attachment-0001.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
2017-11-14 16:52 ` sleep Bruno E. O. Meneguele
@ 2017-11-14 20:41 ` Tobin C. Harding
2017-11-14 20:53 ` sleep Max Filippov
1 sibling, 0 replies; 13+ messages in thread
From: Tobin C. Harding @ 2017-11-14 20:41 UTC (permalink / raw)
To: kernelnewbies
On Tue, Nov 14, 2017 at 02:52:06PM -0200, Bruno E. O. Meneguele wrote:
> On 26-10, Tobin C. Harding wrote:
> > Is there any 'non-process' context apart from interrupt context? I had a
> > re-read of sleep sections in ldd3 and in Robert Love's book but am still
> > not totally clear on this.
> >
> > The reason for the question is understanding when we cannot sleep.
>
> Well, AFAIK you can simplify things to interrupt vs process context, but
> you might be aware that inside interrupt context there are others (NMI,
> HWIRQ, SOFTIRQ, ..), infos that you can find in Robert's book. What
> confused me for sometime was the 'atomic' vs 'interrupt' naming, but
> after reading Robert's book it cames to the fact that they're the same.
>
> The general rule is that in any interrupt context you can't sleep, and
> why is that? Because interrupts aren't processes, there isn't an actual
> process that the scheduler can put to sleep and wake it up later. It's
> basically a design decision. Kernel-RT patches provide the feature of
> sleepable interrupts, since the goal there is the latency and not
> performance. That said, in short, the idea in Linux Kernel (I'm not an
> expert, far from that actually, so anyone can correct me) is to make
> interrupts atomic in behalf of simplicity and performance.
>
> But hey, be careful, there are that talk about top vs bottom halves
> mechanisms (to defer work) right? Top are always in interrupt context,
> but bottom ones can run in process context. The most basic ones are
> Softirqs, Tasklets and Workqueues, the former is the most low-level
> available and I won't talk about it, but basicaly softirqs and tasklets
> run in interrupt context, thus can't sleep, while workqueues is handled
> in process context, thus can sleep normally (it can be rescheduled).
>
> But as I said, I'm far from expert in the subject. What I've said here
> is just what I know about :)
>
> Hope it helps you.
thanks for your response,
Tobin.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171115/94d3e61b/attachment.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
2017-11-14 16:52 ` sleep Bruno E. O. Meneguele
2017-11-14 20:41 ` sleep Tobin C. Harding
@ 2017-11-14 20:53 ` Max Filippov
2017-11-16 13:34 ` sleep Bruno E. O. Meneguele
1 sibling, 1 reply; 13+ messages in thread
From: Max Filippov @ 2017-11-14 20:53 UTC (permalink / raw)
To: kernelnewbies
On Tue, Nov 14, 2017 at 8:52 AM, Bruno E. O. Meneguele
<bmeneguele@gmail.com> wrote:
> What
> confused me for sometime was the 'atomic' vs 'interrupt' naming, but
> after reading Robert's book it cames to the fact that they're the same.
Not exactly the same. Atomic means you're protected from some sort of
interruption: e.g. you raise preemption counter and you're protected from
scheduling, but you still may be interrupted, or you disable interrupts and
you're protected from scheduling and interrupts, but there still may be an
NMI.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 13+ messages in thread
* sleep
2017-11-14 20:53 ` sleep Max Filippov
@ 2017-11-16 13:34 ` Bruno E. O. Meneguele
0 siblings, 0 replies; 13+ messages in thread
From: Bruno E. O. Meneguele @ 2017-11-16 13:34 UTC (permalink / raw)
To: kernelnewbies
On 14-11, Max Filippov wrote:
> On Tue, Nov 14, 2017 at 8:52 AM, Bruno E. O. Meneguele
> <bmeneguele@gmail.com> wrote:
> > What
> > confused me for sometime was the 'atomic' vs 'interrupt' naming, but
> > after reading Robert's book it cames to the fact that they're the same.
>
> Not exactly the same. Atomic means you're protected from some sort of
> interruption: e.g. you raise preemption counter and you're protected from
> scheduling, but you still may be interrupted, or you disable interrupts and
> you're protected from scheduling and interrupts, but there still may be an
> NMI.
>
Ahh, well pointed. Got it. Thank you for the info :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171116/ab20746b/attachment.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-11-16 13:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-03 1:48 Sleep linuxguruguy
2002-10-04 2:05 ` Sleep William Lee Irwin III
2002-10-04 2:26 ` Sleep Andrew Morton
2002-10-04 5:39 ` Sleep Gerrit Huizenga
2002-10-07 13:54 ` Sleep Bernd Petrovitsch
2002-10-04 3:15 ` Sleep Joe Kellner
2002-10-04 8:07 ` Sleep jbradford
-- strict thread matches above, loose matches on Subject: below --
2017-10-26 0:12 sleep Tobin C. Harding
2017-10-28 12:41 ` sleep Bogdan Lazic
2017-11-14 16:52 ` sleep Bruno E. O. Meneguele
2017-11-14 20:41 ` sleep Tobin C. Harding
2017-11-14 20:53 ` sleep Max Filippov
2017-11-16 13:34 ` sleep Bruno E. O. Meneguele
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.