lkml.org 
[lkml]   [2008]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] poll: allow f_op->poll to sleep
On Tue, Aug 26, 2008 at 09:58:14AM -0700, Linus Torvalds wrote:
> I don't really see the point.
>
> poll() isn't allowed to sleep for many reasons. Some are technical. But
> the most obvious one is that a sleeping "poll()" is totally against the
> whole point of polling in the first place!
>
> So is there some big conceptual reason to change how poll() has always
> worked?

Just as a little sidenote most files on spufs have a ->poll that sleeps,
and currently we don't have any debugging to catch this, I just noticed
this by accident. The reason that it sleeps is because it needs to grab
a sleping lock, and as that lock protects against a rather complicate
type of hardware context switch it's not possible to replace it with
a spinlock.



\
 
 \ /
  Last update: 2008-08-26 21:53    [W:0.066 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site