[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocat
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocate guest memory |
Date: |
Thu, 13 Jun 2013 19:27:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Richard Henderson <address@hidden> writes:
> On 06/13/2013 12:02 AM, Markus Armbruster wrote:
>> @@ -945,7 +952,7 @@ static void *file_ram_alloc(RAMBlock *block,
>> area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
>> #endif
>> if (area == MAP_FAILED) {
>> - perror("file_ram_alloc: can't mmap RAM pages");
>> + no_guest_mem(block);
>> close(fd);
>> return (NULL);
>> }
>
> Dead code after no_guest_mem.
Right you are.
Before: if allocation obeying -mem-path fails, we retry without
-mem-path. Some failures are silent.
After: if mmap() fails, we give up. Functional change not mentioned in
commit message. I'll either revert it or document it.
I'm not sure falling back to non-mem-path allocation is a good idea in
all failure cases.
Thanks!
- Re: [Qemu-devel] [PATCH RFC 6/8] exec: Clean up unnecessary S390 ifdeffery, (continued)
- [Qemu-devel] [PATCH RFC 1/8] exec: Fix Xen RAM allocation with unusual options, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 4/8] s390: Simplify the RAM allocation hook, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 8/8] pc_sysfw: Fix ISA BIOS init for ridiculously big flash, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocate guest memory, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 5/8] s390: Make qemu_ram_remap() consistent with allocation, Markus Armbruster, 2013/06/13
- Re: [Qemu-devel] [PATCH RFC 0/8] Guest memory allocation fixes & cleanup, Markus Armbruster, 2013/06/13