[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event |
Date: |
Fri, 26 Mar 2010 15:23:03 +0000 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; ) |
> On Thu, Mar 25, 2010 at 09:06:00PM +0000, Paul Brook wrote:
> > > /* Force QEMU to process pending events */
> > > -void qemu_notify_event(void);
> > > +void qemu_notify_event(QEMUIOWorker *worker);
> > >
> > > static void handle_input(VirtIODevice *vdev, VirtQueue *vq)
> > > {
> > > + qemu_notify_event(main_io_worker);
> > > }
> >
> > This feels completely wrong.
> >
> > Devices shouldn't know or care about implementation details like this.
> > How is a device supposed to know which worker it should be waking up?
>
> Its not. It could use qemu_notify_event(DeviceInfo->worker), and have no
> knowledge of the internals.
In that case I think you're abusing this API.
I'm very wary of introducing random bits of code that allegedly allow future
use of threads. Exploiting thread level parallelism is a hard problem that
needs proper design. A such I object to this patch, and think we first need
to decide what form of concurrency model we want to use in QEMU.
Paul
- [Qemu-devel] [patch 0/2] introduce QEMUIOWorker and wake up iothread on virtio-serial-bus notification, Marcelo Tosatti, 2010/03/11
- [Qemu-devel] [patch 2/2] virtio-serial-bus: wake up iothread upon guest read notification, Marcelo Tosatti, 2010/03/11
- [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Marcelo Tosatti, 2010/03/11
- Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Anthony Liguori, 2010/03/22
- [Qemu-devel] [patch 0/2] introduce QEMUIOWorker and wake up iothread on virtio-serial-bus notification (v2), Marcelo Tosatti, 2010/03/25
- [Qemu-devel] [patch 2/2] virtio-serial-bus: wake up iothread upon guest read notification, Marcelo Tosatti, 2010/03/25
- [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Marcelo Tosatti, 2010/03/25
- Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Paul Brook, 2010/03/25
- Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Marcelo Tosatti, 2010/03/26
- Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event,
Paul Brook <=
- Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event, Anthony Liguori, 2010/03/26