All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com,
	viro@math.psu.edu, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] epoll bits 0.34
Date: Mon, 11 Nov 2002 19:09:55 +0100	[thread overview]
Message-ID: <3DCFF273.4020403@colorfullife.com> (raw)

>
>
> - 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


             reply	other threads:[~2002-11-11 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11 18:09 Manfred Spraul [this message]
2002-11-11 18:42 ` [PATCH] epoll bits 0.34 Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DCFF273.4020403@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.