* Re: [PATCH 1/2] mm: Export vm_committed_as
[not found] ` <426367E2313C2449837CD2DE46E7EAF930DF7FBB@SN2PRD0310MB382.namprd03.prod.outlook.com>
@ 2012-11-05 21:44 ` Andrew Morton
2012-11-05 22:12 ` KY Srinivasan
0 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2012-11-05 21:44 UTC (permalink / raw)
To: KY Srinivasan
Cc: Greg KH, olaf@aepfle.de, linux-kernel@vger.kernel.org,
andi@firstfloor.org, apw@canonical.com,
devel@linuxdriverproject.org, linux-mm, Hiroyuki Kamezawa,
Michal Hocko, Johannes Weiner, Ying Han
On Sat, 3 Nov 2012 14:09:38 +0000
KY Srinivasan <kys@microsoft.com> wrote:
>
>
> > >
> > > Ok, but you're going to have to get the -mm developers to agree that
> > > this is ok before I can accept it.
> >
> > Well I guess it won't kill us.
>
> Andrew,
>
> I presumed this was an Ack from you with regards to exporting the
> symbol. Looks like Greg is waiting to hear from you before he can check
> these patches in. Could you provide an explicit Ack.
>
Well, I do have some qualms about exporting vm_committed_as to modules.
vm_committed_as is a global thing and only really makes sense in a
non-containerised system. If the application is running within a
memory cgroup then vm_enough_memory() and the global overcommit policy
are at best irrelevant and misleading.
If use of vm_committed_as is indeed a bad thing, then exporting it to
modules might increase the amount of badness in the kernel.
I don't think these qualms are serious enough to stand in the way of
this patch, but I'd be interested in hearing the memcg developers'
thoughts on the matter?
Perhaps you could provide a detailed description of why your module
actually needs this? Precisely what information is it looking for
and why? If we know that then perhaps a more comfortable alternative
can be found.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-05 21:44 ` [PATCH 1/2] mm: Export vm_committed_as Andrew Morton
@ 2012-11-05 22:12 ` KY Srinivasan
2012-11-05 22:33 ` David Rientjes
2012-11-06 9:05 ` Michal Hocko
0 siblings, 2 replies; 13+ messages in thread
From: KY Srinivasan @ 2012-11-05 22:12 UTC (permalink / raw)
To: Andrew Morton
Cc: Greg KH, olaf@aepfle.de, linux-kernel@vger.kernel.org,
andi@firstfloor.org, apw@canonical.com,
devel@linuxdriverproject.org, linux-mm@kvack.org,
Hiroyuki Kamezawa, Michal Hocko, Johannes Weiner, Ying Han
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Monday, November 05, 2012 4:45 PM
> To: KY Srinivasan
> Cc: Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org; andi@firstfloor.org;
> apw@canonical.com; devel@linuxdriverproject.org; linux-mm@kvack.org;
> Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
>
> On Sat, 3 Nov 2012 14:09:38 +0000
> KY Srinivasan <kys@microsoft.com> wrote:
>
> >
> >
> > > >
> > > > Ok, but you're going to have to get the -mm developers to agree that
> > > > this is ok before I can accept it.
> > >
> > > Well I guess it won't kill us.
> >
> > Andrew,
> >
> > I presumed this was an Ack from you with regards to exporting the
> > symbol. Looks like Greg is waiting to hear from you before he can check
> > these patches in. Could you provide an explicit Ack.
> >
>
> Well, I do have some qualms about exporting vm_committed_as to modules.
>
> vm_committed_as is a global thing and only really makes sense in a
> non-containerised system. If the application is running within a
> memory cgroup then vm_enough_memory() and the global overcommit policy
> are at best irrelevant and misleading.
>
> If use of vm_committed_as is indeed a bad thing, then exporting it to
> modules might increase the amount of badness in the kernel.
>
>
> I don't think these qualms are serious enough to stand in the way of
> this patch, but I'd be interested in hearing the memcg developers'
> thoughts on the matter?
>
>
> Perhaps you could provide a detailed description of why your module
> actually needs this? Precisely what information is it looking for
> and why? If we know that then perhaps a more comfortable alternative
> can be found.
The Hyper-V host has a policy engine for managing available physical memory across
competing virtual machines. This policy decision is based on a number of parameters
including the memory pressure reported by the guest. Currently, the pressure calculation is
based on the memory commitment made by the guest. From what I can tell, the ratio of
currently allocated physical memory to the current memory commitment made by the guest
(vm_committed_as) is used as one of the parameters in making the memory balancing decision on
the host. This is what Windows guests report to the host. So, I need some measure of memory
commitments made by the Linux guest. This is the reason I want export vm_committed_as.
Regards,
K. Y
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-05 22:12 ` KY Srinivasan
@ 2012-11-05 22:33 ` David Rientjes
2012-11-06 14:46 ` Michal Hocko
2012-11-08 22:01 ` KY Srinivasan
2012-11-06 9:05 ` Michal Hocko
1 sibling, 2 replies; 13+ messages in thread
From: David Rientjes @ 2012-11-05 22:33 UTC (permalink / raw)
To: KY Srinivasan
Cc: Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
On Mon, 5 Nov 2012, KY Srinivasan wrote:
> The Hyper-V host has a policy engine for managing available physical memory across
> competing virtual machines. This policy decision is based on a number of parameters
> including the memory pressure reported by the guest. Currently, the pressure calculation is
> based on the memory commitment made by the guest. From what I can tell, the ratio of
> currently allocated physical memory to the current memory commitment made by the guest
> (vm_committed_as) is used as one of the parameters in making the memory balancing decision on
> the host. This is what Windows guests report to the host. So, I need some measure of memory
> commitments made by the Linux guest. This is the reason I want export vm_committed_as.
>
I don't think you should export the symbol itself to modules but rather a
helper function that returns s64 that just wraps
percpu_counter_read_positive() which your driver could use instead.
(And why percpu_counter_read_positive() returns a signed type is a
mystery.)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] mm: Export vm_committed_as
2012-11-05 22:12 ` KY Srinivasan
2012-11-05 22:33 ` David Rientjes
@ 2012-11-06 9:05 ` Michal Hocko
2012-11-06 12:53 ` KY Srinivasan
2012-11-08 13:28 ` KY Srinivasan
1 sibling, 2 replies; 13+ messages in thread
From: Michal Hocko @ 2012-11-06 9:05 UTC (permalink / raw)
To: KY Srinivasan
Cc: Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Johannes Weiner, Ying Han
On Mon 05-11-12 22:12:25, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Andrew Morton [mailto:akpm@linux-foundation.org]
> > Sent: Monday, November 05, 2012 4:45 PM
> > To: KY Srinivasan
> > Cc: Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org; andi@firstfloor.org;
> > apw@canonical.com; devel@linuxdriverproject.org; linux-mm@kvack.org;
> > Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> > Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
> >
> > On Sat, 3 Nov 2012 14:09:38 +0000
> > KY Srinivasan <kys@microsoft.com> wrote:
> >
> > >
> > >
> > > > >
> > > > > Ok, but you're going to have to get the -mm developers to agree that
> > > > > this is ok before I can accept it.
> > > >
> > > > Well I guess it won't kill us.
> > >
> > > Andrew,
> > >
> > > I presumed this was an Ack from you with regards to exporting the
> > > symbol. Looks like Greg is waiting to hear from you before he can check
> > > these patches in. Could you provide an explicit Ack.
> > >
> >
> > Well, I do have some qualms about exporting vm_committed_as to modules.
> >
> > vm_committed_as is a global thing and only really makes sense in a
> > non-containerised system. If the application is running within a
> > memory cgroup then vm_enough_memory() and the global overcommit policy
> > are at best irrelevant and misleading.
> >
> > If use of vm_committed_as is indeed a bad thing, then exporting it to
> > modules might increase the amount of badness in the kernel.
> >
> >
> > I don't think these qualms are serious enough to stand in the way of
> > this patch, but I'd be interested in hearing the memcg developers'
> > thoughts on the matter?
> >
> >
> > Perhaps you could provide a detailed description of why your module
> > actually needs this? Precisely what information is it looking for
> > and why? If we know that then perhaps a more comfortable alternative
> > can be found.
>
> The Hyper-V host has a policy engine for managing available physical
> memory across competing virtual machines. This policy decision
> is based on a number of parameters including the memory pressure
> reported by the guest. Currently, the pressure calculation is based
> on the memory commitment made by the guest. From what I can tell, the
> ratio of currently allocated physical memory to the current memory
> commitment made by the guest (vm_committed_as) is used as one of the
> parameters in making the memory balancing decision on the host. This
> is what Windows guests report to the host. So, I need some measure of
> memory commitments made by the Linux guest. This is the reason I want
> export vm_committed_as.
So IIUC it will be guest who reports the value and the guest runs in the
ring-0 so it is not in any user process context, right?
If this is correct then memcg doesn't play any role here.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-06 9:05 ` Michal Hocko
@ 2012-11-06 12:53 ` KY Srinivasan
2012-11-08 13:28 ` KY Srinivasan
1 sibling, 0 replies; 13+ messages in thread
From: KY Srinivasan @ 2012-11-06 12:53 UTC (permalink / raw)
To: Michal Hocko
Cc: Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Johannes Weiner, Ying Han
> -----Original Message-----
> From: Michal Hocko [mailto:mstsxfx@gmail.com] On Behalf Of Michal Hocko
> Sent: Tuesday, November 06, 2012 4:06 AM
> To: KY Srinivasan
> Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> mm@kvack.org; Hiroyuki Kamezawa; Johannes Weiner; Ying Han
> Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
>
> On Mon 05-11-12 22:12:25, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Andrew Morton [mailto:akpm@linux-foundation.org]
> > > Sent: Monday, November 05, 2012 4:45 PM
> > > To: KY Srinivasan
> > > Cc: Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> andi@firstfloor.org;
> > > apw@canonical.com; devel@linuxdriverproject.org; linux-mm@kvack.org;
> > > Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> > > Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
> > >
> > > On Sat, 3 Nov 2012 14:09:38 +0000
> > > KY Srinivasan <kys@microsoft.com> wrote:
> > >
> > > >
> > > >
> > > > > >
> > > > > > Ok, but you're going to have to get the -mm developers to agree that
> > > > > > this is ok before I can accept it.
> > > > >
> > > > > Well I guess it won't kill us.
> > > >
> > > > Andrew,
> > > >
> > > > I presumed this was an Ack from you with regards to exporting the
> > > > symbol. Looks like Greg is waiting to hear from you before he can check
> > > > these patches in. Could you provide an explicit Ack.
> > > >
> > >
> > > Well, I do have some qualms about exporting vm_committed_as to modules.
> > >
> > > vm_committed_as is a global thing and only really makes sense in a
> > > non-containerised system. If the application is running within a
> > > memory cgroup then vm_enough_memory() and the global overcommit
> policy
> > > are at best irrelevant and misleading.
> > >
> > > If use of vm_committed_as is indeed a bad thing, then exporting it to
> > > modules might increase the amount of badness in the kernel.
> > >
> > >
> > > I don't think these qualms are serious enough to stand in the way of
> > > this patch, but I'd be interested in hearing the memcg developers'
> > > thoughts on the matter?
> > >
> > >
> > > Perhaps you could provide a detailed description of why your module
> > > actually needs this? Precisely what information is it looking for
> > > and why? If we know that then perhaps a more comfortable alternative
> > > can be found.
> >
> > The Hyper-V host has a policy engine for managing available physical
> > memory across competing virtual machines. This policy decision
> > is based on a number of parameters including the memory pressure
> > reported by the guest. Currently, the pressure calculation is based
> > on the memory commitment made by the guest. From what I can tell, the
> > ratio of currently allocated physical memory to the current memory
> > commitment made by the guest (vm_committed_as) is used as one of the
> > parameters in making the memory balancing decision on the host. This
> > is what Windows guests report to the host. So, I need some measure of
> > memory commitments made by the Linux guest. This is the reason I want
> > export vm_committed_as.
>
> So IIUC it will be guest who reports the value and the guest runs in the
> ring-0 so it is not in any user process context, right?
> If this is correct then memcg doesn't play any role here.
Thanks Michal. Yes, the kernel driver reports this metric to the host.
Andrew, let me know how I should proceed here.
Thanks,
K. Y
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] mm: Export vm_committed_as
2012-11-05 22:33 ` David Rientjes
@ 2012-11-06 14:46 ` Michal Hocko
2012-11-08 22:01 ` KY Srinivasan
1 sibling, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-11-06 14:46 UTC (permalink / raw)
To: David Rientjes
Cc: KY Srinivasan, Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Johannes Weiner, Ying Han
On Mon 05-11-12 14:33:12, David Rientjes wrote:
> On Mon, 5 Nov 2012, KY Srinivasan wrote:
>
> > The Hyper-V host has a policy engine for managing available physical memory across
> > competing virtual machines. This policy decision is based on a number of parameters
> > including the memory pressure reported by the guest. Currently, the pressure calculation is
> > based on the memory commitment made by the guest. From what I can tell, the ratio of
> > currently allocated physical memory to the current memory commitment made by the guest
> > (vm_committed_as) is used as one of the parameters in making the memory balancing decision on
> > the host. This is what Windows guests report to the host. So, I need some measure of memory
> > commitments made by the Linux guest. This is the reason I want export vm_committed_as.
> >
>
> I don't think you should export the symbol itself to modules but rather a
> helper function that returns s64 that just wraps
> percpu_counter_read_positive() which your driver could use instead.
Agreed, we should rather make sure that nobody can manipulate the value
from modules.
> (And why percpu_counter_read_positive() returns a signed type is a
> mystery.)
Strange indeed. The last commit changed it from long to s64 to suport
values bigger than 2^31 but even the original long doesn't make much
sense to me.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-06 9:05 ` Michal Hocko
2012-11-06 12:53 ` KY Srinivasan
@ 2012-11-08 13:28 ` KY Srinivasan
2012-11-08 21:55 ` David Rientjes
1 sibling, 1 reply; 13+ messages in thread
From: KY Srinivasan @ 2012-11-08 13:28 UTC (permalink / raw)
To: Michal Hocko
Cc: Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Johannes Weiner, Ying Han
> -----Original Message-----
> From: KY Srinivasan
> Sent: Tuesday, November 06, 2012 7:53 AM
> To: 'Michal Hocko'
> Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> mm@kvack.org; Hiroyuki Kamezawa; Johannes Weiner; Ying Han
> Subject: RE: [PATCH 1/2] mm: Export vm_committed_as
>
>
>
> > -----Original Message-----
> > From: Michal Hocko [mailto:mstsxfx@gmail.com] On Behalf Of Michal Hocko
> > Sent: Tuesday, November 06, 2012 4:06 AM
> > To: KY Srinivasan
> > Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> > andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> > mm@kvack.org; Hiroyuki Kamezawa; Johannes Weiner; Ying Han
> > Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
> >
> > On Mon 05-11-12 22:12:25, KY Srinivasan wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Andrew Morton [mailto:akpm@linux-foundation.org]
> > > > Sent: Monday, November 05, 2012 4:45 PM
> > > > To: KY Srinivasan
> > > > Cc: Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> > andi@firstfloor.org;
> > > > apw@canonical.com; devel@linuxdriverproject.org; linux-mm@kvack.org;
> > > > Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> > > > Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
> > > >
> > > > On Sat, 3 Nov 2012 14:09:38 +0000
> > > > KY Srinivasan <kys@microsoft.com> wrote:
> > > >
> > > > >
> > > > >
> > > > > > >
> > > > > > > Ok, but you're going to have to get the -mm developers to agree that
> > > > > > > this is ok before I can accept it.
> > > > > >
> > > > > > Well I guess it won't kill us.
> > > > >
> > > > > Andrew,
> > > > >
> > > > > I presumed this was an Ack from you with regards to exporting the
> > > > > symbol. Looks like Greg is waiting to hear from you before he can check
> > > > > these patches in. Could you provide an explicit Ack.
> > > > >
> > > >
> > > > Well, I do have some qualms about exporting vm_committed_as to
> modules.
> > > >
> > > > vm_committed_as is a global thing and only really makes sense in a
> > > > non-containerised system. If the application is running within a
> > > > memory cgroup then vm_enough_memory() and the global overcommit
> > policy
> > > > are at best irrelevant and misleading.
> > > >
> > > > If use of vm_committed_as is indeed a bad thing, then exporting it to
> > > > modules might increase the amount of badness in the kernel.
> > > >
> > > >
> > > > I don't think these qualms are serious enough to stand in the way of
> > > > this patch, but I'd be interested in hearing the memcg developers'
> > > > thoughts on the matter?
> > > >
> > > >
> > > > Perhaps you could provide a detailed description of why your module
> > > > actually needs this? Precisely what information is it looking for
> > > > and why? If we know that then perhaps a more comfortable alternative
> > > > can be found.
> > >
> > > The Hyper-V host has a policy engine for managing available physical
> > > memory across competing virtual machines. This policy decision
> > > is based on a number of parameters including the memory pressure
> > > reported by the guest. Currently, the pressure calculation is based
> > > on the memory commitment made by the guest. From what I can tell, the
> > > ratio of currently allocated physical memory to the current memory
> > > commitment made by the guest (vm_committed_as) is used as one of the
> > > parameters in making the memory balancing decision on the host. This
> > > is what Windows guests report to the host. So, I need some measure of
> > > memory commitments made by the Linux guest. This is the reason I want
> > > export vm_committed_as.
> >
> > So IIUC it will be guest who reports the value and the guest runs in the
> > ring-0 so it is not in any user process context, right?
> > If this is correct then memcg doesn't play any role here.
>
> Thanks Michal. Yes, the kernel driver reports this metric to the host.
> Andrew, let me know how I should proceed here.
Ping.
Regards,
K. Y
>
> Thanks,
>
> K. Y
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-08 13:28 ` KY Srinivasan
@ 2012-11-08 21:55 ` David Rientjes
0 siblings, 0 replies; 13+ messages in thread
From: David Rientjes @ 2012-11-08 21:55 UTC (permalink / raw)
To: KY Srinivasan
Cc: Michal Hocko, Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Johannes Weiner, Ying Han
On Thu, 8 Nov 2012, KY Srinivasan wrote:
> > Thanks Michal. Yes, the kernel driver reports this metric to the host.
> > Andrew, let me know how I should proceed here.
>
> Ping.
>
Could you respond to my email in this thread?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-05 22:33 ` David Rientjes
2012-11-06 14:46 ` Michal Hocko
@ 2012-11-08 22:01 ` KY Srinivasan
2012-11-08 22:05 ` Andrew Morton
1 sibling, 1 reply; 13+ messages in thread
From: KY Srinivasan @ 2012-11-08 22:01 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
> -----Original Message-----
> From: David Rientjes [mailto:rientjes@google.com]
> Sent: Monday, November 05, 2012 5:33 PM
> To: KY Srinivasan
> Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> mm@kvack.org; Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> Subject: RE: [PATCH 1/2] mm: Export vm_committed_as
>
> On Mon, 5 Nov 2012, KY Srinivasan wrote:
>
> > The Hyper-V host has a policy engine for managing available physical memory
> across
> > competing virtual machines. This policy decision is based on a number of
> parameters
> > including the memory pressure reported by the guest. Currently, the pressure
> calculation is
> > based on the memory commitment made by the guest. From what I can tell,
> the ratio of
> > currently allocated physical memory to the current memory commitment made
> by the guest
> > (vm_committed_as) is used as one of the parameters in making the memory
> balancing decision on
> > the host. This is what Windows guests report to the host. So, I need some
> measure of memory
> > commitments made by the Linux guest. This is the reason I want export
> vm_committed_as.
> >
>
> I don't think you should export the symbol itself to modules but rather a
> helper function that returns s64 that just wraps
> percpu_counter_read_positive() which your driver could use instead.
>
> (And why percpu_counter_read_positive() returns a signed type is a
> mystery.)
Yes, this makes sense. I just want to access (read) this metric. Andrew, if you are willing to
take this patch, I could send one.
Regards,
K. Y
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] mm: Export vm_committed_as
2012-11-08 22:01 ` KY Srinivasan
@ 2012-11-08 22:05 ` Andrew Morton
2012-11-08 22:08 ` KY Srinivasan
2012-11-08 22:14 ` David Rientjes
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Morton @ 2012-11-08 22:05 UTC (permalink / raw)
To: KY Srinivasan
Cc: David Rientjes, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
On Thu, 8 Nov 2012 22:01:33 +0000
KY Srinivasan <kys@microsoft.com> wrote:
>
>
> > -----Original Message-----
> > From: David Rientjes [mailto:rientjes@google.com]
> > Sent: Monday, November 05, 2012 5:33 PM
> > To: KY Srinivasan
> > Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> > andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> > mm@kvack.org; Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> > Subject: RE: [PATCH 1/2] mm: Export vm_committed_as
> >
> > On Mon, 5 Nov 2012, KY Srinivasan wrote:
> >
> > > The Hyper-V host has a policy engine for managing available physical memory
> > across
> > > competing virtual machines. This policy decision is based on a number of
> > parameters
> > > including the memory pressure reported by the guest. Currently, the pressure
> > calculation is
> > > based on the memory commitment made by the guest. From what I can tell,
> > the ratio of
> > > currently allocated physical memory to the current memory commitment made
> > by the guest
> > > (vm_committed_as) is used as one of the parameters in making the memory
> > balancing decision on
> > > the host. This is what Windows guests report to the host. So, I need some
> > measure of memory
> > > commitments made by the Linux guest. This is the reason I want export
> > vm_committed_as.
> > >
> >
> > I don't think you should export the symbol itself to modules but rather a
> > helper function that returns s64 that just wraps
> > percpu_counter_read_positive() which your driver could use instead.
> >
> > (And why percpu_counter_read_positive() returns a signed type is a
> > mystery.)
>
> Yes, this makes sense. I just want to access (read) this metric. Andrew, if you are willing to
> take this patch, I could send one.
Sure. I suppose that's better, although any module which modifies
committed_as would never pass review (rofl).
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 1/2] mm: Export vm_committed_as
2012-11-08 22:05 ` Andrew Morton
@ 2012-11-08 22:08 ` KY Srinivasan
2012-11-08 22:14 ` David Rientjes
1 sibling, 0 replies; 13+ messages in thread
From: KY Srinivasan @ 2012-11-08 22:08 UTC (permalink / raw)
To: Andrew Morton
Cc: David Rientjes, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Thursday, November 08, 2012 5:05 PM
> To: KY Srinivasan
> Cc: David Rientjes; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org; linux-
> mm@kvack.org; Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying Han
> Subject: Re: [PATCH 1/2] mm: Export vm_committed_as
>
> On Thu, 8 Nov 2012 22:01:33 +0000
> KY Srinivasan <kys@microsoft.com> wrote:
>
> >
> >
> > > -----Original Message-----
> > > From: David Rientjes [mailto:rientjes@google.com]
> > > Sent: Monday, November 05, 2012 5:33 PM
> > > To: KY Srinivasan
> > > Cc: Andrew Morton; Greg KH; olaf@aepfle.de; linux-kernel@vger.kernel.org;
> > > andi@firstfloor.org; apw@canonical.com; devel@linuxdriverproject.org;
> linux-
> > > mm@kvack.org; Hiroyuki Kamezawa; Michal Hocko; Johannes Weiner; Ying
> Han
> > > Subject: RE: [PATCH 1/2] mm: Export vm_committed_as
> > >
> > > On Mon, 5 Nov 2012, KY Srinivasan wrote:
> > >
> > > > The Hyper-V host has a policy engine for managing available physical
> memory
> > > across
> > > > competing virtual machines. This policy decision is based on a number of
> > > parameters
> > > > including the memory pressure reported by the guest. Currently, the
> pressure
> > > calculation is
> > > > based on the memory commitment made by the guest. From what I can
> tell,
> > > the ratio of
> > > > currently allocated physical memory to the current memory commitment
> made
> > > by the guest
> > > > (vm_committed_as) is used as one of the parameters in making the
> memory
> > > balancing decision on
> > > > the host. This is what Windows guests report to the host. So, I need some
> > > measure of memory
> > > > commitments made by the Linux guest. This is the reason I want export
> > > vm_committed_as.
> > > >
> > >
> > > I don't think you should export the symbol itself to modules but rather a
> > > helper function that returns s64 that just wraps
> > > percpu_counter_read_positive() which your driver could use instead.
> > >
> > > (And why percpu_counter_read_positive() returns a signed type is a
> > > mystery.)
> >
> > Yes, this makes sense. I just want to access (read) this metric. Andrew, if you
> are willing to
> > take this patch, I could send one.
>
> Sure. I suppose that's better, although any module which modifies
> committed_as would never pass review (rofl).
Thanks Andrew; I will send the patch out along with the appropriately modified balloon driver patch.
Regards,
K. Y
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] mm: Export vm_committed_as
2012-11-08 22:05 ` Andrew Morton
2012-11-08 22:08 ` KY Srinivasan
@ 2012-11-08 22:14 ` David Rientjes
2012-11-08 22:18 ` Andrew Morton
1 sibling, 1 reply; 13+ messages in thread
From: David Rientjes @ 2012-11-08 22:14 UTC (permalink / raw)
To: Andrew Morton
Cc: KY Srinivasan, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
On Thu, 8 Nov 2012, Andrew Morton wrote:
> > > I don't think you should export the symbol itself to modules but rather a
> > > helper function that returns s64 that just wraps
> > > percpu_counter_read_positive() which your driver could use instead.
> > >
> > > (And why percpu_counter_read_positive() returns a signed type is a
> > > mystery.)
> >
> > Yes, this makes sense. I just want to access (read) this metric. Andrew, if you are willing to
> > take this patch, I could send one.
>
> Sure. I suppose that's better, although any module which modifies
> committed_as would never pass review (rofl).
>
I was thinking of a function that all hypervisors can use (since xen also
uses it) that can be well documented and maintain the semantics that they
expect, whether that relines on vm_commited_as in the future or not.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] mm: Export vm_committed_as
2012-11-08 22:14 ` David Rientjes
@ 2012-11-08 22:18 ` Andrew Morton
0 siblings, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2012-11-08 22:18 UTC (permalink / raw)
To: David Rientjes
Cc: KY Srinivasan, Greg KH, olaf@aepfle.de,
linux-kernel@vger.kernel.org, andi@firstfloor.org,
apw@canonical.com, devel@linuxdriverproject.org,
linux-mm@kvack.org, Hiroyuki Kamezawa, Michal Hocko,
Johannes Weiner, Ying Han
On Thu, 8 Nov 2012 14:14:35 -0800 (PST)
David Rientjes <rientjes@google.com> wrote:
> On Thu, 8 Nov 2012, Andrew Morton wrote:
>
> > > > I don't think you should export the symbol itself to modules but rather a
> > > > helper function that returns s64 that just wraps
> > > > percpu_counter_read_positive() which your driver could use instead.
> > > >
> > > > (And why percpu_counter_read_positive() returns a signed type is a
> > > > mystery.)
> > >
> > > Yes, this makes sense. I just want to access (read) this metric. Andrew, if you are willing to
> > > take this patch, I could send one.
> >
> > Sure. I suppose that's better, although any module which modifies
> > committed_as would never pass review (rofl).
> >
>
> I was thinking of a function that all hypervisors can use (since xen also
> uses it) that can be well documented and maintain the semantics that they
> expect, whether that relines on vm_commited_as in the future or not.
Yes, it would be nice to have some central site where people can go to
understand what's happening here.
It's still unclear to me that committed_as is telling the
hypervisors precisely what they want to know.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-11-08 22:18 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1349654347-18337-1-git-send-email-kys@microsoft.com>
[not found] ` <1349654386-18378-1-git-send-email-kys@microsoft.com>
[not found] ` <20121008004358.GA12342@kroah.com>
[not found] ` <426367E2313C2449837CD2DE46E7EAF930A1FB31@SN2PRD0310MB382.namprd03.prod.outlook.com>
[not found] ` <20121008133539.GA15490@kroah.com>
[not found] ` <20121009124755.ce1087b4.akpm@linux-foundation.org>
[not found] ` <426367E2313C2449837CD2DE46E7EAF930DF7FBB@SN2PRD0310MB382.namprd03.prod.outlook.com>
2012-11-05 21:44 ` [PATCH 1/2] mm: Export vm_committed_as Andrew Morton
2012-11-05 22:12 ` KY Srinivasan
2012-11-05 22:33 ` David Rientjes
2012-11-06 14:46 ` Michal Hocko
2012-11-08 22:01 ` KY Srinivasan
2012-11-08 22:05 ` Andrew Morton
2012-11-08 22:08 ` KY Srinivasan
2012-11-08 22:14 ` David Rientjes
2012-11-08 22:18 ` Andrew Morton
2012-11-06 9:05 ` Michal Hocko
2012-11-06 12:53 ` KY Srinivasan
2012-11-08 13:28 ` KY Srinivasan
2012-11-08 21:55 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).