Re: [libvirt] PATCH: 18/25: Dynamic thread workers pool

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> The libvirtd.conf file has three parameters
>
>   max_clients
>   min_workers
>   max_workers
>
> When the daemon starts up it spawns min_workers threads. It
> accepts connections from upto max_clients. I never implemented
> the logic to auto-spawn more threads upto max_workers though.
...

Other than the request to rename "active",
and the signedness nits below, this looks fine.
ACK

> diff --git a/qemud/qemud.h b/qemud/qemud.h
...
>  struct qemud_server {
>      virMutex lock;
>      virCond job;
>
>      int nworkers;
> -    pthread_t *workers;
> +    int nactiveworkers;
> +    struct qemud_worker *workers;

It'd be nice to make all of these "n*" members unsigned,
assuming that they should never go negative.

>      int nsockets;
>      struct qemud_socket *sockets;
>      int nclients;

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]