lkml.org 
[lkml]   [2020]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 0/4] mm: Add PG_zero support
From
Date
On 4/13/20 8:47 AM, Alex Williamson wrote:
>> You can delay pinning until the device is actually used. That should be
>> late enough for the host to figure out whether a paravirtualized IOMMU
>> is in place.
> So the guest enables the bus master bit in the command register and at
> that point we'd stall the VM for an indeterminate length of time while
> we potentially pin all memory, and hope that both the user and the host
> has the resources to account and allocate that memory, otherwise the
> VM suddenly crashes? All of this potentially taking place in the
> pre-boot environment to support option ROMs as well. A delay starting
> the VM seems a lot more predictable. Thanks,

BTW, there are a million ways to speed up VM startup without both
complicating the core VM *and* slowing down everybody that gets a
speedup from cache-hot pages coming out of the allocator.

Use ramfs or hugetlbfs files. Have a bunch of them sitting around,
preallocated (and zeroed) and dole them out as VMs start up.

Instead of complicating the core VM, do the pre-zeroing in hugetlbfs.
Zeroing at the time the pages get added to the pool wouldn't be the
worst thing and wouldn't touch the core VM.

\
 
 \ /
  Last update: 2020-04-13 18:44    [W:0.087 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site