Avi Kivity wrote: > Marcelo Tosatti wrote: > >> Handle the case where the balloon target is larger than total ram size. >> >> BUG: unable to handle kernel paging request at 0000000000100100 >> IP: [<ffffffff881970f9>] :virtio_balloon:leak__balloon+0x2e/0xbe >> >> Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> >> >> Index: virtio/virtio_balloon.c >> =================================================================== >> --- a/drivers/virtio/virtio_balloon.c >> +++ b/drivers/virtio/virtio_balloon.c >> @@ -122,10 +122,21 @@ static void release_pages_by_pfn(const u >> } >> } >> >> +static void update_target_size(struct virtio_balloon *vb) >> +{ >> + __le32 num_pages = cpu_to_le32(vb->num_pages); >> + >> + vb->vdev->config->set(vb->vdev, >> + offsetof(struct virtio_balloon_config, num_pages), >> + &num_pages, sizeof(num_pages)); >> +} >> >> > > The target is host-owned; moreover the problem may be temporary, but > you've changed the target permanently. > > Suggest sending the host a message (like the page list) indicating it > couldn't allocate any more. >
This is what the actual field in the config space is meant for. > Also, we may have driven the guest close to oom with this. We need to > notify the host when the guest gets into a low-memory cannot swap condition. > We need an OOM handler and a high seek-cost shrinker to ensure we do not go too low I imagine. We can notify the host of when we refuse to go lower with actual in the config space. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel