[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 21/25] hostmem: set MPOL_MF_MOVE
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 21/25] hostmem: set MPOL_MF_MOVE |
Date: |
Wed, 27 Aug 2014 12:36:18 -0500 |
From: "Michael S. Tsirkin" <address@hidden>
When memory is allocated on a wrong node, MPOL_MF_STRICT
doesn't move it - it just fails the allocation.
A simple way to reproduce the failure is with mlock=on
realtime feature.
The code comment actually says: "ensure policy won't be ignored"
so setting MPOL_MF_MOVE seems like a better way to do this.
Cc: address@hidden
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit 288d3322022d6ad646407f3ca6f1a6a746565b9a)
Signed-off-by: Michael Roth <address@hidden>
---
backends/hostmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/hostmem.c b/backends/hostmem.c
index ca10c51..a9905c0 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -304,7 +304,7 @@ host_memory_backend_memory_complete(UserCreatable *uc,
Error **errp)
/* ensure policy won't be ignored in case memory is preallocated
* before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so
* this doesn't catch hugepage case. */
- unsigned flags = MPOL_MF_STRICT;
+ unsigned flags = MPOL_MF_STRICT | MPOL_MF_MOVE;
/* check for invalid host-nodes and policies and give more verbose
* error messages than mbind(). */
--
1.9.1
- [Qemu-stable] [PATCH 08/25] pc-dimm: validate node property, (continued)
- [Qemu-stable] [PATCH 08/25] pc-dimm: validate node property, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 13/25] target-arm: Fix return address for A64 BRK instructions, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 11/25] acpi: align RSDP, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 12/25] virtio-blk: fix reference a pointer which might be freed, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 01/25] qmp: hide "hotplugged" device property from device-list-properties, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 15/25] arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 17/25] raw-posix: fix O_DIRECT short reads, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 16/25] block/iscsi: fix memory corruption on iscsi resize, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 19/25] blkdebug: Delete BH in bdrv_aio_cancel, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 18/25] qemu-iotests: add test case 101 for short file I/O, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 21/25] hostmem: set MPOL_MF_MOVE,
Michael Roth <=
- [Qemu-stable] [PATCH 20/25] vmxnet3: Pad short frames to minimum size (60 bytes), Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 23/25] pc: reserve more memory for ACPI for new machine types, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 25/25] thread-pool: avoid deadlock in nested aio_poll() calls, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 24/25] thread-pool: avoid per-thread-pool EventNotifier, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 14/25] target-arm: Rename QEMU PSCI v0.1 definitions, Michael Roth, 2014/08/27
- [Qemu-stable] [PATCH 22/25] pcihp: fix possible array out of bounds, Michael Roth, 2014/08/27
- Re: [Qemu-stable] [Qemu-devel] Patch Round-up for stable 2.1.1, freeze on 2014-09-03, zhanghailiang, 2014/08/28
- Re: [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03, Paolo Bonzini, 2014/08/29