* [PATCH 24/25] Staging: hv: Use the shutdown() function in struct hv_driver
From: K. Y. Srinivasan @ 2011-04-26 16:20 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang, Abhishek Kane
In-Reply-To: <1303834842-5022-1-git-send-email-kys@microsoft.com>
Use the newly introduced shutdown() function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 6 +++---
drivers/staging/hv/vmbus_drv.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 80f7c0e..db44cf6 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -585,9 +585,9 @@ static int blkvsc_remove(struct hv_device *dev)
}
-static void blkvsc_shutdown(struct device *device)
+static void blkvsc_shutdown(struct hv_device *dev)
{
- struct block_device_context *blkdev = dev_get_drvdata(device);
+ struct block_device_context *blkdev = dev_get_drvdata(&dev->device);
unsigned long flags;
if (!blkdev)
@@ -883,7 +883,7 @@ static int blkvsc_drv_init(void)
drv->probe = blkvsc_probe;
drv->remove = blkvsc_remove;
- drv->driver.shutdown = blkvsc_shutdown;
+ drv->shutdown = blkvsc_shutdown;
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(&drv->driver);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e09b363..f95ec2b 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -368,6 +368,7 @@ static int vmbus_remove(struct device *child_device)
static void vmbus_shutdown(struct device *child_device)
{
struct hv_driver *drv;
+ struct hv_device *dev = device_to_hv_device(child_device);
/* The device may not be attached yet */
@@ -376,9 +377,8 @@ static void vmbus_shutdown(struct device *child_device)
drv = drv_to_hv_drv(child_device->driver);
- /* Let the specific open-source driver handles the removal if it can */
- if (drv->driver.shutdown)
- drv->driver.shutdown(child_device);
+ if (drv->shutdown)
+ drv->shutdown(dev);
return;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 25/25] Staging: hv: VMBUS is a acpi enumerated device; get irq value from bios.
From: K. Y. Srinivasan @ 2011-04-26 16:20 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang, Abhishek Kane
In-Reply-To: <1303834842-5022-1-git-send-email-kys@microsoft.com>
On some windows hosts, the Linux PCI sub-system is not allocating irq resources to the
vmbus driver. It looks like VMBUS is an ACPI enumerated device. Retrieve the irq
information from DSDT. Currently we use this bios specified irq, if the PCI
sub-system fails to allocate the irq.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 101 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 100 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index f95ec2b..1c5d43a 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -17,8 +17,8 @@
* Authors:
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
+ * K. Y. Srinivasan <kys@microsoft.com>
*
- * 3/9/2011: K. Y. Srinivasan - Significant restructuring and cleanup
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -31,6 +31,8 @@
#include <linux/pci.h>
#include <linux/dmi.h>
#include <linux/slab.h>
+#include <linux/acpi.h>
+#include <acpi/acpi_bus.h>
#include <linux/completion.h>
#include "version_info.h"
#include "hv_api.h"
@@ -52,6 +54,7 @@ EXPORT_SYMBOL(vmbus_loglevel);
static int pci_probe_error;
static struct completion probe_event;
+static int irq;
static void get_channel_info(struct hv_device *device,
struct hv_device_info *info)
@@ -723,6 +726,74 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
}
+/*
+ * VMBUS is an acpi enumerated device. Get the the IRQ information
+ * from DSDT.
+ */
+
+static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *irq)
+{
+
+ if (res->type == ACPI_RESOURCE_TYPE_IRQ) {
+ struct acpi_resource_irq *irqp;
+ irqp = &res->data.irq;
+
+ *((unsigned int *)irq) = irqp->interrupts[0];
+ }
+
+ return AE_OK;
+}
+
+static int vmbus_acpi_add(struct acpi_device *device)
+{
+ acpi_status result;
+
+ result =
+ acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+ vmbus_walk_resources, &irq);
+
+ if (ACPI_FAILURE(result)) {
+ complete(&probe_event);
+ return -ENODEV;
+ }
+ complete(&probe_event);
+ return 0;
+}
+
+static const struct acpi_device_id vmbus_acpi_device_ids[] = {
+ {"VMBUS", 0},
+ {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, vmbus_acpi_device_ids);
+
+static struct acpi_driver vmbus_acpi_driver = {
+ .name = "vmbus",
+ .ids = vmbus_acpi_device_ids,
+ .ops = {
+ .add = vmbus_acpi_add,
+ },
+};
+
+static int vmbus_acpi_init(void)
+{
+ int result;
+
+
+ result = acpi_bus_register_driver(&vmbus_acpi_driver);
+ if (result < 0)
+ return result;
+
+ return 0;
+}
+
+static void vmbus_acpi_exit(void)
+{
+ acpi_bus_unregister_driver(&vmbus_acpi_driver);
+
+ return;
+}
+
+
static int __devinit hv_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -732,7 +803,16 @@ static int __devinit hv_pci_probe(struct pci_dev *pdev,
if (pci_probe_error)
goto probe_cleanup;
+ /*
+ * If the PCI sub-sytem did not assign us an
+ * irq, use the bios provided one.
+ */
+
+ if (pdev->irq == 0)
+ pdev->irq = irq;
+
pci_probe_error = vmbus_bus_init(pdev);
+
if (pci_probe_error)
pci_disable_device(pdev);
@@ -762,6 +842,25 @@ static struct pci_driver hv_bus_driver = {
static int __init hv_pci_init(void)
{
int ret;
+
+ init_completion(&probe_event);
+
+ /*
+ * Get irq resources first.
+ */
+
+ ret = vmbus_acpi_init();
+ if (ret)
+ return ret;
+
+ wait_for_completion(&probe_event);
+
+ if (irq <= 0) {
+ vmbus_acpi_exit();
+ return -ENODEV;
+ }
+
+ vmbus_acpi_exit();
init_completion(&probe_event);
ret = pci_register_driver(&hv_bus_driver);
if (ret)
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH 20/25] Staging: hv: Use the probe function in struct hv_driver
From: Christoph Hellwig @ 2011-04-26 16:51 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: gregkh, linux-kernel, devel, virtualization, Haiyang Zhang,
Abhishek Kane, Hank Janssen
In-Reply-To: <1303834842-5022-20-git-send-email-kys@microsoft.com>
> @@ -882,7 +882,7 @@ static int blkvsc_drv_init(void)
>
> drv->driver.name = storvsc_drv_obj->base.name;
>
> - drv->driver.probe = blkvsc_probe;
> + drv->probe = blkvsc_probe;
> drv->driver.remove = blkvsc_remove;
> drv->driver.shutdown = blkvsc_shutdown;
Not new in this patch, but you should really declare the driver as a
static object and initialize it at compile time, similar to how it's
done for PCI and countless other busses, e.g.
struct hv_driver blkvsc_driver {
.name = "blkvsc",
.probe = blkvsc_probe,
.remove = blkvsc_remove,
.shutdown = blkvsc_shutdown,
};
^ permalink raw reply
* Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
From: Christoph Hellwig @ 2011-04-26 16:57 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel, devel, virtualization
In-Reply-To: <1303834785-4981-1-git-send-email-kys@microsoft.com>
Do you have a repository containing the current state of your patche
somewhere? There's been so much cleanup that it's hard to review these
patches against the current mainline codebase.
^ permalink raw reply
* RE: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
From: KY Srinivasan @ 2011-04-26 17:04 UTC (permalink / raw)
To: Christoph Hellwig
Cc: devel@linuxdriverproject.org, gregkh@suse.de,
linux-kernel@vger.kernel.org, virtualization@lists.osdl.org
In-Reply-To: <20110426165704.GA29301@infradead.org>
> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org]
> Sent: Tuesday, April 26, 2011 12:57 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
>
> Do you have a repository containing the current state of your patche
> somewhere? There's been so much cleanup that it's hard to review these
> patches against the current mainline codebase.
Christoph,
Yesterday (April 25, 2011), Greg checked in all of the outstanding hv patches. So, if
You checkout Greg's tree today, you will get the most recent hv codebase. This current
patch-set is against Greg's current tree.
Regards,
K. Y
^ permalink raw reply
* Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
From: Greg KH @ 2011-04-26 19:39 UTC (permalink / raw)
To: KY Srinivasan
Cc: Christoph Hellwig, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
In-Reply-To: <6E21E5352C11B742B20C142EB499E0481DAFB2@TK5EX14MBXC124.redmond.corp.microsoft.com>
On Tue, Apr 26, 2011 at 05:04:36PM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Christoph Hellwig [mailto:hch@infradead.org]
> > Sent: Tuesday, April 26, 2011 12:57 PM
> > To: KY Srinivasan
> > Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> > devel@linuxdriverproject.org; virtualization@lists.osdl.org
> > Subject: Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
> >
> > Do you have a repository containing the current state of your patche
> > somewhere? There's been so much cleanup that it's hard to review these
> > patches against the current mainline codebase.
>
> Christoph,
>
> Yesterday (April 25, 2011), Greg checked in all of the outstanding hv patches. So, if
> You checkout Greg's tree today, you will get the most recent hv codebase. This current
> patch-set is against Greg's current tree.
It's also always in the linux-next tree, which is easier for most people
to work off of.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
From: Greg KH @ 2011-04-26 19:40 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: linux-kernel, devel, virtualization, Haiyang Zhang, Abhishek Kane,
Hank Janssen
In-Reply-To: <1303834842-5022-18-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:35AM -0700, K. Y. Srinivasan wrote:
> Now, get rid of struct hv_bus. We will no longer be embedding
> struct bus_type.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> ---
> drivers/staging/hv/vmbus_drv.c | 33 ++++++++++++++-------------------
> 1 files changed, 14 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> index a3a7741..515311c 100644
> --- a/drivers/staging/hv/vmbus_drv.c
> +++ b/drivers/staging/hv/vmbus_drv.c
> @@ -45,11 +45,6 @@ static struct pci_dev *hv_pci_dev;
> static struct tasklet_struct msg_dpc;
> static struct tasklet_struct event_dpc;
>
> -/* Main vmbus driver data structure */
> -struct hv_bus {
> - struct bus_type bus;
> -};
> -
> unsigned int vmbus_loglevel = (ALL_MODULES << 16 | INFO_LVL);
> EXPORT_SYMBOL(vmbus_loglevel);
> /* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
> @@ -405,14 +400,14 @@ static void vmbus_device_release(struct device *device)
> }
>
> /* The one and only one */
> -static struct hv_bus hv_bus = {
> - .bus.name = "vmbus",
> - .bus.match = vmbus_match,
> - .bus.shutdown = vmbus_shutdown,
> - .bus.remove = vmbus_remove,
> - .bus.probe = vmbus_probe,
> - .bus.uevent = vmbus_uevent,
> - .bus.dev_attrs = vmbus_device_attrs,
> +static struct bus_type hv_bus = {
> + .name = "vmbus",
> + .match = vmbus_match,
> + .shutdown = vmbus_shutdown,
> + .remove = vmbus_remove,
> + .probe = vmbus_probe,
> + .uevent = vmbus_uevent,
> + .dev_attrs = vmbus_device_attrs,
> };
>
> static const char *driver_name = "hyperv";
> @@ -550,14 +545,14 @@ static int vmbus_bus_init(struct pci_dev *pdev)
> goto cleanup;
> }
>
> - hv_bus.bus.name = driver_name;
> + hv_bus.name = driver_name;
Why are you setting the name of the bus again? Shouldn't this line be
removed?
thanks,
greg k-h
^ permalink raw reply
* RE: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
From: KY Srinivasan @ 2011-04-26 20:23 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
virtualization@lists.osdl.org, Haiyang Zhang,
Abhishek Kane (Mindtree Consulting PVT LTD), Hank Janssen
In-Reply-To: <20110426194031.GD17467@suse.de>
> -----Original Message-----
> From: Greg KH [mailto:gregkh@suse.de]
> Sent: Tuesday, April 26, 2011 3:41 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> virtualization@lists.osdl.org; Haiyang Zhang; Abhishek Kane (Mindtree Consulting
> PVT LTD); Hank Janssen
> Subject: Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
>
> On Tue, Apr 26, 2011 at 09:20:35AM -0700, K. Y. Srinivasan wrote:
> > Now, get rid of struct hv_bus. We will no longer be embedding
> > struct bus_type.
> >
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> > Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> > ---
> > drivers/staging/hv/vmbus_drv.c | 33 ++++++++++++++-------------------
> > 1 files changed, 14 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> > index a3a7741..515311c 100644
> > --- a/drivers/staging/hv/vmbus_drv.c
> > +++ b/drivers/staging/hv/vmbus_drv.c
> > @@ -45,11 +45,6 @@ static struct pci_dev *hv_pci_dev;
> > static struct tasklet_struct msg_dpc;
> > static struct tasklet_struct event_dpc;
> >
> > -/* Main vmbus driver data structure */
> > -struct hv_bus {
> > - struct bus_type bus;
> > -};
> > -
> > unsigned int vmbus_loglevel = (ALL_MODULES << 16 | INFO_LVL);
> > EXPORT_SYMBOL(vmbus_loglevel);
> > /* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
> > @@ -405,14 +400,14 @@ static void vmbus_device_release(struct device
> *device)
> > }
> >
> > /* The one and only one */
> > -static struct hv_bus hv_bus = {
> > - .bus.name = "vmbus",
> > - .bus.match = vmbus_match,
> > - .bus.shutdown = vmbus_shutdown,
> > - .bus.remove = vmbus_remove,
> > - .bus.probe = vmbus_probe,
> > - .bus.uevent = vmbus_uevent,
> > - .bus.dev_attrs = vmbus_device_attrs,
> > +static struct bus_type hv_bus = {
> > + .name = "vmbus",
> > + .match = vmbus_match,
> > + .shutdown = vmbus_shutdown,
> > + .remove = vmbus_remove,
> > + .probe = vmbus_probe,
> > + .uevent = vmbus_uevent,
> > + .dev_attrs = vmbus_device_attrs,
> > };
> >
> > static const char *driver_name = "hyperv";
> > @@ -550,14 +545,14 @@ static int vmbus_bus_init(struct pci_dev *pdev)
> > goto cleanup;
> > }
> >
> > - hv_bus.bus.name = driver_name;
> > + hv_bus.name = driver_name;
>
> Why are you setting the name of the bus again? Shouldn't this line be
> removed?
You are absolutely right. Since this redundancy was in the existing
code, should I send you a separate patch to fix this?
Regards,
K. Y
>
> thanks,
>
> greg k-h
^ permalink raw reply
* Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
From: Greg KH @ 2011-04-26 20:58 UTC (permalink / raw)
To: KY Srinivasan
Cc: Abhishek Kane (Mindtree Consulting PVT LTD), Haiyang Zhang,
linux-kernel@vger.kernel.org, virtualization@lists.osdl.org,
devel@linuxdriverproject.org
In-Reply-To: <6E21E5352C11B742B20C142EB499E0481DD061@TK5EX14MBXC124.redmond.corp.microsoft.com>
On Tue, Apr 26, 2011 at 08:23:25PM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@suse.de]
> > Sent: Tuesday, April 26, 2011 3:41 PM
> > To: KY Srinivasan
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> > virtualization@lists.osdl.org; Haiyang Zhang; Abhishek Kane (Mindtree Consulting
> > PVT LTD); Hank Janssen
> > Subject: Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
> >
> > On Tue, Apr 26, 2011 at 09:20:35AM -0700, K. Y. Srinivasan wrote:
> > > Now, get rid of struct hv_bus. We will no longer be embedding
> > > struct bus_type.
> > >
> > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > > Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> > > Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> > > ---
> > > drivers/staging/hv/vmbus_drv.c | 33 ++++++++++++++-------------------
> > > 1 files changed, 14 insertions(+), 19 deletions(-)
> > >
> > > diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> > > index a3a7741..515311c 100644
> > > --- a/drivers/staging/hv/vmbus_drv.c
> > > +++ b/drivers/staging/hv/vmbus_drv.c
> > > @@ -45,11 +45,6 @@ static struct pci_dev *hv_pci_dev;
> > > static struct tasklet_struct msg_dpc;
> > > static struct tasklet_struct event_dpc;
> > >
> > > -/* Main vmbus driver data structure */
> > > -struct hv_bus {
> > > - struct bus_type bus;
> > > -};
> > > -
> > > unsigned int vmbus_loglevel = (ALL_MODULES << 16 | INFO_LVL);
> > > EXPORT_SYMBOL(vmbus_loglevel);
> > > /* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
> > > @@ -405,14 +400,14 @@ static void vmbus_device_release(struct device
> > *device)
> > > }
> > >
> > > /* The one and only one */
> > > -static struct hv_bus hv_bus = {
> > > - .bus.name = "vmbus",
> > > - .bus.match = vmbus_match,
> > > - .bus.shutdown = vmbus_shutdown,
> > > - .bus.remove = vmbus_remove,
> > > - .bus.probe = vmbus_probe,
> > > - .bus.uevent = vmbus_uevent,
> > > - .bus.dev_attrs = vmbus_device_attrs,
> > > +static struct bus_type hv_bus = {
> > > + .name = "vmbus",
> > > + .match = vmbus_match,
> > > + .shutdown = vmbus_shutdown,
> > > + .remove = vmbus_remove,
> > > + .probe = vmbus_probe,
> > > + .uevent = vmbus_uevent,
> > > + .dev_attrs = vmbus_device_attrs,
> > > };
> > >
> > > static const char *driver_name = "hyperv";
> > > @@ -550,14 +545,14 @@ static int vmbus_bus_init(struct pci_dev *pdev)
> > > goto cleanup;
> > > }
> > >
> > > - hv_bus.bus.name = driver_name;
> > > + hv_bus.name = driver_name;
> >
> > Why are you setting the name of the bus again? Shouldn't this line be
> > removed?
>
> You are absolutely right. Since this redundancy was in the existing
> code, should I send you a separate patch to fix this?
A separate one after this series is fine.
thanks,
greg k-h
^ permalink raw reply
* [PATCH 1/1] Staging: hv: Do not re-set the bus name.
From: K. Y. Srinivasan @ 2011-04-26 21:55 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang
The current code sets the bus name twice. Get rid of the
redundant setting of the bus name.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 1c5d43a..5718971 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -544,7 +544,6 @@ static int vmbus_bus_init(struct pci_dev *pdev)
goto cleanup;
}
- hv_bus.name = driver_name;
/* Initialize the bus context */
tasklet_init(&msg_dpc, vmbus_on_msg_dpc, 0);
--
1.7.4.1
^ permalink raw reply related
* RE: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
From: KY Srinivasan @ 2011-04-26 22:12 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
virtualization@lists.osdl.org, Haiyang Zhang,
Abhishek Kane (Mindtree Consulting PVT LTD), Hank Janssen
In-Reply-To: <20110426205805.GC20381@suse.de>
> -----Original Message-----
> From: Greg KH [mailto:gregkh@suse.de]
> Sent: Tuesday, April 26, 2011 4:58 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> virtualization@lists.osdl.org; Haiyang Zhang; Abhishek Kane (Mindtree Consulting
> PVT LTD); Hank Janssen
> Subject: Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
>
> On Tue, Apr 26, 2011 at 08:23:25PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:gregkh@suse.de]
> > > Sent: Tuesday, April 26, 2011 3:41 PM
> > > To: KY Srinivasan
> > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> > > virtualization@lists.osdl.org; Haiyang Zhang; Abhishek Kane (Mindtree
> Consulting
> > > PVT LTD); Hank Janssen
> > > Subject: Re: [PATCH 18/25] Staging: hv: Get rid of struct hv_bus
> > >
> > > On Tue, Apr 26, 2011 at 09:20:35AM -0700, K. Y. Srinivasan wrote:
> > > > Now, get rid of struct hv_bus. We will no longer be embedding
> > > > struct bus_type.
> > > >
> > > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > > > Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> > > > Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> > > > ---
> > > > drivers/staging/hv/vmbus_drv.c | 33 ++++++++++++++-------------------
> > > > 1 files changed, 14 insertions(+), 19 deletions(-)
> > > >
> > > >
> > > > - hv_bus.bus.name = driver_name;
> > > > + hv_bus.name = driver_name;
> > >
> > > Why are you setting the name of the bus again? Shouldn't this line be
> > > removed?
> >
> > You are absolutely right. Since this redundancy was in the existing
> > code, should I send you a separate patch to fix this?
>
> A separate one after this series is fine.
Done; I have sent the patch out.
Regards,
K. Y
^ permalink raw reply
* Re: [PATCH 17/25] Staging: hv: Make event_dpc a global variable
From: Greg KH @ 2011-04-26 22:43 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: Abhishek Kane, Haiyang Zhang, gregkh, linux-kernel,
virtualization, devel
In-Reply-To: <1303834842-5022-17-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:34AM -0700, K. Y. Srinivasan wrote:
> In preparation for getting rid of struct hv_bus, Make event_dpc a
> global variable.
It's "static", one for the whole driver, not global.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 16/25] Staging: hv: Make msg_dpc a global variable
From: Greg KH @ 2011-04-26 22:43 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: gregkh, linux-kernel, devel, virtualization, Haiyang Zhang,
Abhishek Kane, Hank Janssen
In-Reply-To: <1303834842-5022-16-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:33AM -0700, K. Y. Srinivasan wrote:
> In preparation for cleaning up (getting rid of) of the hv_bus structure,
> make msg_dpc a global variable.
It's "static". Ah, you mean for the whole bus. Yeah, that's true,
wierd choice of words I guess...
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded; cleanup accordingly
From: Greg KH @ 2011-04-26 22:45 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: Abhishek Kane, Haiyang Zhang, gregkh, linux-kernel,
virtualization, devel
In-Reply-To: <1303834842-5022-8-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:25AM -0700, K. Y. Srinivasan wrote:
> The vmbus driver cannot be unloaded; the windows host does not
> permit this. Cleanup accordingly.
Woah, you just prevented this driver from ever being able to be
unloaded.
That's not a "cleanup" that's a major change in how things work. I'm
sure, if you want to continue down this line, there are more things you
can remove from the code, right?
What is the real issue here? What happens if you unload the bus? What
goes wrong? Can it be fixed?
This is a pretty big commitment...
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 12/25] Staging: hv: Cleanup error handling in vmbus_child_device_register()
From: Greg KH @ 2011-04-26 22:50 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: gregkh, linux-kernel, devel, virtualization, Haiyang Zhang,
Abhishek Kane
In-Reply-To: <1303834842-5022-12-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:29AM -0700, K. Y. Srinivasan wrote:
> Cleanup error handling in vmbus_child_device_register().
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> ---
> drivers/staging/hv/vmbus_drv.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> index d597dd4..4d569ad 100644
> --- a/drivers/staging/hv/vmbus_drv.c
> +++ b/drivers/staging/hv/vmbus_drv.c
> @@ -720,11 +720,16 @@ int vmbus_child_device_register(struct hv_device *child_device_obj)
> */
> ret = device_register(&child_device_obj->device);
>
> + if (ret)
> + return ret;
> +
> /* vmbus_probe() error does not get propergate to device_register(). */
> ret = child_device_obj->probe_error;
Wait, why not? Why is the probe_error have to be saved off like this?
That seems like something is wrong here, this patch should not be
needed.
Well, you should check the return value of device_register, that is
needed, but this seems broken somehow.
>
> - if (ret)
> + if (ret) {
> pr_err("Unable to register child device\n");
> + device_unregister(&child_device_obj->device);
> + }
> else
} else
is the preferred way.
Care to send a fixup patch to remove the probe_error field and fix this
formatting error up?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 11/25] Staging: hv: Get rid of the drv field in struct hv_device
From: Greg KH @ 2011-04-26 22:56 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: gregkh, linux-kernel, devel, virtualization, Haiyang Zhang,
Abhishek Kane, Hank Janssen
In-Reply-To: <1303834842-5022-11-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:20:28AM -0700, K. Y. Srinivasan wrote:
> Now, we can rid of the drv field in struct hv_device.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> ---
> drivers/staging/hv/vmbus_api.h | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h
> index 51fa952..02e3587 100644
> --- a/drivers/staging/hv/vmbus_api.h
> +++ b/drivers/staging/hv/vmbus_api.h
> @@ -103,9 +103,6 @@ struct hv_driver {
>
> /* Base device object */
> struct hv_device {
> - /* the driver for this device */
> - struct hv_driver *drv;
> -
> char name[64];
FYI, in the future, you can also remove this name[64] field as well as I
don't think it's ever used...
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
From: Greg KH @ 2011-04-26 23:28 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel, devel, virtualization
In-Reply-To: <1303834785-4981-1-git-send-email-kys@microsoft.com>
On Tue, Apr 26, 2011 at 09:19:45AM -0700, K. Y. Srinivasan wrote:
> This patch-set addresses some of the bus/driver model cleanup that
> Greg sugested over the last couple of days. In this patch-set we
> deal with the following issues:
>
> 1) Cleanup unnecessary state in struct hv_device and
> struct hv_driver to be compliant with the Linux
> Driver model.
>
> 2) Cleanup the vmbus_match() function to conform with the
> Linux Driver model.
>
> 3) Cleanup error handling in the vmbus_probe() and
> vmbus_child_device_register() functions. Fixed a
> bug in the probe failure path as part of this cleanup.
>
> 4) The Windows host cannot handle the vmbus_driver being
> unloaded and subsequently loaded. Cleanup the driver with
> this in mind.
I've stopped at this patch (well, I applied one more, but you can see
that.)
I'd like to get some confirmation that this is really what you all want
to do here before applying it. If it is, care to resend them with a bit
more information about this issue and why you all are making it?
Anyway, other than this one, the series looks good. But you should
follow-up with some driver structure changes like what Christoph said to
do. After that, do you want another round of review of the code, or do
you have more things you want to send in (like the name[64] removal?)
thanks,
greg k-h
^ permalink raw reply
* ICAC2011 Call For Participation (8th IEEE International Conference on Autonomic Computing)
From: Ming Zhao @ 2011-04-27 1:44 UTC (permalink / raw)
To: virtualization
**********************************************************************
CALL FOR PARTICIPATION
======================
The 8th IEEE International Conference on Autonomic Computing
Karlsruhe, Germany
June 14-18, 2011
http://icac2011.cis.fiu.edu
Sponsored by ACM
**********************************************************************
Don't miss Jeff Kephart's keynote talk at ICAC 2011 on "Autonomic
Computing: The First Decade" and benefit from early registration!
Online registration is open at
http://icac2011.cis.fiu.edu/registration.shtm.
Reduced fees are available for those registering by May 1, 2011.
Two keynotes by Jeff Kephart and Christian Muller-Schloer will wrap-up a
decade of Autonomic Computing and of the related area of Organic Computing
and outline some directions and challenges for future research.
Five attractive workshops are complementing the program, details are at
http://icac2011.cis.fiu.edu and in the attached Call for Participation.
Looking forward to meeting you at ICAC 2011 in Karlsruhe
Hartmut Schmeck
(General Chair of ICAC 2011)
This year's program includes:
- 20 outstanding research papers and 7 short papers
- Poster, demo, and industry presentations
- 5 workshops
- 2 distinguished keynotes
Please join us for the 8th ICAC in Karlsruhe, Germany, on June
14-18, 2011. The conference is held at the AkademieHotel Karlsruhe.
More information can be found at:
http://icac2011.cis.fiu.edu
**********************************************************************
IMPORTANT DATES
===============
Early registration deadline: May 1, 2011
Hotel special rate deadline: May 1, 2011
**********************************************************************
CORPORATE SPONSORS
==================
Gold Level Partner: IBM
Conference partner: Google
Further supporters: Microsoft, 1&1, Karlsruhe Institute of Technology,
University of Arizona, and TechnologieRegion Karlsruhe.
**********************************************************************
PRELIMINARY PROGRAM
===================
MONDAY, JUNE 13, 2011
4:00PM - 7:00PM
Registration
======================================================================
TUESDAY, JUNE 14, 2011 - WORKSHOPS
FeBID 2011
BADS 2011
ACE 2011
======================================================================
WEDNESDAY, JUNE 15, 2011 - MAIN CONFERENCE
9:00AM
Welcome addresses
9:15AM - 10:30AM
Session 1: Keynote Talk
9:15AM
Autonomic Computing: The First Decade
Jeff Kephart (IBM Thomas Watson Research Center)
10:30AM
Coffee break
11:00AM - 12:00PM
Session 2: Multicore Systems
11:00AM
Applying Autonomic Principles for Workload Management in Multi-Core
Systems on Chip
Johannes Zeppenfeld; Andreas Herkersdorf
11:30AM
Smart Data Structures: A Reinforcement Learning Approach to Multicore
Data Structures
Jonathan Eastep; David Wingate; Anant Agarwal
12:00PM
Lunch
----------------------------------------------------------------------
1:30PM - 3:00PM
Session 3: Power Management
1:30PM
How Much Power Oversubscription is Safe and Allowed in Data Centers?
Xing Fu; Xiaorui Wang; Charles Lefurgy
2:00PM
Memory Power Management via Dynamic Voltage/Frequency Scaling
Howard David; Chris Fallin; Eugene Gorbatov; Ulf R. Hanebutte;
Onur Mutlu
2:30PM
iPOEM: A GPS Tool for Integrated Management in Virtualized Data Centers
Hui Zhang; Kenji Yoshihira; Ya-Yunn Su; Guofei Jiang; Ming Chen;
Xiaorui Wang
3:00PM
Coffee break
3:30PM - 5:00PM
Session 4: Distributed Systems
3:30PM
A Self-Organizing P2P System with Multi-Dimensional Structure
Raffaele Giordanelli; Carlo Mastroianni; Michela Meo
4:00PM
SILENCE: Distributed Adaptive Sampling for Sensor-based Autonomic Systems
Eun Kyung Lee; Hariharasudhan Viswanathan; Dario Pompili
4:30PM
Budget-Constrained Bulk Data Transfer via Internet and Shipping Networks
Brian Cho; Indranil Gupta
5:00PM
Reception
======================================================================
THURSDAY, JUNE 16, 2011 - MAIN CONFERENCE
9:15AM
Sponsoring addresses
9:30AM - 10:30AM
Session 5: Testing and Diagnostics
9:30AM
Toward Data Center Self-Diagnosis Using a Mobile Robot
Jon Lenchner; Canturk Isci; Jeffrey Kephart; Christopher Mansley;
Jonathan Connell; Suzanne McIntosh
10:00AM
Model-based Performance Testing
Cornel Barna; Marin Litoiu; Hamoun Ghanbari
10:30AM
Coffee break
11:00AM - 12:00PM
Session 6: Malware Detection and Clean-up
11:00AM
Inoculation against malware infection using kernel-level software sensors
Raymond Canzanese; Spiros Mancoridis; Moshe Kam
11:30AM
Automatically Clean Up Malware Impacts When Committing OS-level
Virtual Machines
Zhiyong Shan; Xin Wang; Tzi-cker Chiueh
12:00PM
Lunch
----------------------------------------------------------------------
1:30PM - 3:30PM
Session 7: Performance Modeling and Profiling
1:30PM
A Bayesian Approach to Online Performance Modeling for Database
Appliances using Gaussian Models
Muhammad Bilal Sheikh; Umar Farooq Minhas; Omar Zia Khan;
Ashraf Aboulnaga; Pascal Poupart; David J Taylor
2:00PM
Automated Control for Elastic n-Tier Workloads based on Empirical Modeling
Simon Malkowski; Markus Hedwig; Jack Li; Calton Pu; Dirk Neumann
2:30PM
A Flexible Architecture Integrating Monitoring and Analytics for Managing
Large-Scale Data Centers
Chengwei Wang; Karsten Schwan; Vanish Talwar; Greg Eisenhauer; Liting Hu;
Matthew Wolf
3:00PM
Untangling Mixed Information to Calibrate Resource Utilization in Virtual
Machines
Lei Lu; Hui Zhang; Guofei Jiang; Haifeng Chen; Kenji Yoshihira;
Evgenia Smirni
3:30PM
Coffee break
3:30PM - 6:00PM
Session 8: Poster and Demo Session
6:00PM
Departure for conference banquet
7:00PM
Conference banquet
======================================================================
FRIDAY, JUNE 17, 2011 - MAIN CONFERENCE
9:00AM
Sponsoring addresses
9:15AM - 10:30AM
Session 9: Keynote Talk
9:15AM
Organic Computing: Quo Vadis?
Christian Muller-Schloer (Leibniz University Hannover)
10:30AM
Coffee break
11:00AM - 12:30PM
Session 10: Short Paper Session
11:00AM
Self-Adaptive Software System Monitoring for Performance Anomaly Localization
Jens Ehlers; Andre van Hoorn; Jan Waller; Wilhelm Hasselbring
Decision Making in Autonomic Computing Systems: Comparison of Different
Approaches and Techniques
Martina Maggio; Henry Hoffmann; Marco D. Santambrogio; Anant Agarwal;
Alberto Leva
Using Reinforcement Learning for Controlling an Elastic Web Application
Hosting Platform
Han Li; Srikumar Venugopal
Bootstrapped Migration for Linux OS
Jui-Hao Chiang; Maohua Lu; Tzi-cker Chiueh
Autonomous Multi-Processor--SoC Optimization with Distributed Learning
Classifier Systems XCS
Andreas Bernauer; Gunnar Arndt; Oliver Bringmann; Wolfgang Rosenstiel
A Control Theory Based Approach for Self-Healing of Un-handled Runtime Exceptions
Benoit Gaudin; Emil Vassev; Michael Hinchey; Patrick Nixon
Clustering Performance Anomalies in Web Applications Based on Root Causes
Satoshi Iwata; Kenji Kono
12:30PM
Lunch
----------------------------------------------------------------------
2:00PM - 4:00PM
Session 11: Resource Management
2:00PM
A Multi-objective Approach to Virtual Machine Management in Datacenters
Jing Xu; Jose Fortes
2:30PM
ARIA: Automatic Resource Inference and Allocation for MapReduce Environments
Abhishek Verma; Ludmila Cherkasova; Roy Campbell
3:00PM
Maestro: Quality-of-Service in Large Disk Arrays
Arif Merchant; Mustafa Uysal; Pradeep Padala; Xiaoyun Zhu; Sharad Singhal;
Kang Shin
3:30PM
Enhancing Virtualized Application Performance Through Dynamic Adaptive Paging
Mode Selection
Chang Bae; John Lange; Peter Dinda
4:00PM
Coffee break and Adjourn
======================================================================
SATURDAY, JUNE 18, 2011 - WORKSHOPS
OC 2011
IEEMC 2011
**********************************************************************
Organizing Committee
====================
GENERAL CO-CHAIRS:
Hartmut Schmeck (Karlsruhe Institute of Technology, Germany)
Wolfgang Rosenstiel (University of Tuebingen, Germany)
STEERING COMMITTE:
Salim Hariri (Co-Chair, University of Arizona, USA)
Jeffrey Kephart (Co-chair, IBM Research, USA)
Manish Parashar (Rutgers University, USA)
Karsten Schwan (Georgia Tec, USA)
Emre Kiciman (Microsoft Research, USA)
Renato Figueiredo (University of Florida, USA)
John Wilkes (Google, USA)
Sandra Tipton (IBM, USA)
PROGRAM CO-CHAIRS:
Joseph Hellerstein (Google, USA)
Tarek Abdelzaher (University of Illinois at Urbana-Champaign, USA)
WORKSHOP CHAIR:
Tom Holvoet (Katholieke Universiteit Leuven, Belgium)
POSTER/DEMO/EXHIBIT CHAIR:
Michael Beigl (Karlsruhe Institute of Technology, Germany)
PUBLICITY CO-CHAIRS:
Ming Zhao (Florida International University, USA)
LOCAL ARRANGEMENTS CHAIR:
Lei Liu (Karlsruhe Institute of Technology, Germany)
Friederike Pfeiffer (Karlsruhe Institute of Technology, Germany)
INDUSTRY CHAIR:
Eno Thereska (Microsoft Research, UK)
PROGRAM COMMITTEE:
Michael Beigl (Karlsruhe Institute of Technology, Germany)
Umesh Bellur (Indian Institutes of Technology, India)
Fabian Bustamante (Northwestern University, USA)
Lucy Cherkasova (HP Labs, USA)
Chita Das (Penn State University, USA)
Yixin Diao (IBM Research, USA)
Raghu Ganti (IBM Research, USA)
Indranil Gupta (University of Illinois at Urbana-Champaign, USA)
David Hutchison (Lancaster University, UK)
Ravi Iyer (University of Illinois at Urbana-Champaign, USA)
Vana Kalogeraki (Athens University of Economics and Business, Greece)
Jeff Kephart (IBM, USA)
Emre Kiciman (Microsoft Research, USA)
Charles Lefurgy (IBM Research, USA)
Yunhao Liu (Hong Kong University of Science and Technology, HK)
Pedro Marron (Duisburg, Germany)
Milan Milenkovic (Intel, US)
Dejan Milojicic (HP Labs, USA)
Priya Narasimhan (Carnegie Mellon University, USA)
Manish Parashar (Rutgers University, USA)
Ana Radovanovic (Google, USA)
Anders Robertsson (Lund, Sweden)
Masoud Sadjadi (Florida International University, USA)
Karsten Schwan (Georgia Institute of Technology, USA)
Onn Shehory (IBM Haifa Research Lab, Israel)
Prashant Shenoy (University of Massachusetts, USA)
Sharad Singhal (HP Labs, USA)
Mani Srivastava (University of California, Los Angeles, USA)
Neeraj Suri (Technische University Darmstadt, Germany)
Eno Thereska (Microsoft Research, UK)
Thiemo Voigt (Swedish Institute of Computer Science, Sweden)
Adam Wolisz (Technische University Berlin, Germany)
Dongyan Xu (Purdue University, USA)
Xiaoyun Zhu (VMware, USA)
ADDITIONAL REVIEWERS:
Paul Alcock
Azman Ali
Radovan Bruncak
Daniel Chen
Yuan Chen
Xabriel J. Collazo-Mojica
Javier Delgado
Ciprian Docan
Daniel Gmach
Ajay Gulati
Gabriela Jacques da Silva
Matthew Jakeman
Hyunjoo Kim
Solomon Lasluisa
Andreas Louca
Angelos Marnerides
Asit K Mishra
Philip P. Moltmann
Nithin M. Nakka
Antonio Pecchia
Cuong Pham
Andres Quiroz
Junghwan Rhee
Ivan Rodero
Alberto Egon Schaeffer Filho
Steven Simpson
Paul Smith
David Villegas
Wade Vinson
Zhikui Wang
Joel Wolf
Keun Soo Yim
Fan Zhang
**********************************************************************
^ permalink raw reply
* RE: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
From: KY Srinivasan @ 2011-04-27 1:54 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
In-Reply-To: <20110426232843.GA31184@kroah.com>
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, April 26, 2011 7:29 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: Re: [PATCH 00/25] Staging: hv: Cleanup vmbus driver code
>
> On Tue, Apr 26, 2011 at 09:19:45AM -0700, K. Y. Srinivasan wrote:
> > This patch-set addresses some of the bus/driver model cleanup that
> > Greg sugested over the last couple of days. In this patch-set we
> > deal with the following issues:
> >
> > 1) Cleanup unnecessary state in struct hv_device and
> > struct hv_driver to be compliant with the Linux
> > Driver model.
> >
> > 2) Cleanup the vmbus_match() function to conform with the
> > Linux Driver model.
> >
> > 3) Cleanup error handling in the vmbus_probe() and
> > vmbus_child_device_register() functions. Fixed a
> > bug in the probe failure path as part of this cleanup.
> >
> > 4) The Windows host cannot handle the vmbus_driver being
> > unloaded and subsequently loaded. Cleanup the driver with
> > this in mind.
>
> I've stopped at this patch (well, I applied one more, but you can see
> that.)
>
> I'd like to get some confirmation that this is really what you all want
> to do here before applying it. If it is, care to resend them with a bit
> more information about this issue and why you all are making it?
Greg, this is restriction imposed by the Windows host: you cannot reload the
Vmbus driver without rebooting the guest. If you cannot re-load, what good is it
to be able to unload? Distros that integrate these drivers will load these drivers
automatically on boot and there is not much point in being able to unload this since
most likely the root device will be handled by these drivers. For systems that don't
integrate these drivers; I don't see much point in allowing the driver to be unloaded,
if you cannot reload the driver without rebooting the guest. If and when the Windows
host supports reloading the vmbus driver, we can very easily add this functionality.
The situation currently at best very misleading - you think you can unload the vmbus
driver, only to discover that you have to reboot the guest!
>
> Anyway, other than this one, the series looks good. But you should
> follow-up with some driver structure changes like what Christoph said to
> do.
I will send you a patch for this.
> After that, do you want another round of review of the code, or do
> you have more things you want to send in (like the name[64] removal?)
I would prefer that we go through the review process. What is the process for
this review? Is there a time window for people to respond. I am hoping I will be able
to address all the review comments well in advance of the next closing of the tree,
with the hope of taking the vmbus driver out of staging this go around (hope springs
eternal in the human breast ...)!
Regards,
K. Y
>
> thanks,
>
> greg k-h
^ permalink raw reply
* RE: [PATCH 11/25] Staging: hv: Get rid of the drv field in struct hv_device
From: KY Srinivasan @ 2011-04-27 1:55 UTC (permalink / raw)
To: Greg KH
Cc: Abhishek Kane (Mindtree Consulting PVT LTD), Haiyang Zhang,
gregkh@suse.de, linux-kernel@vger.kernel.org,
virtualization@lists.osdl.org, devel@linuxdriverproject.org
In-Reply-To: <20110426225637.GB12897@kroah.com>
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, April 26, 2011 6:57 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org; Haiyang Zhang;
> Abhishek Kane (Mindtree Consulting PVT LTD); Hank Janssen
> Subject: Re: [PATCH 11/25] Staging: hv: Get rid of the drv field in struct hv_device
>
> On Tue, Apr 26, 2011 at 09:20:28AM -0700, K. Y. Srinivasan wrote:
> > Now, we can rid of the drv field in struct hv_device.
> >
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> > Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> > ---
> > drivers/staging/hv/vmbus_api.h | 3 ---
> > 1 files changed, 0 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h
> > index 51fa952..02e3587 100644
> > --- a/drivers/staging/hv/vmbus_api.h
> > +++ b/drivers/staging/hv/vmbus_api.h
> > @@ -103,9 +103,6 @@ struct hv_driver {
> >
> > /* Base device object */
> > struct hv_device {
> > - /* the driver for this device */
> > - struct hv_driver *drv;
> > -
> > char name[64];
>
> FYI, in the future, you can also remove this name[64] field as well as I
> don't think it's ever used...
I will send you a patch for this, once all the patches in this series are applied.
Regards,
K. Y
^ permalink raw reply
* RE: [PATCH 12/25] Staging: hv: Cleanup error handling in vmbus_child_device_register()
From: KY Srinivasan @ 2011-04-27 2:11 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org,
Haiyang Zhang, Abhishek Kane (Mindtree Consulting PVT LTD)
In-Reply-To: <20110426225059.GA12897@kroah.com>
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, April 26, 2011 6:51 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org; Haiyang Zhang;
> Abhishek Kane (Mindtree Consulting PVT LTD)
> Subject: Re: [PATCH 12/25] Staging: hv: Cleanup error handling in
> vmbus_child_device_register()
>
> On Tue, Apr 26, 2011 at 09:20:29AM -0700, K. Y. Srinivasan wrote:
> > Cleanup error handling in vmbus_child_device_register().
> >
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
> > Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> > ---
> > drivers/staging/hv/vmbus_drv.c | 7 ++++++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> > index d597dd4..4d569ad 100644
> > --- a/drivers/staging/hv/vmbus_drv.c
> > +++ b/drivers/staging/hv/vmbus_drv.c
> > @@ -720,11 +720,16 @@ int vmbus_child_device_register(struct hv_device
> *child_device_obj)
> > */
> > ret = device_register(&child_device_obj->device);
> >
> > + if (ret)
> > + return ret;
> > +
> > /* vmbus_probe() error does not get propergate to device_register(). */
> > ret = child_device_obj->probe_error;
>
> Wait, why not? Why is the probe_error have to be saved off like this?
> That seems like something is wrong here, this patch should not be
> needed.
>
> Well, you should check the return value of device_register, that is
> needed, but this seems broken somehow.
The current code had comments claiming that the probe error was not
correctly propagated. Looking at the kernel side of the code, it was not clear
if device_register() could succeed while the probe might fail. In any event,
if you can guarantee that device_register() can return any probe related
errors, I agree with you that saving the probe error is an overkill. The current code
saved the probe error and with new check I added with regards to the return
value of device_register, there is no correctness issue with this patch.
>
> >
> > - if (ret)
> > + if (ret) {
> > pr_err("Unable to register child device\n");
> > + device_unregister(&child_device_obj->device);
> > + }
> > else
>
> } else
> is the preferred way.
>
> Care to send a fixup patch to remove the probe_error field and fix this
> formatting error up?
I will fix up the formatting issue.
Regards,
K. Y
^ permalink raw reply
* RE: [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded; cleanup accordingly
From: KY Srinivasan @ 2011-04-27 2:31 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org,
Haiyang Zhang, Abhishek Kane (Mindtree Consulting PVT LTD)
In-Reply-To: <20110426224545.GC31974@kroah.com>
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, April 26, 2011 6:46 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org; Haiyang Zhang;
> Abhishek Kane (Mindtree Consulting PVT LTD)
> Subject: Re: [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded;
> cleanup accordingly
>
> On Tue, Apr 26, 2011 at 09:20:25AM -0700, K. Y. Srinivasan wrote:
> > The vmbus driver cannot be unloaded; the windows host does not
> > permit this. Cleanup accordingly.
>
> Woah, you just prevented this driver from ever being able to be
> unloaded.
It was never unloadable; while the driver defined an exit routine,
there were couple of issues unloading the vmbus driver:
1) All guest resources given to the host could not be recovered.
2) Windows host would not permit reloading the driver without
rebooting the guest.
All I did was acknowledge the current state and cleanup
accordingly. This is not unique to Hyper-V; for what it is worth,
the Xen platform_pci driver which is equivalent to the vmbus driver
is also not unlodable (the last time I checked).
>
> That's not a "cleanup" that's a major change in how things work. I'm
> sure, if you want to continue down this line, there are more things you
> can remove from the code, right?
>
> What is the real issue here? What happens if you unload the bus? What
> goes wrong? Can it be fixed?
This needs to be fixed on the host side. I have notified them of the issue.
>
> This is a pretty big commitment...
These drivers only load when Linux is hosted on a Hyper-V platform;
I am not sure why it is a "big commitment" given that the host does not
permit reloading this driver without rebooting the guest.
Regards,
K. Y
^ permalink raw reply
* Re:RE: [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded; cleanup accordingly
From: uabuntsu @ 2011-04-27 4:55 UTC (permalink / raw)
To: KY Srinivasan
Cc: Abhishek Kane (Mindtree Consulting PVT LTD), Haiyang Zhang,
gregkh@suse.de, linux-kernel@vger.kernel.org,
virtualization@lists.osdl.org, devel@linuxdriverproject.org
In-Reply-To: <6E21E5352C11B742B20C142EB499E0481DD1C9@TK5EX14MBXC124.redmond.corp.microsoft.com>
unsubscribe linux-kernel
At 2011-04-27 10:31:18,"KY Srinivasan" <kys@microsoft.com> wrote:
>
>
>> -----Original Message-----
>> From: Greg KH [mailto:greg@kroah.com]
>> Sent: Tuesday, April 26, 2011 6:46 PM
>> To: KY Srinivasan
>> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
>> devel@linuxdriverproject.org; virtualization@lists.osdl.org; Haiyang Zhang;
>> Abhishek Kane (Mindtree Consulting PVT LTD)
>> Subject: Re: [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded;
>> cleanup accordingly
>>
>> On Tue, Apr 26, 2011 at 09:20:25AM -0700, K. Y. Srinivasan wrote:
>> > The vmbus driver cannot be unloaded; the windows host does not
>> > permit this. Cleanup accordingly.
>>
>> Woah, you just prevented this driver from ever being able to be
>> unloaded.
>
>It was never unloadable; while the driver defined an exit routine,
>there were couple of issues unloading the vmbus driver:
>
>1) All guest resources given to the host could not be recovered.
>
>2) Windows host would not permit reloading the driver without
>rebooting the guest.
>
>All I did was acknowledge the current state and cleanup
>accordingly. This is not unique to Hyper-V; for what it is worth,
>the Xen platform_pci driver which is equivalent to the vmbus driver
>is also not unlodable (the last time I checked).
>
>>
>> That's not a "cleanup" that's a major change in how things work. I'm
>> sure, if you want to continue down this line, there are more things you
>> can remove from the code, right?
>>
>> What is the real issue here? What happens if you unload the bus? What
>> goes wrong? Can it be fixed?
>
>This needs to be fixed on the host side. I have notified them of the issue.
>
>>
>> This is a pretty big commitment...
>
>These drivers only load when Linux is hosted on a Hyper-V platform;
>I am not sure why it is a "big commitment" given that the host does not
>permit reloading this driver without rebooting the guest.
>
>Regards,
>
>K. Y
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
^ permalink raw reply
* Re: [PATCH] driver, virtio: Modify the err hanlding logic
From: Rusty Russell @ 2011-04-27 5:04 UTC (permalink / raw)
To: Liu Yuan, Michael S. Tsirkin; +Cc: linux-kernel, virtualization
In-Reply-To: <1303305719-4475-1-git-send-email-namei.unix@gmail.com>
On Wed, 20 Apr 2011 21:21:59 +0800, Liu Yuan <namei.unix@gmail.com> wrote:
> From: Liu Yuan <tailai.ly@taobao.com>
>
> In the function vp_request_msix_vectors(), when
> pci_enable_msix() returns 0, there will be
> redundant double checks for 'err'. This patch
> fixes it to avoid the unnecessary check.
>
> Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
> ---
> drivers/virtio/virtio_pci.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
> index 4fb5b2b..2c05376 100644
> --- a/drivers/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -298,10 +298,11 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
>
> /* pci_enable_msix returns positive if we can't get this many. */
> err = pci_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, nvectors);
> - if (err > 0)
> - err = -ENOSPC;
> - if (err)
> + if (err) {
> + if (err > 0)
> + err = -ENOSPC;
> goto error;
> + }
> vp_dev->msix_vectors = nvectors;
> vp_dev->msix_enabled = 1;
This patch is extremely marginal. It theoretically improves efficiency,
but it's in a case we don't care about. The code is quite clear.
My general policy for such marginal improvements is to only accept them
from the maintainer him/herself, so I won't be taking this patch.
Of course, if you produce a series of fixes to the driver with such a
patch as a cleaner, I'm lazy enough that I'd take them all at once :)
Thanks,
Rusty.
^ permalink raw reply
* Re: [RFC PATCH TRIVIAL] Reading the virtio code...
From: Rusty Russell @ 2011-04-27 5:29 UTC (permalink / raw)
To: Rob Landley, virtualization; +Cc: Michael S. Tsirkin
In-Reply-To: <4DB35D1E.3030509@parallels.com>
On Sat, 23 Apr 2011 18:13:34 -0500, Rob Landley <rlandley@parallels.com> wrote:
> From: Rob Landley <rlandley@parallels.com>
>
> Going indirect for only two buffers isn't likely to be a performance win
> because the kmalloc/kfree overhead for the indirect block can't be cheaper
> than one extra linked list traversal.
Unfortunately it's not completely clear. QEMU sets fairly small rings,
and the virtio-net driver uses 2 descriptors minimum. The effect can be
a real bottleneck for small packets.
Now, virtio-net could often stuff the virtio_net_hdr in the space before
the packet data (saving a descriptor) but I think that will need a
feature bit since qemu (incorrectly) used to insist on a separate
descriptor for that header.
> Properly "tuning" the threshold would probably be workload-specific.
> (One big downside of not going indirect is extra pressure on the table
> entries, and table size varies.) But I think that in the general case,
> 2 is a defensible minimum?
I'd be tempted to say that once we fill the ring, we should drop the
threshold.
Michael?
Thanks,
Rusty.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox