mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
vmm: memory_manager: Allow host NUMA for RAM backed files
Let's narrow down the limitation related to mbind() by allowing shared mappings backed by a file backed by RAM. This leaves the restriction on only for mappings backed by a regular file. With this patch, host NUMA node can be specified even if using vhost-user devices. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
1b4591aecc
commit
a8a9e61c3d
@ -402,10 +402,10 @@ impl MemoryManager {
|
||||
for zone in zones.iter() {
|
||||
total_ram_size += zone.size;
|
||||
|
||||
if zone.shared && zone.host_numa_node.is_some() {
|
||||
if zone.shared && zone.file.is_some() && zone.host_numa_node.is_some() {
|
||||
error!(
|
||||
"Invalid to set host NUMA policy for a memory zone \
|
||||
mapped as 'shared'"
|
||||
backed by a regular file and mapped as 'shared'"
|
||||
);
|
||||
return Err(Error::InvalidSharedMemoryZoneWithHostNuma);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user