* Re: [PATCH] epoll bits 0.34
@ 2002-11-11 18:09 Manfred Spraul
2002-11-11 18:42 ` Davide Libenzi
0 siblings, 1 reply; 2+ messages in thread
From: Manfred Spraul @ 2002-11-11 18:09 UTC (permalink / raw)
To: Davide Libenzi; +Cc: linux-kernel, torvalds, viro, linux-fsdevel
>
>
> - 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] epoll bits 0.34
2002-11-11 18:09 [PATCH] epoll bits 0.34 Manfred Spraul
@ 2002-11-11 18:42 ` Davide Libenzi
0 siblings, 0 replies; 2+ messages in thread
From: Davide Libenzi @ 2002-11-11 18:42 UTC (permalink / raw)
To: Manfred Spraul
Cc: Linux Kernel Mailing List, Linus Torvalds, Alexander Viro, linux-fsdevel
On Mon, 11 Nov 2002, Manfred Spraul wrote:
> 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?
I'll take care of it, thx for your precious input.
- Davide
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-11 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11 18:09 [PATCH] epoll bits 0.34 Manfred Spraul
2002-11-11 18:42 ` Davide Libenzi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).