Re: [KVM-RFC PATCH 1/2] eventfd: add an explicit srcu basednotifier interface
From: Michael S. Tsirkin
Date: Tue Jun 16 2009 - 10:46:51 EST
On Tue, Jun 16, 2009 at 10:40:55AM -0400, Gregory Haskins wrote:
> > This is ugly, isn't it? With CONFIG_PREEMPT=no preemptible() is always false.
> > Further, to do useful things it might not be enough that you can sleep:
> > with iofd you also want to access current task with e.g. copy from user.
> Something else to consider: For iosignalfd, we can assume we will
> always be called from vcpu process context so we might not really need
> official affirmation from the system. For irqfd, we cannot predict who
> may be injecting the interrupt (for instance, it might be a
> PCI-passthrough hard-irq context). I am not sure if this knowledge
> actually helps to simplify the problem space, but I thought I should
> mention it.
The way this is addressed with eventfd_signal_task proposal is:
- user calls eventfd_signal_task
we look at current->mm and figure out whether this is the right
context or we need a context switch
- everyone else calls eventfd_signal
we know that we need a context switch
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/