lkml.org 
[lkml]   [2002]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] epoll bits 0.34
>
>
> - Cleaned up locking
>
The cleanup is dangerous/broken: You call f_op->poll with disabled
interrupts.

> /* We have to drop the new item inside our item list to keep track of it */
> write_lock_irqsave(&ep->lock, flags);
>
>+ /* Add the current item to the hash table */
> list_add(&dpi->llink, ep_hash_entry(ep, ep_hash_index(ep, tfile)));
>
>+ /* Attach the item to the poll hooks and get current event bits */
>+ revents = tfile->f_op->poll(tfile, &pt);
>+
>
>
Which file descriptors are pollable with eventpoll? For example rtc_poll
does

spin_lock_irq();
do_work();
spin_unlock_irq();

I'm sure that there are other drivers that are be affected, I haven't
checked networking.

And is that really needed? Could you do the real work in the poll
callback instead of locking around the f_op call?

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:1.938 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site