lkml.org 
[lkml]   [2020]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
From
Date
>> commit bf50e69f63d21091e525185c3ae761412be0ba72
>> Author: Dave Hansen <dave@linux.vnet.ibm.com>
>> Date: Thu Apr 7 10:43:25 2011 -0700
>>
>> virtio balloon: kill tell-host-first logic
>>
>> The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST
>> feature bit. Whenever the bit is set, the guest kernel must
>> always tell the host before we free pages back to the allocator.
>> Without this feature, we might free a page (and have another
>> user touch it) while the hypervisor is unprepared for it.
>>
>> But, if the bit is _not_ set, we are under no obligation to
>> reverse the order; we're under no obligation to do _anything_.
>> As of now, qemu-kvm defines the bit, but doesn't set it.
>
> Well this is not what the spec says in the end.

I didn't check the spec, maybe I should do that :)

> To continue that commit message:
>
> This patch makes the "tell host first" logic the only case. This
> should make everybody happy, and reduce the amount of untested or
> untestable code in the kernel.

Yeah, but this comment explains that the current deflate is only in
place, because it makes the code simpler (to support both cases). Of
course, doing the deflate might result in performance improvements.
(e.g., MADV_WILLNEED)

>
> you can try proposing the change to the virtio TC, see what do others
> think.

We can just drop the comment from this patch for now. The tell_host host
not be an issue AFAIKS.

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-02-06 10:07    [W:0.054 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site