[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0611071449410.17731@alien.or.mcafeemobile.com>
Date: Tue, 7 Nov 2006 14:53:33 -0800 (PST)
From: Davide Libenzi <davidel@...ilserver.org>
To: Evgeniy Polyakov <johnpol@....mipt.ru>
cc: David Miller <davem@...emloft.net>,
Ulrich Drepper <drepper@...hat.com>,
Andrew Morton <akpm@...l.org>, netdev <netdev@...r.kernel.org>,
Zach Brown <zach.brown@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
Chase Venters <chase.venters@...entec.com>,
Johann Borck <johann.borck@...sedata.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jeff Garzik <jeff@...zik.org>
Subject: Re: [take23 3/5] kevent: poll/select() notifications.
On Tue, 7 Nov 2006, Evgeniy Polyakov wrote:
> +static int kevent_poll_wait_callback(wait_queue_t *wait,
> + unsigned mode, int sync, void *key)
> +{
> + struct kevent_poll_wait_container *cont =
> + container_of(wait, struct kevent_poll_wait_container, wait);
> + struct kevent *k = cont->k;
> + struct file *file = k->st->origin;
> + u32 revents;
> +
> + revents = file->f_op->poll(file, NULL);
> +
> + kevent_storage_ready(k->st, NULL, revents);
> +
> + return 0;
> +}
Are you sure you can safely call file->f_op->poll() from inside a callback
based wakeup? The low level driver may be calling the wakeup with one of
its locks held, and during the file->f_op->poll may be trying to acquire
the same lock. I remember there was a discussion about this, and assuming
the above not true, made epoll code more complex (and slower, since an
extra O(R) loop was needed to fetch events).
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists