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, 26 Aug 2008, Tejun Heo wrote:
>
> This patch converts poll/select to use custom wake up function and use
> separate triggered variable to synchronize against wake up events.
> The only added overhead is an extra function call during wake up and
> negligible.

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?

If you worry about debuggability, then we could just add a

preempt_enable();
..
preempt_disable();

around the poll calls (purely for catching errors) to get a big warning if
somebody tries to call a sleepable function.

Linus


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