kumon@flab.fujitsu.co.jp wrote:
>
> But I don't realy understand, what portion actually needs the lock?
>
Only the innermost "->poll()" call needs the lock.
if(file->f_op && file->f_op->poll) {
lock_kernel()
mask = file->f_op->poll(file,wait);
unlock_kernel();
}
All bit operations could run without the big kernel lock. I thought
about moving lock_kernel() into the for(;;) loop, but I decided (without
any benchmarks) against it - lock_kernel()+unlock_kernel() cost at least
40 ticks :-)
Linus, could we allow "->poll()" without lock_kernel?
* sock_poll() could run without the big lock.
* pipe_poll() is safe.
there are around 70 other poll functions, but we must add lock_kernel()
to _write() and _read() of all legacy drivers anyway (at least on Alan's
todo list), it wouldn't matter if we add that to 2 or 3 functions.
-- Manfred- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST