qemu-devel
[Top][All Lists]
Advanced

[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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]