Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-01-25 20:13, Alex Williamson wrote:
> On Tue, 2011-01-25 at 17:35 +0100, Jan Kiszka wrote:
>> On 2011-01-25 15:53, Avi Kivity wrote:
>>> On 01/25/2011 04:41 PM, Alex Williamson wrote:
>>>>>  >
>>>>>  >
>>>>>  >  kvm: Allow memory slot array to grow on demand
>>>>>  >
>>>>>  >  Remove fixed KVM_MEMORY_SLOTS limit, allowing the slot array
>>>>>  >  to grow on demand.  Private slots are now allocated at the
>>>>>  >  front instead of the end.  Only x86 seems to use private slots,
>>>>>
>>>>>  Hmm, doesn't current user space expect slots 8..11 to be the private
>>>>>  ones and wouldn't it cause troubles if slots 0..3 are suddenly
>>>> reserved?
>>>>
>>>> The private slots aren't currently visible to userspace, they're
>>>> actually slots 32..35.  The patch automatically increments user passed
>>>> slot ids so userspace has it's own zero-based view of the array.
>>>> Frankly, I don't understand why userspace reserves slots 8..11, is this
>>>> compatibility with older kernel implementations?
>>>
>>> I think so.  I believe these kernel versions are too old now to matter,
>>> but of course I can't be sure.
>>
>> Will check and enable those 4 additional slots for user space if we no
>> longer need to exclude them.
> 
> Appears that the history goes something like this...
> 
>       * Once upon a time we had 8 memory slots
> 
>       * v2.6.24-4949-ge0d62c7 added 4 reserved slots above those 8
> 
>       * v2.6.24-4950-gcbc9402 made use of slot 8 for tss
> 
>       * v2.6.24-4962-gf78e0e2 made use of slot 9 for tpr
> 
>       * v2.6.25-5341-gef2979b bumped the 8 slots to 32
> 
>       * v2.6.26-rc1-13-gb7ebfb0 made use of slot 10 for ept
> 
>       * v2.6.28-4952-g6fe6397 moved the previously hard coded slots
>         8,9,10 up to KVM_MEMORY_SLOTS + {0,1,2}
> 

Nice overview!

> So we haven't needed to reserve 8..11 for a while and we've never made
> use of all 4 private slots.  I should reduce that to 3 in my patch.
> Maybe there's a test we could do in userspace to figure out we don't
> have to skip those anymore?

We can simply remove the test, 2.6.29 is our entry barrier for both
upstream and qemu-kvm now.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux