All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memcg: fix typo in the soft_limit stats.
@ 2011-05-16 22:00 Ying Han
  2011-05-16 23:15 ` Johannes Weiner
  0 siblings, 1 reply; 11+ messages in thread
From: Ying Han @ 2011-05-16 22:00 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Johannes Weiner,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai
  Cc: linux-mm

This fixes the typo in the memory.stat including the following two
stats:

$ cat /dev/cgroup/memory/A/memory.stat
total_soft_steal 0
total_soft_scan 0

And change it to:

$ cat /dev/cgroup/memory/A/memory.stat
total_soft_kswapd_steal 0
total_soft_kswapd_scan 0

Signed-off-by: Ying Han <yinghan@google.com>
---
 mm/memcontrol.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a010c23..1ea787d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4023,8 +4023,8 @@ struct {
 	{"limit_direct_scan", "total_limit_direct_scan"},
 	{"hierarchy_direct_steal", "total_hierarchy_direct_steal"},
 	{"hierarchy_direct_scan", "total_hierarchy_direct_scan"},
-	{"soft_kswapd_steal", "total_soft_steal"},
-	{"soft_kswapd_scan", "total_soft_scan"},
+	{"soft_kswapd_steal", "total_soft_kswapd_steal"},
+	{"soft_kswapd_scan", "total_soft_kswapd_scan"},
 	{"soft_direct_steal", "total_soft_direct_steal"},
 	{"soft_direct_scan", "total_soft_direct_scan"},
 	{"inactive_anon", "total_inactive_anon"},
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-16 22:00 [PATCH] memcg: fix typo in the soft_limit stats Ying Han
@ 2011-05-16 23:15 ` Johannes Weiner
  2011-05-17  0:05   ` Ying Han
  0 siblings, 1 reply; 11+ messages in thread
From: Johannes Weiner @ 2011-05-16 23:15 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> This fixes the typo in the memory.stat including the following two
> stats:
> 
> $ cat /dev/cgroup/memory/A/memory.stat
> total_soft_steal 0
> total_soft_scan 0
> 
> And change it to:
> 
> $ cat /dev/cgroup/memory/A/memory.stat
> total_soft_kswapd_steal 0
> total_soft_kswapd_scan 0
> 
> Signed-off-by: Ying Han <yinghan@google.com>

I am currently proposing and working on a scheme that makes the soft
limit not only a factor for global memory pressure, but for
hierarchical reclaim in general, to prefer child memcgs during reclaim
that are in excess of their soft limit.

Because this means prioritizing memcgs over one another, rather than
having explicit soft limit reclaim runs, there is no natural counter
for pages reclaimed due to the soft limit anymore.

Thus, for the patch that introduces this counter:

Nacked-by: Johannes Weiner <hannes@cmpxchg.org>

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-16 23:15 ` Johannes Weiner
@ 2011-05-17  0:05   ` Ying Han
  2011-05-17  0:13     ` Johannes Weiner
  2011-05-17  0:18     ` Andrew Morton
  0 siblings, 2 replies; 11+ messages in thread
From: Ying Han @ 2011-05-17  0:05 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:

> On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > This fixes the typo in the memory.stat including the following two
> > stats:
> >
> > $ cat /dev/cgroup/memory/A/memory.stat
> > total_soft_steal 0
> > total_soft_scan 0
> >
> > And change it to:
> >
> > $ cat /dev/cgroup/memory/A/memory.stat
> > total_soft_kswapd_steal 0
> > total_soft_kswapd_scan 0
> >
> > Signed-off-by: Ying Han <yinghan@google.com>
>
> I am currently proposing and working on a scheme that makes the soft
> limit not only a factor for global memory pressure, but for
> hierarchical reclaim in general, to prefer child memcgs during reclaim
> that are in excess of their soft limit.
>
> Because this means prioritizing memcgs over one another, rather than
> having explicit soft limit reclaim runs, there is no natural counter
> for pages reclaimed due to the soft limit anymore.
>
> Thus, for the patch that introduces this counter:
>
> Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
>

This patch is fixing a typo of the stats being integrated into mmotm. Does
it make sense to fix the
existing stats first while we are discussing other approaches?

--Ying

[-- Attachment #2: Type: text/html, Size: 1770 bytes --]

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17  0:05   ` Ying Han
@ 2011-05-17  0:13     ` Johannes Weiner
  2011-05-17  0:18       ` Rik van Riel
  2011-05-17  0:18     ` Andrew Morton
  1 sibling, 1 reply; 11+ messages in thread
From: Johannes Weiner @ 2011-05-17  0:13 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Mon, May 16, 2011 at 05:05:02PM -0700, Ying Han wrote:
> On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> 
> > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > This fixes the typo in the memory.stat including the following two
> > > stats:
> > >
> > > $ cat /dev/cgroup/memory/A/memory.stat
> > > total_soft_steal 0
> > > total_soft_scan 0
> > >
> > > And change it to:
> > >
> > > $ cat /dev/cgroup/memory/A/memory.stat
> > > total_soft_kswapd_steal 0
> > > total_soft_kswapd_scan 0
> > >
> > > Signed-off-by: Ying Han <yinghan@google.com>
> >
> > I am currently proposing and working on a scheme that makes the soft
> > limit not only a factor for global memory pressure, but for
> > hierarchical reclaim in general, to prefer child memcgs during reclaim
> > that are in excess of their soft limit.
> >
> > Because this means prioritizing memcgs over one another, rather than
> > having explicit soft limit reclaim runs, there is no natural counter
> > for pages reclaimed due to the soft limit anymore.
> >
> > Thus, for the patch that introduces this counter:
> >
> > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> >
> 
> This patch is fixing a typo of the stats being integrated into mmotm. Does
> it make sense to fix the
> existing stats first while we are discussing other approaches?

I think it would make sense to not introduce user-facing stats while
we are discussing approaches that would not be able to maintain them.

I am fine with them being in -mmotm (and receiving fixes), but would
prefer not having them merged into .40.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17  0:05   ` Ying Han
  2011-05-17  0:13     ` Johannes Weiner
@ 2011-05-17  0:18     ` Andrew Morton
  2011-05-17 23:49       ` KAMEZAWA Hiroyuki
  2011-05-26  9:05       ` Johannes Weiner
  1 sibling, 2 replies; 11+ messages in thread
From: Andrew Morton @ 2011-05-17  0:18 UTC (permalink / raw)
  To: Ying Han
  Cc: Johannes Weiner, KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura,
	Balbir Singh, Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Mon, 16 May 2011 17:05:02 -0700
Ying Han <yinghan@google.com> wrote:

> On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> 
> > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > This fixes the typo in the memory.stat including the following two
> > > stats:
> > >
> > > $ cat /dev/cgroup/memory/A/memory.stat
> > > total_soft_steal 0
> > > total_soft_scan 0
> > >
> > > And change it to:
> > >
> > > $ cat /dev/cgroup/memory/A/memory.stat
> > > total_soft_kswapd_steal 0
> > > total_soft_kswapd_scan 0
> > >
> > > Signed-off-by: Ying Han <yinghan@google.com>
> >
> > I am currently proposing and working on a scheme that makes the soft
> > limit not only a factor for global memory pressure, but for
> > hierarchical reclaim in general, to prefer child memcgs during reclaim
> > that are in excess of their soft limit.
> >
> > Because this means prioritizing memcgs over one another, rather than
> > having explicit soft limit reclaim runs, there is no natural counter
> > for pages reclaimed due to the soft limit anymore.
> >
> > Thus, for the patch that introduces this counter:
> >
> > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> >
> 
> This patch is fixing a typo of the stats being integrated into mmotm. Does
> it make sense to fix the
> existing stats first while we are discussing other approaches?
> 

It would be quite bad to add new userspace-visible stats and to then
take them away again.

But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
queued for 2.6.39-rc1, we could proceed with that plan and then make
sure that Johannes's changes are merged either prior to 2.6.40 or
they are never merged at all.

Or we could just leave out the stats until we're sure.  Not having them
for a while is not as bad as adding them and then removing them.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17  0:13     ` Johannes Weiner
@ 2011-05-17  0:18       ` Rik van Riel
  0 siblings, 0 replies; 11+ messages in thread
From: Rik van Riel @ 2011-05-17  0:18 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Ying Han, KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura,
	Balbir Singh, Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki,
	Andrew Morton, Li Zefan, Mel Gorman, Christoph Lameter,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On 05/16/2011 08:13 PM, Johannes Weiner wrote:
> On Mon, May 16, 2011 at 05:05:02PM -0700, Ying Han wrote:
>> On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner<hannes@cmpxchg.org>  wrote:

>>> Nacked-by: Johannes Weiner<hannes@cmpxchg.org>

> I think it would make sense to not introduce user-facing stats while
> we are discussing approaches that would not be able to maintain them.
>
> I am fine with them being in -mmotm (and receiving fixes), but would
> prefer not having them merged into .40.

Agreed on the stats probably not surviving, since the
underlying thing is going away (if we stick to the
plan we all agreed on at LSF).

Johannes and Ying, it would be a lot easier if you
worked together, rather than against each other :)

-- 
All rights reversed

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17  0:18     ` Andrew Morton
@ 2011-05-17 23:49       ` KAMEZAWA Hiroyuki
  2011-05-18  0:00         ` KAMEZAWA Hiroyuki
  2011-05-26  9:05       ` Johannes Weiner
  1 sibling, 1 reply; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-17 23:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ying Han, Johannes Weiner, KOSAKI Motohiro, Minchan Kim,
	Daisuke Nishimura, Balbir Singh, Tejun Heo, Pavel Emelyanov,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Mon, 16 May 2011 17:18:20 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Mon, 16 May 2011 17:05:02 -0700
> Ying Han <yinghan@google.com> wrote:
> 
> > On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > 
> > > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > > This fixes the typo in the memory.stat including the following two
> > > > stats:
> > > >
> > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > total_soft_steal 0
> > > > total_soft_scan 0
> > > >
> > > > And change it to:
> > > >
> > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > total_soft_kswapd_steal 0
> > > > total_soft_kswapd_scan 0
> > > >
> > > > Signed-off-by: Ying Han <yinghan@google.com>
> > >
> > > I am currently proposing and working on a scheme that makes the soft
> > > limit not only a factor for global memory pressure, but for
> > > hierarchical reclaim in general, to prefer child memcgs during reclaim
> > > that are in excess of their soft limit.
> > >
> > > Because this means prioritizing memcgs over one another, rather than
> > > having explicit soft limit reclaim runs, there is no natural counter
> > > for pages reclaimed due to the soft limit anymore.
> > >
> > > Thus, for the patch that introduces this counter:
> > >
> > > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> > >
> > 
> > This patch is fixing a typo of the stats being integrated into mmotm. Does
> > it make sense to fix the
> > existing stats first while we are discussing other approaches?
> > 
> 
> It would be quite bad to add new userspace-visible stats and to then
> take them away again.
> 
yes.

> But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
> queued for 2.6.39-rc1, we could proceed with that plan and then make
> sure that Johannes's changes are merged either prior to 2.6.40 or
> they are never merged at all.
> 
> Or we could just leave out the stats until we're sure.  Not having them
> for a while is not as bad as adding them and then removing them.
> 

I agree. I'm okay with removing them for a while. Johannes and Ying, could you
make a concensus ? IMHO, Johannes' work for making soft-limit co-operative with
hirerachical reclaim makes sense and agree to leave counter name as it is.

Thanks,
-Kame




--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17 23:49       ` KAMEZAWA Hiroyuki
@ 2011-05-18  0:00         ` KAMEZAWA Hiroyuki
  2011-05-18  0:56           ` Ying Han
  0 siblings, 1 reply; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-18  0:00 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: Andrew Morton, Ying Han, Johannes Weiner, KOSAKI Motohiro,
	Minchan Kim, Daisuke Nishimura, Balbir Singh, Tejun Heo,
	Pavel Emelyanov, Li Zefan, Mel Gorman, Christoph Lameter,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai, linux-mm

On Wed, 18 May 2011 08:49:19 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Mon, 16 May 2011 17:18:20 -0700
> Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> > On Mon, 16 May 2011 17:05:02 -0700
> > Ying Han <yinghan@google.com> wrote:
> > 
> > > On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > > 
> > > > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > > > This fixes the typo in the memory.stat including the following two
> > > > > stats:
> > > > >
> > > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > > total_soft_steal 0
> > > > > total_soft_scan 0
> > > > >
> > > > > And change it to:
> > > > >
> > > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > > total_soft_kswapd_steal 0
> > > > > total_soft_kswapd_scan 0
> > > > >
> > > > > Signed-off-by: Ying Han <yinghan@google.com>
> > > >
> > > > I am currently proposing and working on a scheme that makes the soft
> > > > limit not only a factor for global memory pressure, but for
> > > > hierarchical reclaim in general, to prefer child memcgs during reclaim
> > > > that are in excess of their soft limit.
> > > >
> > > > Because this means prioritizing memcgs over one another, rather than
> > > > having explicit soft limit reclaim runs, there is no natural counter
> > > > for pages reclaimed due to the soft limit anymore.
> > > >
> > > > Thus, for the patch that introduces this counter:
> > > >
> > > > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> > > >
> > > 
> > > This patch is fixing a typo of the stats being integrated into mmotm. Does
> > > it make sense to fix the
> > > existing stats first while we are discussing other approaches?
> > > 
> > 
> > It would be quite bad to add new userspace-visible stats and to then
> > take them away again.
> > 
> yes.
> 
> > But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
> > queued for 2.6.39-rc1, we could proceed with that plan and then make
> > sure that Johannes's changes are merged either prior to 2.6.40 or
> > they are never merged at all.
> > 
> > Or we could just leave out the stats until we're sure.  Not having them
> > for a while is not as bad as adding them and then removing them.
> > 
> 
> I agree. I'm okay with removing them for a while. Johannes and Ying, could you
> make a concensus ? IMHO, Johannes' work for making soft-limit co-operative with
> hirerachical reclaim makes sense and agree to leave counter name as it is.
> 

After reading threads, an another idea comes. Johannes' soft_limit just works
when the hierarchy hit limit. I think pages are not reclaimed by soft_limit...
it just reclaimed by the limit because of hierarchy. Right ?

Hmm, I'm not sure using counter of softlimit or (new) counter of reclaimed-by-parent
for that purpose.

But I think this change of stat name is not necessary, anyway.

Thanks,
-Kame



--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-18  0:00         ` KAMEZAWA Hiroyuki
@ 2011-05-18  0:56           ` Ying Han
  0 siblings, 0 replies; 11+ messages in thread
From: Ying Han @ 2011-05-18  0:56 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: Andrew Morton, Johannes Weiner, KOSAKI Motohiro, Minchan Kim,
	Daisuke Nishimura, Balbir Singh, Tejun Heo, Pavel Emelyanov,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

[-- Attachment #1: Type: text/plain, Size: 3642 bytes --]

On Tue, May 17, 2011 at 5:00 PM, KAMEZAWA Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Wed, 18 May 2011 08:49:19 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > On Mon, 16 May 2011 17:18:20 -0700
> > Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > > On Mon, 16 May 2011 17:05:02 -0700
> > > Ying Han <yinghan@google.com> wrote:
> > >
> > > > On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org>
> wrote:
> > > >
> > > > > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > > > > This fixes the typo in the memory.stat including the following
> two
> > > > > > stats:
> > > > > >
> > > > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > > > total_soft_steal 0
> > > > > > total_soft_scan 0
> > > > > >
> > > > > > And change it to:
> > > > > >
> > > > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > > > total_soft_kswapd_steal 0
> > > > > > total_soft_kswapd_scan 0
> > > > > >
> > > > > > Signed-off-by: Ying Han <yinghan@google.com>
> > > > >
> > > > > I am currently proposing and working on a scheme that makes the
> soft
> > > > > limit not only a factor for global memory pressure, but for
> > > > > hierarchical reclaim in general, to prefer child memcgs during
> reclaim
> > > > > that are in excess of their soft limit.
> > > > >
> > > > > Because this means prioritizing memcgs over one another, rather
> than
> > > > > having explicit soft limit reclaim runs, there is no natural
> counter
> > > > > for pages reclaimed due to the soft limit anymore.
> > > > >
> > > > > Thus, for the patch that introduces this counter:
> > > > >
> > > > > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> > > > >
> > > >
> > > > This patch is fixing a typo of the stats being integrated into mmotm.
> Does
> > > > it make sense to fix the
> > > > existing stats first while we are discussing other approaches?
> > > >
> > >
> > > It would be quite bad to add new userspace-visible stats and to then
> > > take them away again.
> > >
> > yes.
> >
> > > But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
> > > queued for 2.6.39-rc1, we could proceed with that plan and then make
> > > sure that Johannes's changes are merged either prior to 2.6.40 or
> > > they are never merged at all.
> > >
> > > Or we could just leave out the stats until we're sure.  Not having them
> > > for a while is not as bad as adding them and then removing them.
> > >
> >
> > I agree. I'm okay with removing them for a while. Johannes and Ying,
> could you
> > make a concensus ? IMHO, Johannes' work for making soft-limit
> co-operative with
> > hirerachical reclaim makes sense and agree to leave counter name as it
> is.
> >
>
> After reading threads, an another idea comes. Johannes' soft_limit just
> works
> when the hierarchy hit limit. I think pages are not reclaimed by
> soft_limit...
> it just reclaimed by the limit because of hierarchy. Right ?
>

My understanding of Johannes's proposal is to do soft_limit reclaim from any
memory pressure could happen on the memcg ( global reclaim,  parent hit the
hard_limit, per-memcg bg reclaim ).

If that is something we agree to proceed, the existing stats only covers
partially what we would like to count. Now it only count the soft_limit
reclaim from the global memory pressure.

Hmm, I'm not sure using counter of softlimit or (new) counter of
> reclaimed-by-parent
> for that purpose.
>
> But I think this change of stat name is not necessary, anyway.
>

 I am ok to revert this stat now since we are having the whole discussion on
the soft_limit reclaim implementation.

--Ying

>
> Thanks,
> -Kame
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 6003 bytes --]

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-17  0:18     ` Andrew Morton
  2011-05-17 23:49       ` KAMEZAWA Hiroyuki
@ 2011-05-26  9:05       ` Johannes Weiner
  2011-05-26 16:56         ` Ying Han
  1 sibling, 1 reply; 11+ messages in thread
From: Johannes Weiner @ 2011-05-26  9:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ying Han, KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura,
	Balbir Singh, Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Mon, May 16, 2011 at 05:18:20PM -0700, Andrew Morton wrote:
> On Mon, 16 May 2011 17:05:02 -0700
> Ying Han <yinghan@google.com> wrote:
> 
> > On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > 
> > > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
> > > > This fixes the typo in the memory.stat including the following two
> > > > stats:
> > > >
> > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > total_soft_steal 0
> > > > total_soft_scan 0
> > > >
> > > > And change it to:
> > > >
> > > > $ cat /dev/cgroup/memory/A/memory.stat
> > > > total_soft_kswapd_steal 0
> > > > total_soft_kswapd_scan 0
> > > >
> > > > Signed-off-by: Ying Han <yinghan@google.com>
> > >
> > > I am currently proposing and working on a scheme that makes the soft
> > > limit not only a factor for global memory pressure, but for
> > > hierarchical reclaim in general, to prefer child memcgs during reclaim
> > > that are in excess of their soft limit.
> > >
> > > Because this means prioritizing memcgs over one another, rather than
> > > having explicit soft limit reclaim runs, there is no natural counter
> > > for pages reclaimed due to the soft limit anymore.
> > >
> > > Thus, for the patch that introduces this counter:
> > >
> > > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
> > >
> > 
> > This patch is fixing a typo of the stats being integrated into mmotm. Does
> > it make sense to fix the
> > existing stats first while we are discussing other approaches?
> > 
> 
> It would be quite bad to add new userspace-visible stats and to then
> take them away again.
> 
> But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
> queued for 2.6.39-rc1, we could proceed with that plan and then make
> sure that Johannes's changes are merged either prior to 2.6.40 or
> they are never merged at all.

I am on it, but I don't think I can get them into shape and
rudimentally benchmarked until the merge window is closed.

So far I found nothing that would invalidate the design or have
measurable impact on non-memcg systems.  Then again, I suck at
constructing tests, and have only limited machinery available.

If people are interested and would like to help out verifying the
changes, I can send an updated and documented version of the series
that should be easier to understand.

> Or we could just leave out the stats until we're sure.  Not having them
> for a while is not as bad as adding them and then removing them.

I am a bit unsure as to why there is a sudden rush with those
statistics now.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix typo in the soft_limit stats.
  2011-05-26  9:05       ` Johannes Weiner
@ 2011-05-26 16:56         ` Ying Han
  0 siblings, 0 replies; 11+ messages in thread
From: Ying Han @ 2011-05-26 16:56 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura,
	Balbir Singh, Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki,
	Li Zefan, Mel Gorman, Christoph Lameter, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Thu, May 26, 2011 at 2:05 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Mon, May 16, 2011 at 05:18:20PM -0700, Andrew Morton wrote:
>> On Mon, 16 May 2011 17:05:02 -0700
>> Ying Han <yinghan@google.com> wrote:
>>
>> > On Mon, May 16, 2011 at 4:15 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
>> >
>> > > On Mon, May 16, 2011 at 03:00:30PM -0700, Ying Han wrote:
>> > > > This fixes the typo in the memory.stat including the following two
>> > > > stats:
>> > > >
>> > > > $ cat /dev/cgroup/memory/A/memory.stat
>> > > > total_soft_steal 0
>> > > > total_soft_scan 0
>> > > >
>> > > > And change it to:
>> > > >
>> > > > $ cat /dev/cgroup/memory/A/memory.stat
>> > > > total_soft_kswapd_steal 0
>> > > > total_soft_kswapd_scan 0
>> > > >
>> > > > Signed-off-by: Ying Han <yinghan@google.com>
>> > >
>> > > I am currently proposing and working on a scheme that makes the soft
>> > > limit not only a factor for global memory pressure, but for
>> > > hierarchical reclaim in general, to prefer child memcgs during reclaim
>> > > that are in excess of their soft limit.
>> > >
>> > > Because this means prioritizing memcgs over one another, rather than
>> > > having explicit soft limit reclaim runs, there is no natural counter
>> > > for pages reclaimed due to the soft limit anymore.
>> > >
>> > > Thus, for the patch that introduces this counter:
>> > >
>> > > Nacked-by: Johannes Weiner <hannes@cmpxchg.org>
>> > >
>> >
>> > This patch is fixing a typo of the stats being integrated into mmotm. Does
>> > it make sense to fix the
>> > existing stats first while we are discussing other approaches?
>> >
>>
>> It would be quite bad to add new userspace-visible stats and to then
>> take them away again.
>>
>> But given that memcg-add-stats-to-monitor-soft_limit-reclaim.patch is
>> queued for 2.6.39-rc1, we could proceed with that plan and then make
>> sure that Johannes's changes are merged either prior to 2.6.40 or
>> they are never merged at all.
>
> I am on it, but I don't think I can get them into shape and
> rudimentally benchmarked until the merge window is closed.
>
> So far I found nothing that would invalidate the design or have
> measurable impact on non-memcg systems.  Then again, I suck at
> constructing tests, and have only limited machinery available.
>
> If people are interested and would like to help out verifying the
> changes, I can send an updated and documented version of the series
> that should be easier to understand.

Please do. I can help test it out.

--Ying

>
>> Or we could just leave out the stats until we're sure.  Not having them
>> for a while is not as bad as adding them and then removing them.
>
> I am a bit unsure as to why there is a sudden rush with those
> statistics now.

>

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-05-26 16:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 22:00 [PATCH] memcg: fix typo in the soft_limit stats Ying Han
2011-05-16 23:15 ` Johannes Weiner
2011-05-17  0:05   ` Ying Han
2011-05-17  0:13     ` Johannes Weiner
2011-05-17  0:18       ` Rik van Riel
2011-05-17  0:18     ` Andrew Morton
2011-05-17 23:49       ` KAMEZAWA Hiroyuki
2011-05-18  0:00         ` KAMEZAWA Hiroyuki
2011-05-18  0:56           ` Ying Han
2011-05-26  9:05       ` Johannes Weiner
2011-05-26 16:56         ` Ying Han

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.