Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-11 Thread Rusty Russell
Andrew Morton writes: > On Wed, 10 Oct 2012 16:34:37 -0700 > Jeremy Fitzhardinge wrote: > >> On 10/09/2012 06:14 PM, Andrew Morton wrote: >> > On Wed, 10 Oct 2012 00:09:12 + KY Srinivasan >> > wrote: >> > >> + if (!pg) { >> + *alloc_error = true

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-10 Thread Andrew Morton
On Wed, 10 Oct 2012 16:34:37 -0700 Jeremy Fitzhardinge wrote: > On 10/09/2012 06:14 PM, Andrew Morton wrote: > > On Wed, 10 Oct 2012 00:09:12 + KY Srinivasan wrote: > > > +if (!pg) { > +*alloc_error = true; > +ret

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-10 Thread Jeremy Fitzhardinge
On 10/09/2012 06:14 PM, Andrew Morton wrote: > On Wed, 10 Oct 2012 00:09:12 + KY Srinivasan wrote: > + if (!pg) { + *alloc_error = true; + return i * alloc_unit; + } + + totalram_pages -= alloc_unit; >>>

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-10 Thread Avi Kivity
On 10/09/2012 09:44 PM, Andrew Morton wrote: > On Sun, 7 Oct 2012 16:59:46 -0700 > "K. Y. Srinivasan" wrote: > >> Add the basic balloon driver. > > hm, how many balloon drivers does one kernel need? > > Although I see that the great majority of this code is hypervisor-specific. Much like each

RE: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-09 Thread KY Srinivasan
canonical.com; > a...@firstfloor.org > Subject: Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver > > On Wed, 10 Oct 2012 00:09:12 + KY Srinivasan wrote: > > > > > + if (!pg) { > > > > + *alloc_error = tr

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-09 Thread Andrew Morton
On Wed, 10 Oct 2012 00:09:12 + KY Srinivasan wrote: > > > + if (!pg) { > > > + *alloc_error = true; > > > + return i * alloc_unit; > > > + } > > > + > > > + totalram_pages -= alloc_unit; > > > > Well, I'd consider totalram_pages to be a

RE: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-09 Thread KY Srinivasan
canonical.com; > a...@firstfloor.org > Subject: Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver > > On Sun, 7 Oct 2012 16:59:46 -0700 > "K. Y. Srinivasan" wrote: > > > Add the basic balloon driver. > > hm, how many balloon drivers does one kernel need? &

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-09 Thread Andrew Morton
On Sun, 7 Oct 2012 16:59:46 -0700 "K. Y. Srinivasan" wrote: > Add the basic balloon driver. hm, how many balloon drivers does one kernel need? Although I see that the great majority of this code is hypervisor-specific. > Windows hosts dynamically manage the guest > memory allocation via a com

RE: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-08 Thread KY Srinivasan
-foundation.org; a...@firstfloor.org > Cc: KY Srinivasan > Subject: Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver > > "K. Y. Srinivasan" writes: > > +static int hot_add; > > + > > +module_param(hot_add, int, S_IRUGO); > > +MODULE_PARM_DESC(hot

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-07 Thread Rusty Russell
"K. Y. Srinivasan" writes: > +static int hot_add; > + > +module_param(hot_add, int, S_IRUGO); > +MODULE_PARM_DESC(hot_add, "If set attempt memory hot_add"); I think this should be a 'bool', but I can't tell, since it's not used in this patch. Cheers, Rusty. -- To unsubscribe from this list: send

RE: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-07 Thread KY Srinivasan
; a...@firstfloor.org > Subject: Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver > > On Sun, Oct 07, 2012 at 04:59:46PM -0700, K. Y. Srinivasan wrote: > > +config HYPERV_BALLOON > > + tristate "Microsoft Hyper-V Balloon driver" > > + depends on HYPE

Re: [PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-07 Thread Greg KH
On Sun, Oct 07, 2012 at 04:59:46PM -0700, K. Y. Srinivasan wrote: > +config HYPERV_BALLOON > + tristate "Microsoft Hyper-V Balloon driver" > + depends on HYPERV > + help > + Select this option to enable the Hyper-V Utilities. Your help text is wrong :( > --- /dev/null > +++ b/dr

[PATCH 2/2] Drivers: hv: Add Hyper-V balloon driver

2012-10-07 Thread K. Y. Srinivasan
Add the basic balloon driver. Windows hosts dynamically manage the guest memory allocation via a combination memory hot add and ballooning. Memory hot add is used to grow the guest memory upto the maximum memory that can be allocatted to the guest. Ballooning is used to both shrink as well as expan