virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@kvack.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Marcelo Tosatti <marcelo@kvack.org>,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] KVM virtio balloon driver
Date: Tue, 15 Jan 2008 12:22:01 -0200	[thread overview]
Message-ID: <20080115142201.GA26055@dmt> (raw)
In-Reply-To: <478BD449.4060407@codemonkey.ws>

On Mon, Jan 14, 2008 at 03:29:45PM -0600, Anthony Liguori wrote:
> Marcelo Tosatti wrote:
> >Hi Rusty,
> >
> >It was agreed that the balloon driver should be merged through the
> >virtio tree, so here it goes. It depends on the config_changed patch
> >posted earlier.
> >
> >
> >-----
> >
> >Following patch adds the KVM balloon driver.
> >
> >Changes from last version:
> >- Get rid of global variables/structure
> >- Use page->lru to link ballooned pages
> >- Use dev_dbg/dev_printk
> >- Proper kthread_should_stop handling
> >- Move shared definitions to separate header
> >- Use ->config_changed method for notification
> >
> >This depends on Rusty's config_changed patch.
> >
> >Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> >
> >Index: linux-2.6-nv/drivers/virtio/Kconfig
> >===================================================================
> >--- linux-2.6-nv.orig/drivers/virtio/Kconfig
> >+++ linux-2.6-nv/drivers/virtio/Kconfig
> >@@ -23,3 +23,12 @@ config VIRTIO_PCI
> > 
> > 	  If unsure, say M.
> > 
> >+config KVM_BALLOON
> >+	tristate "KVM balloon driver (EXPERIMENTAL)"
> >+	depends on VIRTIO_PCI
> >+	---help---
> >+	 This driver provides support for ballooning memory in/out of a
> >+	 KVM paravirt guest.	
> >+
> >+	 If unsure, say M.
> >+
> 
> 
> Please rename from KVM_BALLOON to VIRTIO_BALLOON.  Also, it doesn't 
> depend on VIRTIO_PCI.  It should select VIRTIO and VIRTIO_RING.
> 
> 
> 
> >Index: linux-2.6-nv/drivers/virtio/Makefile
> >===================================================================
> >--- linux-2.6-nv.orig/drivers/virtio/Makefile
> >+++ linux-2.6-nv/drivers/virtio/Makefile
> >@@ -1,3 +1,4 @@
> > obj-$(CONFIG_VIRTIO) += virtio.o
> > obj-$(CONFIG_VIRTIO_RING) += virtio_ring.o
> > obj-$(CONFIG_VIRTIO_PCI) += virtio_pci.o
> >+obj-$(CONFIG_KVM_BALLOON) += kvm_balloon.o
> >Index: linux-2.6-nv/drivers/virtio/kvm_balloon.c
> >===================================================================
> >--- /dev/null
> >+++ linux-2.6-nv/drivers/virtio/kvm_balloon.c
> >@@ -0,0 +1,537 @@
> >+/*
> >+ * KVM guest balloon driver
> >+ *
> >+ * Copyright (C) 2007, Qumranet, Inc., Dor Laor <dor.laor@qumranet.com>
> >+ * Copyright (C) 2007, Red Hat, Inc., Marcelo Tosatti 
> ><mtosatti@redhat.com>
> >+ * 
> >+ * This work is licensed under the terms of the GNU GPL, version 2.  See
> >+ * the COPYING file in the top-level directory.
> >+ */
> >+
> >+#define DEBUG
> >+#include <asm/uaccess.h>
> >+#include <linux/kernel.h>
> >+#include <linux/module.h>
> >+#include <linux/percpu.h>
> >+#include <linux/init.h>
> >+#include <linux/interrupt.h>
> >+#include <linux/mm.h>
> >+#include <linux/swap.h>
> >+#include <linux/wait.h>
> >+#include <linux/kthread.h>
> >+#include <linux/freezer.h>
> >+#include <linux/version.h>
> >+#include <linux/virtio.h>
> >+#include <linux/virtio_config.h>
> >+#include <linux/virtio_balloon.h>
> >+#include <linux/preempt.h>
> >+#include <linux/kvm_types.h>
> >+#include <linux/kvm_host.h>
> 
> Please don't include kvm_types or kvm_host.
> 
> >+
> >+MODULE_AUTHOR ("Dor Laor");
> >+MODULE_DESCRIPTION ("Implements guest ballooning support");
> >+MODULE_LICENSE("GPL");
> >+MODULE_VERSION("1");
> >+
> >+static int kvm_balloon_debug;
> >+
> >+#define dprintk(dev, str...) if (kvm_balloon_debug) dev_dbg(dev, str)
> 
> This can go away.

I think this is useful for debugging problems on field.

Fixed the previous comments, thanks.

  reply	other threads:[~2008-01-15 14:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14 20:03 [PATCH] KVM virtio balloon driver Marcelo Tosatti
2008-01-14 21:29 ` Anthony Liguori
2008-01-15 14:22   ` Marcelo Tosatti [this message]
2008-01-14 23:32 ` Rusty Russell
2008-01-15 19:01   ` Marcelo Tosatti
2008-01-16 23:12     ` Dor Laor
     [not found]     ` <1200525166.26281.103.camel@localhost.localdomain>
2008-01-17  1:45       ` [PATCH] KVM simplified " Rusty Russell
     [not found]       ` <200801171245.59510.rusty@rustcorp.com.au>
2008-01-17  2:14         ` [kvm-devel] " Anthony Liguori
     [not found]         ` <478EBA22.30301@codemonkey.ws>
2008-01-17  3:29           ` Rusty Russell
     [not found]           ` <200801171429.32888.rusty@rustcorp.com.au>
2008-01-17  4:01             ` Anthony Liguori
     [not found]             ` <478ED32A.1060803@codemonkey.ws>
2008-01-17  5:59               ` Rusty Russell
2008-01-19  7:05               ` Avi Kivity
2008-01-17  9:32         ` Christian Borntraeger
     [not found]         ` <200801171032.26198.borntraeger@de.ibm.com>
2008-01-17 10:25           ` Martin Schwidefsky
     [not found]           ` <1200565558.22385.13.camel@localhost>
2008-01-17 11:40             ` Dor Laor
     [not found]             ` <1200570025.26281.141.camel@localhost.localdomain>
2008-01-17 13:56               ` Anthony Liguori
2008-01-17 23:01                 ` Dor Laor
     [not found]                 ` <1200610891.26281.171.camel@localhost.localdomain>
2008-01-17 23:35                   ` Anthony Liguori
2008-01-19  7:02         ` [kvm-devel] " Avi Kivity
2008-01-19 22:37           ` Anthony Liguori
2008-01-19 22:37           ` Anthony Liguori
     [not found]           ` <47927BB7.7060805@codemonkey.ws>
2008-01-20  0:24             ` Marcelo Tosatti
     [not found]             ` <20080120002433.GA6880@dmt>
2008-01-20  0:40               ` Anthony Liguori
     [not found]               ` <47929884.2010908@codemonkey.ws>
2008-01-24  1:58                 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080115142201.GA26055@dmt \
    --to=marcelo@kvack.org \
    --cc=anthony@codemonkey.ws \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).