On Fri, Apr 19, 2024 at 04:49 PM +0200, Marc Hartmayer <mhartmay@xxxxxxxxxxxxx> wrote: > Use a worker pool for processing the events (e.g. udev, mdevctl config changes) > and the initialization instead of a separate initThread and a mdevctl-thread. > This has the large advantage that we can leverage the job API and now this > thread pool is responsible to do all the "costly-work" and emitting the libvirt > nodedev events. > > Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx> > --- […snip…] > > + /* must be initialized before trying to reconnect to all the running mdevs > + * since there might occur some mdevctl monitor events that will be > + * dispatched to the worker pool */ > + priv->workerPool = virThreadPoolNewFull(1, 1, 0, > nodeDeviceEventHandler, The more I think about the number of workers in this pool, the more I'm convinced that it's (currently) important to use only _one_ worker (1 udev thread <-> 1 worker), because otherwise we don't have any guarantees that we comply to the following: order(udev_events) == order(libvirt nodedev events) And I guess we would like to fulfill this guarantee. If you agree, then we should add a comment to the code and if needed we can implement something for the case #count > 1. […snip] -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx