Commit Graph

6 Commits

Author SHA1 Message Date
Gleb Natapov
c90e56e4fb memory: dynamically search for memory level in a topology
Current code assumes that memory is at node level, but on non numa
machines there is no node level at all. Instead of assuming memory
location in a topology search for it dynamically.
2014-12-01 14:09:36 +02:00
Gleb Natapov
a38f189f5a memory: handle hwloc cousin lists not circular
Use hwloc_get_next_obj_by_type() instead of directly following cousin
list and handle list wrap around. Also fixed use of uninitialized
variable (I wonder why compiler did not complain).
2014-11-30 16:20:53 +02:00
Gleb Natapov
cbc2f40680 memory: fix numa memory initialization
Current code crashes on an assert while dividing memory to cpus if number
of cpus seastar is configured to use is smaller then number of available
numa nodes. The reason is that seastar tries to use all available memory,
but considers only one numa node while dividing it. This patch makes
memory division two phase process: first each cpu tries to grub as
much memory from its local node as it can, second all free memory that
was left is divided between all cpus. The algorithm works like that to
prevent one cpu from stealing local memory from another cpu.
2014-11-30 12:50:23 +02:00
Avi Kivity
f80b2a6554 hwloc: fix leaking topology object 2014-11-18 10:28:23 +02:00
Avi Kivity
2d13f95a9f memory: support for non-hwloc builds 2014-10-13 15:41:18 +03:00
Avi Kivity
77f13169c0 core: add NUMA resource allocation functions
Add a wrapper around libhwloc to discover memory and processing resources,
and divide them among the configured cpu threads.
2014-10-12 16:35:48 +03:00