git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib: Refactor gathering CPU core count
[sliver-openvswitch.git]
/
ofproto
/
ofproto.c
diff --git
a/ofproto/ofproto.c
b/ofproto/ofproto.c
index
c4ce8a2
..
b282abe
100644
(file)
--- 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;
}
}