X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=b282abee48554b5c296953e3dc836b5cda63618c;hb=0122f6e65c5f92da210d3fc024b781cc4faa8a6f;hp=c4ce8a2b91b139db6212e7034951ed1955297a46;hpb=a1aeea86475db086ce95679962fb6d03d0a645f3;p=sliver-openvswitch.git diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c4ce8a2b9..b282abee4 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -738,7 +738,7 @@ ofproto_set_n_handler_threads(unsigned limit) if (limit) { n_handler_threads = limit; } else { - int n_proc = sysconf(_SC_NPROCESSORS_ONLN); + int n_proc = count_cpu_cores(); n_handler_threads = n_proc > 2 ? n_proc - 2 : 1; } }