]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: do not require 64GB in set_memory_region_test
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 1 Jul 2021 15:42:24 +0000 (17:42 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 6 Jul 2021 08:06:20 +0000 (10:06 +0200)
commit284c1cb104e11d6aa10932d9714a2056b6ebf306
tree03f0c2037e4e3bee4fa9da12573802c42f2ade40
parent90765432168d0acc83acb131abd246aea6abbaea
KVM: selftests: do not require 64GB in set_memory_region_test

Unless the user sets overcommit_memory or has plenty of swap, the latest
changes to the testcase will result in ENOMEM failures for hosts with
less than 64GB RAM. As we do not use much of the allocated memory, we
can use MAP_NORESERVE to avoid this error.

Cc: Zenghui Yu <yuzenghui@huawei.com>
Cc: vkuznets@redhat.com
Cc: wanghaibin.wang@huawei.com
Cc: stable@vger.kernel.org
Fixes: 3c95b97c53e2 ("KVM: selftests: Fix mapping length truncation in m{,un}map()")
Tested-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/kvm/20210701160425.33666-1-borntraeger@de.ibm.com/
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
tools/testing/selftests/kvm/set_memory_region_test.c