lib: Determine cpu core count with /proc/cpuinfo.
authorJoe Stringer <joestringer@nicira.com>
Fri, 6 Dec 2013 07:42:21 +0000 (07:42 +0000)
committerEthan Jackson <ethan@nicira.com>
Tue, 10 Dec 2013 03:00:37 +0000 (19:00 -0800)
commitdeaa2985faa924fe2f87f669bdcd35617ffe774f
tree9025d5f592ab61cf7a69a0b6494f44d2049807bd
parent0122f6e65c5f92da210d3fc024b781cc4faa8a6f
lib: Determine cpu core count with /proc/cpuinfo.

On systems that provide /proc/cpuinfo similar to Linux on x86, this
should allow us to choose a better default value for the number of
upcall handler threads -- in particular, it avoids counting
hyper-thread cores. If /proc/cpuinfo cannot be parsed for any reason,
fall back to using sysconf().

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/ovs-thread.c