VM: allocate cache pages in mmap region
That way, these pages are transferred during live update, as they should. This resolves a mfs crash after a number of live updates. Change-Id: Ia53bec2692b2114c29b96a453beb0f915f56453a
This commit is contained in:
parent
7f79fb8810
commit
4506a0eebf
1 changed files with 4 additions and 1 deletions
|
@ -121,10 +121,13 @@ do_mapcache(message *msg)
|
|||
* in case instrumentation needs to allocate in-band metadata later.
|
||||
* This does effectively halve the usable part of the caller's address
|
||||
* space, though, so only do this if we are instrumenting at all.
|
||||
* Also make sure it falls within the mmap range, so that it is
|
||||
* transferred upon live update. This again cuts the usable part of
|
||||
* the address space for caching purposes in half.
|
||||
*/
|
||||
alloc_bytes += VM_PAGE_SIZE;
|
||||
#endif
|
||||
if (!(vr = map_page_region(caller, VM_PAGE_SIZE, VM_DATATOP,
|
||||
if (!(vr = map_page_region(caller, VM_MMAPBASE, VM_MMAPTOP,
|
||||
alloc_bytes, VR_ANON | VR_WRITABLE, 0, &mem_type_cache))) {
|
||||
printf("VM: map_page_region failed\n");
|
||||
return ENOMEM;
|
||||
|
|
Loading…
Reference in a new issue