* [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
@ 2011-03-07 22:09 K. Y. Srinivasan
0 siblings, 0 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2011-03-07 22:09 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Hyper-V has maintained both its class independent driver and
device state in two independent data structures:
Driver state: struct driver_context (vmbus.h) and struct hv_driver
(vmbus_api.h)
Device state: struct vm_device (vmbus.h) and struct hv_device (vmbus_api.h)
While sruct driver_context and struct vm_device embed generic
Linux abstractions of struct device_driver and struct device respectively;
the lower level hyperv abstraction: struct hv_driver and struct hv_device
have maintained state needed to communicate with the host. This partitioning
made sense at a point in time when it was not clear how much of
the hypervisor interaction would be open sourced. Given where we are
today, there is no reason to keep this layering. This patchset
consolidates all the driver state into a single structure:
struct hv_driver while all the device state is consolidated into
a single structure: struct hv_device. This consolidation simplifies
the code while simultaneously getting rid of redundant state -
for instance in the current code, both struct driver_context and
struct hv_driver both have state to represent the class as well as
instance id. We do this consolidation by moving state from higher
level structures (struct driver_context and struct vm_device) to
lower level structures (struct hv_driver and hv_device) respectively.
While it has not been a goal of this effort to cleanup structure and
variable names, this consolidation effort has resulted in some cleanup
with regards to structure and variable names: a) Some of the badly
named structures have been eliminated (struct driver_context etc.)
while hopefully all newly introduced names are acceptable.
Patches 1 through 11 deal with consolidating the device driver
state while patches 12 through 16 deal with consolidating
device state.
Regards,
K. Y
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
@ 2011-03-07 21:01 K. Y. Srinivasan
2011-03-07 22:23 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: K. Y. Srinivasan @ 2011-03-07 21:01 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Hyper-V has maintained both its class independent driver and
device state in two independent data structures:
Driver state: struct driver_context (vmbus.h) and struct hv_driver
(vmbus_api.h)
Device state: struct vm_device (vmbus.h) and struct hv_device (vmbus_api.h)
While sruct driver_context and struct vm_device embed generic
Linux abstractions of struct device_driver and struct device respectively;
the lower level hyperv abstraction: struct hv_driver and struct hv_device
have maintained state needed to communicate with the host. This partitioning
made sense at a point in time when it was not clear how much of
the hypervisor interaction would be open sourced. Given where we are
today, there is no reason to keep this layering. This patchset
consolidates all the driver state into a single structure:
struct hv_driver while all the device state is consolidated into
a single structure: struct hv_device. This consolidation simplifies
the code while simultaneously getting rid of redundant state -
for instance in the current code, both struct driver_context and
struct hv_driver both have state to represent the class as well as
instance id. We do this consolidation by moving state from higher
level structures (struct driver_context and struct vm_device) to
lower level structures (struct hv_driver and hv_device) respectively.
While it has not been a goal of this effort to cleanup structure and
variable names, this consolidation effort has resulted in some cleanup
with regards to structure and variable names: a) Some of the badly
named structures have been eliminated (struct driver_context etc.)
while hopefully all newly introduced names are acceptable.
Patches 1 through 11 deal with consolidating the device driver
state while patches 12 through 16 deal with consolidating
device state.
Regards,
K. Y
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
2011-03-07 21:01 K. Y. Srinivasan
@ 2011-03-07 22:23 ` Greg KH
2011-03-07 22:45 ` KY Srinivasan
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2011-03-07 22:23 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel, devel, virtualization
On Mon, Mar 07, 2011 at 01:01:35PM -0800, K. Y. Srinivasan wrote:
> Hyper-V has maintained both its class independent driver and
> device state in two independent data structures:
> Driver state: struct driver_context (vmbus.h) and struct hv_driver
> (vmbus_api.h)
> Device state: struct vm_device (vmbus.h) and struct hv_device (vmbus_api.h)
>
> While sruct driver_context and struct vm_device embed generic
> Linux abstractions of struct device_driver and struct device respectively;
> the lower level hyperv abstraction: struct hv_driver and struct hv_device
> have maintained state needed to communicate with the host. This partitioning
> made sense at a point in time when it was not clear how much of
> the hypervisor interaction would be open sourced. Given where we are
> today, there is no reason to keep this layering. This patchset
> consolidates all the driver state into a single structure:
> struct hv_driver while all the device state is consolidated into
> a single structure: struct hv_device. This consolidation simplifies
> the code while simultaneously getting rid of redundant state -
> for instance in the current code, both struct driver_context and
> struct hv_driver both have state to represent the class as well as
> instance id. We do this consolidation by moving state from higher
> level structures (struct driver_context and struct vm_device) to
> lower level structures (struct hv_driver and hv_device) respectively.
>
> While it has not been a goal of this effort to cleanup structure and
> variable names, this consolidation effort has resulted in some cleanup
> with regards to structure and variable names: a) Some of the badly
> named structures have been eliminated (struct driver_context etc.)
> while hopefully all newly introduced names are acceptable.
>
> Patches 1 through 11 deal with consolidating the device driver
> state while patches 12 through 16 deal with consolidating
> device state.
Very nice job, now that's the way to break up and send a patch series.
I've queued them all up now.
I'm guessing that you will have follow-on patches now to complete the
migration to the correct driver core use (i.e. proper driver and device
usage?) Or do you want me to look into doing this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
2011-03-07 22:23 ` Greg KH
@ 2011-03-07 22:45 ` KY Srinivasan
2011-03-07 23:00 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: KY Srinivasan @ 2011-03-07 22:45 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Monday, March 07, 2011 5:24 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: Re: [PATCH 00/16] Staging: hv: Consolidate driver and device
> abstractions
>
> On Mon, Mar 07, 2011 at 01:01:35PM -0800, K. Y. Srinivasan wrote:
> > Hyper-V has maintained both its class independent driver and
> > device state in two independent data structures:
> > Driver state: struct driver_context (vmbus.h) and struct hv_driver
> > (vmbus_api.h)
> > Device state: struct vm_device (vmbus.h) and struct hv_device (vmbus_api.h)
> >
> > While sruct driver_context and struct vm_device embed generic
> > Linux abstractions of struct device_driver and struct device respectively;
> > the lower level hyperv abstraction: struct hv_driver and struct hv_device
> > have maintained state needed to communicate with the host. This partitioning
> > made sense at a point in time when it was not clear how much of
> > the hypervisor interaction would be open sourced. Given where we are
> > today, there is no reason to keep this layering. This patchset
> > consolidates all the driver state into a single structure:
> > struct hv_driver while all the device state is consolidated into
> > a single structure: struct hv_device. This consolidation simplifies
> > the code while simultaneously getting rid of redundant state -
> > for instance in the current code, both struct driver_context and
> > struct hv_driver both have state to represent the class as well as
> > instance id. We do this consolidation by moving state from higher
> > level structures (struct driver_context and struct vm_device) to
> > lower level structures (struct hv_driver and hv_device) respectively.
> >
> > While it has not been a goal of this effort to cleanup structure and
> > variable names, this consolidation effort has resulted in some cleanup
> > with regards to structure and variable names: a) Some of the badly
> > named structures have been eliminated (struct driver_context etc.)
> > while hopefully all newly introduced names are acceptable.
> >
> > Patches 1 through 11 deal with consolidating the device driver
> > state while patches 12 through 16 deal with consolidating
> > device state.
>
> Very nice job, now that's the way to break up and send a patch series.
>
> I've queued them all up now.
Thanks Greg; coming from you it means a lot to me.
>
> I'm guessing that you will have follow-on patches now to complete the
> migration to the correct driver core use (i.e. proper driver and device
> usage?) Or do you want me to look into doing this?
My immediate goal is to get the vmbus driver to exit staging. To that
end I am working on a patch-set to cleanup vmbus_drv.c. I should have this
patch-set fairly soon. Once that is
done, I think we would have addressed all the structural/architectural issues
of the vmbus driver that is preventing us from exiting staging.
We are planning to address the issues with other drivers after we are done
with the vmbus driver. As always, your help is greatly appreciated.
Regards,
K. Y
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
2011-03-07 22:45 ` KY Srinivasan
@ 2011-03-07 23:00 ` Greg KH
2011-03-07 23:17 ` KY Srinivasan
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2011-03-07 23:00 UTC (permalink / raw)
To: KY Srinivasan
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
On Mon, Mar 07, 2011 at 10:45:15PM +0000, KY Srinivasan wrote:
> > I'm guessing that you will have follow-on patches now to complete the
> > migration to the correct driver core use (i.e. proper driver and device
> > usage?) Or do you want me to look into doing this?
>
> My immediate goal is to get the vmbus driver to exit staging. To that
> end I am working on a patch-set to cleanup vmbus_drv.c. I should have this
> patch-set fairly soon. Once that is
> done, I think we would have addressed all the structural/architectural issues
> of the vmbus driver that is preventing us from exiting staging.
Well, perhaps, let's not get ahead of ourselves here :)
> We are planning to address the issues with other drivers after we are done
> with the vmbus driver. As always, your help is greatly appreciated.
The issue I am referring to above still has to do with the vmbus core.
The goal is to have the vmbus work like all other busses in the kernel.
You register a hv_driver with some probe and disconnect callbacks, and
the vmbus calls into the drivers when it needs to.
You are almost there, using the struct device pointers directly, but a
few more steps remain.
I'll look into the details after your remaining cleanups, I don't want
to get in the way of them.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions
2011-03-07 23:00 ` Greg KH
@ 2011-03-07 23:17 ` KY Srinivasan
0 siblings, 0 replies; 6+ messages in thread
From: KY Srinivasan @ 2011-03-07 23:17 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Monday, March 07, 2011 6:00 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: Re: [PATCH 00/16] Staging: hv: Consolidate driver and device
> abstractions
>
> On Mon, Mar 07, 2011 at 10:45:15PM +0000, KY Srinivasan wrote:
> > > I'm guessing that you will have follow-on patches now to complete the
> > > migration to the correct driver core use (i.e. proper driver and device
> > > usage?) Or do you want me to look into doing this?
> >
> > My immediate goal is to get the vmbus driver to exit staging. To that
> > end I am working on a patch-set to cleanup vmbus_drv.c. I should have this
> > patch-set fairly soon. Once that is
> > done, I think we would have addressed all the structural/architectural issues
> > of the vmbus driver that is preventing us from exiting staging.
>
> Well, perhaps, let's not get ahead of ourselves here :)
Certainly. I was being presumptuous when I said "we would have
addressed all the structural/architectural issues ..". What I meant
to say was that I would have addressed the problems that I know about.
After I am done with the current cleanup, I will work on the remaining
issues.
>
> > We are planning to address the issues with other drivers after we are done
> > with the vmbus driver. As always, your help is greatly appreciated.
>
> The issue I am referring to above still has to do with the vmbus core.
>
> The goal is to have the vmbus work like all other busses in the kernel.
> You register a hv_driver with some probe and disconnect callbacks, and
> the vmbus calls into the drivers when it needs to.
>
> You are almost there, using the struct device pointers directly, but a
> few more steps remain.
>
> I'll look into the details after your remaining cleanups, I don't want
> to get in the way of them.
Thank you. You should have my patches fairly soon. Hopefully, I would
have addressed the issues you have raised.
Regards,
K. Y
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-07 23:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 22:09 [PATCH 00/16] Staging: hv: Consolidate driver and device abstractions K. Y. Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2011-03-07 21:01 K. Y. Srinivasan
2011-03-07 22:23 ` Greg KH
2011-03-07 22:45 ` KY Srinivasan
2011-03-07 23:00 ` Greg KH
2011-03-07 23:17 ` KY Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox