qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 07/18] xen: add event channel interface for XenD


From: Paul Durrant
Subject: Re: [Qemu-block] [PATCH 07/18] xen: add event channel interface for XenDevice-s
Date: Wed, 5 Dec 2018 16:16:41 +0000

> -----Original Message-----
> From: Anthony PERARD [mailto:address@hidden
> Sent: 04 December 2018 14:25
> To: Paul Durrant <address@hidden>
> Cc: address@hidden; address@hidden; xen-
> address@hidden; Stefano Stabellini <address@hidden>
> Subject: Re: [PATCH 07/18] xen: add event channel interface for XenDevice-
> s
> 
> On Mon, Dec 03, 2018 at 04:24:24PM +0000, Anthony PERARD wrote:
> > On Wed, Nov 21, 2018 at 03:12:00PM +0000, Paul Durrant wrote:
> > > +static void xen_device_event(void *opaque)
> > > +{
> > > +    XenDevice *xendev = opaque;
> > > +    unsigned long port = xenevtchn_pending(xendev->xeh);
> > > +
> > > +    notifier_list_notify(&xendev->event_notifiers, (void *)port);
> >
> > I wonder if a Notifier is a good fit for XenDevice, like here for the
> > events or the xenstore watches in previous patches, as NotifierLists are
> > normaly used when every Notifiers want to do something, but here there
> > is only one that is going to do something. But I guess it might not be
> > much better to write a loop in here rather than use the one in
> > notifier_list_notify.
> 
> I've seen that you use GHashTable in a following patch, wouldn't that be
> useful to use for xenstore watches and evtchn events as well?
> 

There's precedent for using Notifier lists for this kind of thing. A hash table 
may be an optimization but I'd rather stick with the lists for now... I know 
they work :-)

  Paul

> 
> --
> Anthony PERARD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]