From: MORITA Kazutaka <[email protected]> With this patch, collie can create an appropriate size of worker threads for dynamic work queues at the start time.
Signed-off-by: MORITA Kazutaka <[email protected]> --- lib/work.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/work.c b/lib/work.c index 1a90561..cf92096 100644 --- a/lib/work.c +++ b/lib/work.c @@ -263,6 +263,9 @@ int init_work_queue(size_t (*get_nr_nodes)(void), void (*create_cb)(pthread_t), wq_create_cb = create_cb; wq_destroy_cb = destroy_cb; + if (wq_get_nr_nodes) + nr_nodes = wq_get_nr_nodes(); + efd = eventfd(0, EFD_NONBLOCK); if (efd < 0) { sd_eprintf("failed to create an event fd: %m"); -- 1.7.9.5 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
