All of lore.kernel.org
 help / color / mirror / Atom feed
* drivres/hv
@ 2015-11-30 21:15 K. Y. Srinivasan
  2016-02-08  6:13 ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: K. Y. Srinivasan @ 2015-11-30 21:15 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang

 
Greg, over the last month or more we have sent numerous Hyper-V patches and
these are yet to be comitted (all review comments have been addressed
for these patches). Please let me know if I should resend these patches.

Regards,

K. Y


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2015-11-30 21:15 drivres/hv K. Y. Srinivasan
@ 2016-02-08  6:13 ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2016-02-08  6:13 UTC (permalink / raw)
  To: K. Y. Srinivasan; +Cc: linux-kernel, devel, olaf, apw, vkuznets, jasowang

On Mon, Nov 30, 2015 at 01:15:32PM -0800, K. Y. Srinivasan wrote:
>  
> Greg, over the last month or more we have sent numerous Hyper-V patches and
> these are yet to be comitted (all review comments have been addressed
> for these patches). Please let me know if I should resend these patches.

All should now be applied.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* drivres/hv
@ 2015-08-01 19:46 K. Y. Srinivasan
  2015-08-01 18:35 ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: K. Y. Srinivasan @ 2015-08-01 19:46 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang

 
Greg, over the last two months we have sent numerous Hyper-V patches and
these are yet to be comitted (all review comments have been addressed
for these patches). Please let me know if I should resend these patches.

Regards,

K. Y


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: drivres/hv
  2015-08-01 18:35 ` drivres/hv Greg KH
@ 2015-08-01 18:39   ` KY Srinivasan
  0 siblings, 0 replies; 19+ messages in thread
From: KY Srinivasan @ 2015-08-01 18:39 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel, olaf, apw, vkuznets, jasowang



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Saturday, August 1, 2015 11:36 AM
> To: KY Srinivasan <kys@microsoft.com>
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com;
> jasowang@redhat.com
> Subject: Re: drivres/hv
> 
> On Sat, Aug 01, 2015 at 12:46:10PM -0700, K. Y. Srinivasan wrote:
> >
> > Greg, over the last two months we have sent numerous Hyper-V patches
> and
> > these are yet to be comitted (all review comments have been addressed
> > for these patches). Please let me know if I should resend these patches.
> 
> They are in my queue, I've been slow at getting to them, sorry.  If you
> want to resend them so that I know exactly which ones to apply, instead
> of having to dig through the different 'resend' and 'v2' series, that
> would be most appreciated.

Thanks Greg; I can understand. I will send them out right away as one large set.

Regards,

K. Y
> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2015-08-01 19:46 drivres/hv K. Y. Srinivasan
@ 2015-08-01 18:35 ` Greg KH
  2015-08-01 18:39   ` drivres/hv KY Srinivasan
  0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2015-08-01 18:35 UTC (permalink / raw)
  To: K. Y. Srinivasan; +Cc: linux-kernel, devel, olaf, apw, vkuznets, jasowang

On Sat, Aug 01, 2015 at 12:46:10PM -0700, K. Y. Srinivasan wrote:
>  
> Greg, over the last two months we have sent numerous Hyper-V patches and
> these are yet to be comitted (all review comments have been addressed
> for these patches). Please let me know if I should resend these patches.

They are in my queue, I've been slow at getting to them, sorry.  If you
want to resend them so that I know exactly which ones to apply, instead
of having to dig through the different 'resend' and 'v2' series, that
would be most appreciated.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-29  0:35       ` drivres/hv KY Srinivasan
@ 2012-11-29 10:13         ` Alan Cox
  0 siblings, 0 replies; 19+ messages in thread
From: Alan Cox @ 2012-11-29 10:13 UTC (permalink / raw)
  To: KY Srinivasan; +Cc: Greg KH, linux-kernel, devel

> All I know is that it is present and its size is known. If I have a way of knowing
> what range of mmio memory is unclaimed; I could grab that perhaps using
> the request_mem_region() call, I know the size that is reserved for this device.
> So, is there a way to query the system for the first unclaimed address in the mmio
> range.

You can add memory region resources yes. See the code in drivers/pci
which allocates mmio space to unassigned BARs and/or moves stuff around.

Alan

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: drivres/hv
  2012-11-29  0:04     ` drivres/hv Greg KH
@ 2012-11-29  0:35       ` KY Srinivasan
  2012-11-29 10:13         ` drivres/hv Alan Cox
  0 siblings, 1 reply; 19+ messages in thread
From: KY Srinivasan @ 2012-11-29  0:35 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, November 28, 2012 7:05 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> Subject: Re: drivres/hv
> 
> On Wed, Nov 28, 2012 at 11:32:52PM +0000, KY Srinivasan wrote:
> > > > I recently discovered that the Hyper-V host allocates mmio
> > > > memory for some synthetic devices like the virtual framebuffer.
> > > > We are currently in the process of implementing this virtual
> > > > framebuffer device. As part of the offer message from the host
> > > > we are given the mmio region size that needs to be allocatted to
> > > > the device. I am told in the current implementation of the firmware,
> > > > this mmio resource shows up in the PCI space. What is the best way to
> > > > allocate this mmio space for this driver.
> > >
> > > I don't understand, does the guest os think this really is mmio memory
> > > and the host just set up up?  Or is the memory being used to pass data
> > > back and forth?  Or something else?
> >
> > From what I understand, the host is allocating this memory and presenting
> > this to the guest. This memory is to be used for framebuffer. The guest is
> > expected to setup appropriate mappings to this region and use that as the
> > framebuffer.
> 
> What type of framebuffer?  Linux supports a ton of different ones, have
> you looked at drivers/video/ to see if one of the ones there will "just
> work" with what hyperv is passing to the guest?

We are writing a diver for this device. The existing Linux drivers can (and do)
work for the emulated VGA device. What we are implementing is a synthetic
framebuffer driver that will communicate over the vmbus to the host.
 
> 
> If not, you'll have to write a new driver for this, look at the examples
> of other framebuffer drivers in that directory for examples.  Also, I
> bet the code there will answer your memory questions.
> 
> > > And what do you mean "firmware"?  That usually means UEFI/BIOS to me,
> > > not a hyperv host.
> >
> > Hyper-V host presents the firmware to the guest (Hyper-V like KVM supports
> > full virtualization with selective para-virtualization - PV drivers). As part of the
> > BIOS presented to the guest this mmio region is allocated.
> >
> > >
> > > And finally, what does the guest os see as far as the PCI resource space
> > > shows it?  Shouldn't it just think it is a normal PCI device and access
> > > it properly that way?
> >
> > This is the crux of the problem. Vmbus and other vmbus based devices are not
> > PCI  devices. I have implemented vmbus as an ACPI driver since vmbus is an
> ACPI
> > enumerated device. I have the size information of the mmio region that is to be
> > allocated to the framebuffer device. I am looking at a way to allocate this mmio
> > region.
> 
> Do you have any "hints" as to where it is, if it even is present, or
> anything else?  If so, use them and create a new framebuffer device with
> that information.

All I know is that it is present and its size is known. If I have a way of knowing
what range of mmio memory is unclaimed; I could grab that perhaps using
the request_mem_region() call, I know the size that is reserved for this device.
So, is there a way to query the system for the first unclaimed address in the mmio
range.

Thanks,

K. Y
> 



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-28 23:32   ` drivres/hv KY Srinivasan
@ 2012-11-29  0:04     ` Greg KH
  2012-11-29  0:35       ` drivres/hv KY Srinivasan
  0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2012-11-29  0:04 UTC (permalink / raw)
  To: KY Srinivasan; +Cc: linux-kernel, devel

On Wed, Nov 28, 2012 at 11:32:52PM +0000, KY Srinivasan wrote:
> > > I recently discovered that the Hyper-V host allocates mmio
> > > memory for some synthetic devices like the virtual framebuffer.
> > > We are currently in the process of implementing this virtual
> > > framebuffer device. As part of the offer message from the host
> > > we are given the mmio region size that needs to be allocatted to
> > > the device. I am told in the current implementation of the firmware,
> > > this mmio resource shows up in the PCI space. What is the best way to
> > > allocate this mmio space for this driver.
> > 
> > I don't understand, does the guest os think this really is mmio memory
> > and the host just set up up?  Or is the memory being used to pass data
> > back and forth?  Or something else?
> 
> From what I understand, the host is allocating this memory and presenting
> this to the guest. This memory is to be used for framebuffer. The guest is
> expected to setup appropriate mappings to this region and use that as the 
> framebuffer.

What type of framebuffer?  Linux supports a ton of different ones, have
you looked at drivers/video/ to see if one of the ones there will "just
work" with what hyperv is passing to the guest?

If not, you'll have to write a new driver for this, look at the examples
of other framebuffer drivers in that directory for examples.  Also, I
bet the code there will answer your memory questions.

> > And what do you mean "firmware"?  That usually means UEFI/BIOS to me,
> > not a hyperv host.
> 
> Hyper-V host presents the firmware to the guest (Hyper-V like KVM supports
> full virtualization with selective para-virtualization - PV drivers). As part of the
> BIOS presented to the guest this mmio region is allocated.
> 
> > 
> > And finally, what does the guest os see as far as the PCI resource space
> > shows it?  Shouldn't it just think it is a normal PCI device and access
> > it properly that way?
> 
> This is the crux of the problem. Vmbus and other vmbus based devices are not
> PCI  devices. I have implemented vmbus as an ACPI driver since vmbus is an ACPI
> enumerated device. I have the size information of the mmio region that is to be 
> allocated to the framebuffer device. I am looking at a way to allocate this mmio
> region.

Do you have any "hints" as to where it is, if it even is present, or
anything else?  If so, use them and create a new framebuffer device with
that information.

If not, that seems really strange, but hey, it's hyper-v, it wouldn't be
the first time :)

good luck,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: drivres/hv
  2012-11-28 22:43 ` drivres/hv Greg KH
@ 2012-11-28 23:32   ` KY Srinivasan
  2012-11-29  0:04     ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: KY Srinivasan @ 2012-11-28 23:32 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, November 28, 2012 5:43 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> Subject: Re: drivres/hv
> 
> On Wed, Nov 28, 2012 at 12:17:30PM -0800, K. Y. Srinivasan wrote:
> >
> > Greg,
> 
> You are writing the most unhelpful Subject: lines lately, please be more
> descriptive in the future.

Sorry about that; I will be more descriptive.

> 
> > I recently discovered that the Hyper-V host allocates mmio
> > memory for some synthetic devices like the virtual framebuffer.
> > We are currently in the process of implementing this virtual
> > framebuffer device. As part of the offer message from the host
> > we are given the mmio region size that needs to be allocatted to
> > the device. I am told in the current implementation of the firmware,
> > this mmio resource shows up in the PCI space. What is the best way to
> > allocate this mmio space for this driver.
> 
> I don't understand, does the guest os think this really is mmio memory
> and the host just set up up?  Or is the memory being used to pass data
> back and forth?  Or something else?

>From what I understand, the host is allocating this memory and presenting
this to the guest. This memory is to be used for framebuffer. The guest is
expected to setup appropriate mappings to this region and use that as the 
framebuffer.

> 
> And what do you mean "firmware"?  That usually means UEFI/BIOS to me,
> not a hyperv host.

Hyper-V host presents the firmware to the guest (Hyper-V like KVM supports
full virtualization with selective para-virtualization - PV drivers). As part of the
BIOS presented to the guest this mmio region is allocated.

> 
> And finally, what does the guest os see as far as the PCI resource space
> shows it?  Shouldn't it just think it is a normal PCI device and access
> it properly that way?

This is the crux of the problem. Vmbus and other vmbus based devices are not
PCI  devices. I have implemented vmbus as an ACPI driver since vmbus is an ACPI
enumerated device. I have the size information of the mmio region that is to be 
allocated to the framebuffer device. I am looking at a way to allocate this mmio
region.

> 
> thanks,
> 
> greg k-h
> 



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-28 20:17 drivres/hv K. Y. Srinivasan
@ 2012-11-28 22:43 ` Greg KH
  2012-11-28 23:32   ` drivres/hv KY Srinivasan
  0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2012-11-28 22:43 UTC (permalink / raw)
  To: K. Y. Srinivasan; +Cc: linux-kernel, devel

On Wed, Nov 28, 2012 at 12:17:30PM -0800, K. Y. Srinivasan wrote:
>  
> Greg,

You are writing the most unhelpful Subject: lines lately, please be more
descriptive in the future.

> I recently discovered that the Hyper-V host allocates mmio
> memory for some synthetic devices like the virtual framebuffer.
> We are currently in the process of implementing this virtual
> framebuffer device. As part of the offer message from the host
> we are given the mmio region size that needs to be allocatted to
> the device. I am told in the current implementation of the firmware,
> this mmio resource shows up in the PCI space. What is the best way to
> allocate this mmio space for this driver.

I don't understand, does the guest os think this really is mmio memory
and the host just set up up?  Or is the memory being used to pass data
back and forth?  Or something else?

And what do you mean "firmware"?  That usually means UEFI/BIOS to me,
not a hyperv host.

And finally, what does the guest os see as far as the PCI resource space
shows it?  Shouldn't it just think it is a normal PCI device and access
it properly that way?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* drivres/hv
@ 2012-11-28 20:17 K. Y. Srinivasan
  2012-11-28 22:43 ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: K. Y. Srinivasan @ 2012-11-28 20:17 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel

 
Greg,

I recently discovered that the Hyper-V host allocates mmio
memory for some synthetic devices like the virtual framebuffer.
We are currently in the process of implementing this virtual
framebuffer device. As part of the offer message from the host
we are given the mmio region size that needs to be allocatted to
the device. I am told in the current implementation of the firmware,
this mmio resource shows up in the PCI space. What is the best way to
allocate this mmio space for this driver.


Regards,

K. Y


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-15 22:34     ` drivres/hv Andrew Morton
@ 2012-11-15 22:42       ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2012-11-15 22:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: KY Srinivasan, linux-kernel, devel

On Thu, Nov 15, 2012 at 02:34:42PM -0800, Andrew Morton wrote:
> On Thu, 15 Nov 2012 22:22:06 +0000
> KY Srinivasan <kys@microsoft.com> wrote:
> 
> > 
> > 
> > > -----Original Message-----
> > > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > > Sent: Friday, November 02, 2012 7:37 PM
> > > To: KY Srinivasan
> > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> > > Subject: Re: drivres/hv
> > > 
> > > On Fri, Nov 02, 2012 at 03:11:23PM -0700, K. Y. Srinivasan wrote:
> > > >
> > > > Greg,
> > > >
> > > > Recently, I had  re-sent a few patches. You have applied all the patches except
> > > the balloon driver
> > > > related patches. Should I resend the balloon driver  patches. Let me know.
> > > 
> > > I can't apply the balloon driver until you get an ack from the
> > > maintainers of the code you were exporting the symbols from.
> > > 
> > > Get that, and then resend them, as they are long gone from my "to-apply"
> > > queue.
> > 
> > Greg,
> > 
> > Andrew has checked in my patch that exports the necessary function for Hyper-V
> > balloon driver:
> > 
> > commit bb2495a71b8499bdfe207738bc88ffa91ebe0b0a
> > Author: K. Y. Srinivasan <kys@microsoft.com>
> > Date:   Thu Nov 15 13:37:59 2012 +1100
> > 
> > I had sent the new balloon driver that used this new function a few days ago. Should I
> > resend the balloon driver. Let me know.
> 
> I'll send this in to Linus later this week, to make life easier for
> everyone.  Or Greg can grab it.

I'll grab it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-15 22:22   ` drivres/hv KY Srinivasan
@ 2012-11-15 22:34     ` Andrew Morton
  2012-11-15 22:42       ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2012-11-15 22:34 UTC (permalink / raw)
  To: KY Srinivasan; +Cc: Greg KH, linux-kernel, devel

On Thu, 15 Nov 2012 22:22:06 +0000
KY Srinivasan <kys@microsoft.com> wrote:

> 
> 
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Friday, November 02, 2012 7:37 PM
> > To: KY Srinivasan
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> > Subject: Re: drivres/hv
> > 
> > On Fri, Nov 02, 2012 at 03:11:23PM -0700, K. Y. Srinivasan wrote:
> > >
> > > Greg,
> > >
> > > Recently, I had  re-sent a few patches. You have applied all the patches except
> > the balloon driver
> > > related patches. Should I resend the balloon driver  patches. Let me know.
> > 
> > I can't apply the balloon driver until you get an ack from the
> > maintainers of the code you were exporting the symbols from.
> > 
> > Get that, and then resend them, as they are long gone from my "to-apply"
> > queue.
> 
> Greg,
> 
> Andrew has checked in my patch that exports the necessary function for Hyper-V
> balloon driver:
> 
> commit bb2495a71b8499bdfe207738bc88ffa91ebe0b0a
> Author: K. Y. Srinivasan <kys@microsoft.com>
> Date:   Thu Nov 15 13:37:59 2012 +1100
> 
> I had sent the new balloon driver that used this new function a few days ago. Should I
> resend the balloon driver. Let me know.

I'll send this in to Linus later this week, to make life easier for
everyone.  Or Greg can grab it.


From: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: mm: export a function to get vm committed memory

It will be useful to be able to access global memory commitment from
device drivers.  On the Hyper-V platform, the host has a policy engine to
balance the available physical memory amongst all competing virtual
machines hosted on a given node.  This policy engine is driven by a number
of metrics including the memory commitment reported by the guests.  The
balloon driver for Linux on Hyper-V will use this function to retrieve
guest memory commitment.  This function is also used in Xen self
ballooning code.

[akpm@linux-foundation.org: coding-style tweak]
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/xen/xen-selfballoon.c |    2 +-
 include/linux/mman.h          |    2 ++
 mm/mmap.c                     |   14 ++++++++++++++
 mm/nommu.c                    |   15 +++++++++++++++
 4 files changed, 32 insertions(+), 1 deletion(-)

diff -puN drivers/xen/xen-selfballoon.c~mm-export-a-function-to-get-vm-committed-memory drivers/xen/xen-selfballoon.c
--- a/drivers/xen/xen-selfballoon.c~mm-export-a-function-to-get-vm-committed-memory
+++ a/drivers/xen/xen-selfballoon.c
@@ -222,7 +222,7 @@ static void selfballoon_process(struct w
 	if (xen_selfballooning_enabled) {
 		cur_pages = totalram_pages;
 		tgt_pages = cur_pages; /* default is no change */
-		goal_pages = percpu_counter_read_positive(&vm_committed_as) +
+		goal_pages = vm_memory_committed() +
 				totalreserve_pages +
 				MB2PAGES(selfballoon_reserved_mb);
 #ifdef CONFIG_FRONTSWAP
diff -puN include/linux/mman.h~mm-export-a-function-to-get-vm-committed-memory include/linux/mman.h
--- a/include/linux/mman.h~mm-export-a-function-to-get-vm-committed-memory
+++ a/include/linux/mman.h
@@ -11,6 +11,8 @@ extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
 extern struct percpu_counter vm_committed_as;
 
+unsigned long vm_memory_committed(void);
+
 static inline void vm_acct_memory(long pages)
 {
 	percpu_counter_add(&vm_committed_as, pages);
diff -puN mm/mmap.c~mm-export-a-function-to-get-vm-committed-memory mm/mmap.c
--- a/mm/mmap.c~mm-export-a-function-to-get-vm-committed-memory
+++ a/mm/mmap.c
@@ -89,6 +89,20 @@ int sysctl_max_map_count __read_mostly =
 struct percpu_counter vm_committed_as ____cacheline_aligned_in_smp;
 
 /*
+ * The global memory commitment made in the system can be a metric
+ * that can be used to drive ballooning decisions when Linux is hosted
+ * as a guest. On Hyper-V, the host implements a policy engine for dynamically
+ * balancing memory across competing virtual machines that are hosted.
+ * Several metrics drive this policy engine including the guest reported
+ * memory commitment.
+ */
+unsigned long vm_memory_committed(void)
+{
+	return percpu_counter_read_positive(&vm_committed_as);
+}
+EXPORT_SYMBOL_GPL(vm_memory_committed);
+
+/*
  * Check that a process has enough memory to allocate a new virtual
  * mapping. 0 means there is enough memory for the allocation to
  * succeed and -ENOMEM implies there is not.
diff -puN mm/nommu.c~mm-export-a-function-to-get-vm-committed-memory mm/nommu.c
--- a/mm/nommu.c~mm-export-a-function-to-get-vm-committed-memory
+++ a/mm/nommu.c
@@ -66,6 +66,21 @@ int heap_stack_gap = 0;
 
 atomic_long_t mmap_pages_allocated;
 
+/*
+ * The global memory commitment made in the system can be a metric
+ * that can be used to drive ballooning decisions when Linux is hosted
+ * as a guest. On Hyper-V, the host implements a policy engine for dynamically
+ * balancing memory across competing virtual machines that are hosted.
+ * Several metrics drive this policy engine including the guest reported
+ * memory commitment.
+ */
+unsigned long vm_memory_committed(void)
+{
+	return percpu_counter_read_positive(&vm_committed_as);
+}
+
+EXPORT_SYMBOL_GPL(vm_memory_committed);
+
 EXPORT_SYMBOL(mem_map);
 EXPORT_SYMBOL(num_physpages);
 
_



^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: drivres/hv
  2012-11-02 23:37 ` drivres/hv Greg KH
  2012-11-03 14:13   ` drivres/hv KY Srinivasan
@ 2012-11-15 22:22   ` KY Srinivasan
  2012-11-15 22:34     ` drivres/hv Andrew Morton
  1 sibling, 1 reply; 19+ messages in thread
From: KY Srinivasan @ 2012-11-15 22:22 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel, akpm



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Friday, November 02, 2012 7:37 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> Subject: Re: drivres/hv
> 
> On Fri, Nov 02, 2012 at 03:11:23PM -0700, K. Y. Srinivasan wrote:
> >
> > Greg,
> >
> > Recently, I had  re-sent a few patches. You have applied all the patches except
> the balloon driver
> > related patches. Should I resend the balloon driver  patches. Let me know.
> 
> I can't apply the balloon driver until you get an ack from the
> maintainers of the code you were exporting the symbols from.
> 
> Get that, and then resend them, as they are long gone from my "to-apply"
> queue.

Greg,

Andrew has checked in my patch that exports the necessary function for Hyper-V
balloon driver:

commit bb2495a71b8499bdfe207738bc88ffa91ebe0b0a
Author: K. Y. Srinivasan <kys@microsoft.com>
Date:   Thu Nov 15 13:37:59 2012 +1100

I had sent the new balloon driver that used this new function a few days ago. Should I
resend the balloon driver. Let me know.

Regards,

K. Y




^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: drivres/hv
  2012-11-02 23:37 ` drivres/hv Greg KH
@ 2012-11-03 14:13   ` KY Srinivasan
  2012-11-15 22:22   ` drivres/hv KY Srinivasan
  1 sibling, 0 replies; 19+ messages in thread
From: KY Srinivasan @ 2012-11-03 14:13 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Friday, November 02, 2012 7:37 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
> Subject: Re: drivres/hv
> 
> On Fri, Nov 02, 2012 at 03:11:23PM -0700, K. Y. Srinivasan wrote:
> >
> > Greg,
> >
> > Recently, I had  re-sent a few patches. You have applied all the patches except
> the balloon driver
> > related patches. Should I resend the balloon driver  patches. Let me know.
> 
> I can't apply the balloon driver until you get an ack from the
> maintainers of the code you were exporting the symbols from.
> 
> Get that, and then resend them, as they are long gone from my "to-apply"
> queue.

I was under  the impression Andrew was ok with the export - I have resent the original email
from Andrew on this. Let me know if this is enough. I will resend the patches once I hear from you.

Regards,

K. Y 



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
  2012-11-02 22:11 drivres/hv K. Y. Srinivasan
@ 2012-11-02 23:37 ` Greg KH
  2012-11-03 14:13   ` drivres/hv KY Srinivasan
  2012-11-15 22:22   ` drivres/hv KY Srinivasan
  0 siblings, 2 replies; 19+ messages in thread
From: Greg KH @ 2012-11-02 23:37 UTC (permalink / raw)
  To: K. Y. Srinivasan; +Cc: linux-kernel, devel

On Fri, Nov 02, 2012 at 03:11:23PM -0700, K. Y. Srinivasan wrote:
>  
> Greg,
> 
> Recently, I had  re-sent a few patches. You have applied all the patches except the balloon driver
> related patches. Should I resend the balloon driver  patches. Let me know.

I can't apply the balloon driver until you get an ack from the
maintainers of the code you were exporting the symbols from.

Get that, and then resend them, as they are long gone from my "to-apply"
queue.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* drivres/hv
@ 2012-11-02 22:11 K. Y. Srinivasan
  2012-11-02 23:37 ` drivres/hv Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: K. Y. Srinivasan @ 2012-11-02 22:11 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel

 
Greg,

Recently, I had  re-sent a few patches. You have applied all the patches except the balloon driver
related patches. Should I resend the balloon driver  patches. Let me know.

Regards,

K. Y


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: drivres/hv
       [not found] <1328150891-29752-1-git-send-email-y>
@ 2012-02-02  2:55 ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2012-02-02  2:55 UTC (permalink / raw)
  To: y; +Cc: devel, ohering, virtualization

On Wed, Feb 01, 2012 at 06:48:11PM -0800, y@linuxonhyperv.com wrote:
>  
> Greg,
> 
> I recently saw on the mailing list that your suse.com address was no
> longer valid. I had sent some patches late last month for the hv_utils
> driver; I think it was sent around the 27th of Jan. Should I resend these
> patches to your greg@kroah.com or greg@linuxfoundation.org  address.

Nope, I still have them in my to-apply queue, they are not lost.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* drivres/hv
@ 2012-02-02  2:48 y
  0 siblings, 0 replies; 19+ messages in thread
From: y @ 2012-02-02  2:48 UTC (permalink / raw)
  To: gregkh, devel, virtualization, ohering

 
Greg,

I recently saw on the mailing list that your suse.com address was no
longer valid. I had sent some patches late last month for the hv_utils
driver; I think it was sent around the 27th of Jan. Should I resend these
patches to your greg@kroah.com or greg@linuxfoundation.org  address.

Regards,

K. Y

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-02-08  6:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 21:15 drivres/hv K. Y. Srinivasan
2016-02-08  6:13 ` drivres/hv Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-08-01 19:46 drivres/hv K. Y. Srinivasan
2015-08-01 18:35 ` drivres/hv Greg KH
2015-08-01 18:39   ` drivres/hv KY Srinivasan
2012-11-28 20:17 drivres/hv K. Y. Srinivasan
2012-11-28 22:43 ` drivres/hv Greg KH
2012-11-28 23:32   ` drivres/hv KY Srinivasan
2012-11-29  0:04     ` drivres/hv Greg KH
2012-11-29  0:35       ` drivres/hv KY Srinivasan
2012-11-29 10:13         ` drivres/hv Alan Cox
2012-11-02 22:11 drivres/hv K. Y. Srinivasan
2012-11-02 23:37 ` drivres/hv Greg KH
2012-11-03 14:13   ` drivres/hv KY Srinivasan
2012-11-15 22:22   ` drivres/hv KY Srinivasan
2012-11-15 22:34     ` drivres/hv Andrew Morton
2012-11-15 22:42       ` drivres/hv Greg KH
     [not found] <1328150891-29752-1-git-send-email-y>
2012-02-02  2:55 ` drivres/hv Greg KH
2012-02-02  2:48 drivres/hv y

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.