Re: [PATCH 1/2] Add mempressure cgroup

2013-01-13 Thread Simon Jeons
On Fri, 2013-01-04 at 00:29 -0800, Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for > pressure

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-13 Thread Simon Jeons
On Fri, 2013-01-04 at 00:29 -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for pressure index

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Anton Vorontsov
On Fri, Jan 11, 2013 at 02:56:15PM +0900, Minchan Kim wrote: [...] > > Ahh. You're talking about the shrinker interface. Yes, there is no way to > > tell if the freed memory will be actually "released" (and if not, then > > yes, we released it unnecessary). > > I don't tell about actually

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Minchan Kim
On Thu, Jan 10, 2013 at 09:38:31PM -0800, Anton Vorontsov wrote: > On Fri, Jan 11, 2013 at 02:12:10PM +0900, Minchan Kim wrote: > > On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: > > > On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: > > > [...] > > > > Sorry still I

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Anton Vorontsov
On Fri, Jan 11, 2013 at 02:12:10PM +0900, Minchan Kim wrote: > On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: > > On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: > > [...] > > > Sorry still I didn't look at your implementation about cgroup part. > > > but I had a

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Minchan Kim
On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: > On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: > [...] > > Sorry still I didn't look at your implementation about cgroup part. > > but I had a question since long time ago. > > > > How can we can make sure false

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Minchan Kim
On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: [...] Sorry still I didn't look at your implementation about cgroup part. but I had a question since long time ago. How can we can make sure false positive about

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Anton Vorontsov
On Fri, Jan 11, 2013 at 02:12:10PM +0900, Minchan Kim wrote: On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: [...] Sorry still I didn't look at your implementation about cgroup part. but I had a question since

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Minchan Kim
On Thu, Jan 10, 2013 at 09:38:31PM -0800, Anton Vorontsov wrote: On Fri, Jan 11, 2013 at 02:12:10PM +0900, Minchan Kim wrote: On Wed, Jan 09, 2013 at 02:14:49PM -0800, Anton Vorontsov wrote: On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: [...] Sorry still I didn't look

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-10 Thread Anton Vorontsov
On Fri, Jan 11, 2013 at 02:56:15PM +0900, Minchan Kim wrote: [...] Ahh. You're talking about the shrinker interface. Yes, there is no way to tell if the freed memory will be actually released (and if not, then yes, we released it unnecessary). I don't tell about actually released or not.

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/10/2013 02:06 AM, Anton Vorontsov wrote: > On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: > [...] >>> We can use mempressure w/o memcg, and even then it can (or should :) be >>> useful (for cpuset, for example). >> >> The problem is that you end with, at the very least, duplicate

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Anton. On Wed, Jan 09, 2013 at 02:06:41PM -0800, Anton Vorontsov wrote: > Yeah. I started answering your comments about hierarchical accounting, > looked into the memcg code, and realized that *this* is where I need the > memcg stuff. :) Yay, I wasn't completely clueless. > Thus yes, I

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: [...] > Sorry still I didn't look at your implementation about cgroup part. > but I had a question since long time ago. > > How can we can make sure false positive about zone and NUMA? > I mean DMA zone is short in system so VM notify

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: [...] > > We can use mempressure w/o memcg, and even then it can (or should :) be > > useful (for cpuset, for example). > > The problem is that you end with, at the very least, duplicate > hierarchical accounting mechanisms which overlap

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: > Please talk with memcg people and fold it into memcg. It can (and > should) be done in a way to not incur overhead when only root memcg is > in use and how this is done defines userland-visible interface, so > let's please not repeat

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Anton. On Wed, Jan 09, 2013 at 01:36:04PM -0800, Anton Vorontsov wrote: > On Thu, Jan 10, 2013 at 01:20:30AM +0400, Glauber Costa wrote: > [...] > > Given the above, I believe that ideally we should use this pressure > > mechanism in memcg replacing the current memcg notification

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Thu, Jan 10, 2013 at 01:20:30AM +0400, Glauber Costa wrote: [...] > Given the above, I believe that ideally we should use this pressure > mechanism in memcg replacing the current memcg notification mechanism. Just a quick wonder: why would we need to place it into memcg, when we don't need any

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/10/2013 12:37 AM, Tejun Heo wrote: > Hello, > > Can you please cc me too when posting further patches? I kinda missed > the whole discussion upto this point. > > On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: >> This commit implements David Rientjes' idea of mempressure

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
On Wed, Jan 09, 2013 at 12:37:31PM -0800, Tejun Heo wrote: > Hello, > > Can you please cc me too when posting further patches? I kinda missed > the whole discussion upto this point. > > On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: > > This commit implements David Rientjes'

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Can you please cc me too when posting further patches? I kinda missed the whole discussion upto this point. On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 18:10:02 +0400 Glauber Costa wrote: > On 01/09/2013 01:44 AM, Andrew Morton wrote: > > On Fri, 4 Jan 2013 00:29:11 -0800 > > Anton Vorontsov wrote: > > > >> This commit implements David Rientjes' idea of mempressure cgroup. > >> > >> The main characteristics are the same to

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/09/2013 01:44 AM, Andrew Morton wrote: > On Fri, 4 Jan 2013 00:29:11 -0800 > Anton Vorontsov wrote: > >> This commit implements David Rientjes' idea of mempressure cgroup. >> >> The main characteristics are the same to what I've tried to add to vmevent >> API; internally, it uses Mel

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/09/2013 01:15 PM, Andrew Morton wrote: > On Wed, 9 Jan 2013 12:56:46 +0400 Glauber Costa wrote: > >>> +#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_MEMPRESSURE) >>> +SUBSYS(mpc_cgroup) >>> +#endif >> >> It might be just me, but if one does not know what this is about, "mpc" >> immediately fetches

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 12:56:46 +0400 Glauber Costa wrote: > > +#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_MEMPRESSURE) > > +SUBSYS(mpc_cgroup) > > +#endif > > It might be just me, but if one does not know what this is about, "mpc" > immediately fetches something communication-related to mind. I would >

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
Hi. I have a couple of small questions. On 01/04/2013 12:29 PM, Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
Hi. I have a couple of small questions. On 01/04/2013 12:29 PM, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 12:56:46 +0400 Glauber Costa glom...@parallels.com wrote: +#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_MEMPRESSURE) +SUBSYS(mpc_cgroup) +#endif It might be just me, but if one does not know what this is about, mpc immediately fetches something communication-related to mind. I

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/09/2013 01:15 PM, Andrew Morton wrote: On Wed, 9 Jan 2013 12:56:46 +0400 Glauber Costa glom...@parallels.com wrote: +#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_MEMPRESSURE) +SUBSYS(mpc_cgroup) +#endif It might be just me, but if one does not know what this is about, mpc immediately fetches

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/09/2013 01:44 AM, Andrew Morton wrote: On Fri, 4 Jan 2013 00:29:11 -0800 Anton Vorontsov anton.voront...@linaro.org wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally,

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 18:10:02 +0400 Glauber Costa glom...@parallels.com wrote: On 01/09/2013 01:44 AM, Andrew Morton wrote: On Fri, 4 Jan 2013 00:29:11 -0800 Anton Vorontsov anton.voront...@linaro.org wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Can you please cc me too when posting further patches? I kinda missed the whole discussion upto this point. On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
On Wed, Jan 09, 2013 at 12:37:31PM -0800, Tejun Heo wrote: Hello, Can you please cc me too when posting further patches? I kinda missed the whole discussion upto this point. On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/10/2013 12:37 AM, Tejun Heo wrote: Hello, Can you please cc me too when posting further patches? I kinda missed the whole discussion upto this point. On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup.

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Thu, Jan 10, 2013 at 01:20:30AM +0400, Glauber Costa wrote: [...] Given the above, I believe that ideally we should use this pressure mechanism in memcg replacing the current memcg notification mechanism. Just a quick wonder: why would we need to place it into memcg, when we don't need any

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Anton. On Wed, Jan 09, 2013 at 01:36:04PM -0800, Anton Vorontsov wrote: On Thu, Jan 10, 2013 at 01:20:30AM +0400, Glauber Costa wrote: [...] Given the above, I believe that ideally we should use this pressure mechanism in memcg replacing the current memcg notification mechanism.

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: Please talk with memcg people and fold it into memcg. It can (and should) be done in a way to not incur overhead when only root memcg is in use and how this is done defines userland-visible interface, so let's please not repeat past

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: [...] We can use mempressure w/o memcg, and even then it can (or should :) be useful (for cpuset, for example). The problem is that you end with, at the very least, duplicate hierarchical accounting mechanisms which overlap with

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Anton Vorontsov
On Tue, Jan 08, 2013 at 05:49:49PM +0900, Minchan Kim wrote: [...] Sorry still I didn't look at your implementation about cgroup part. but I had a question since long time ago. How can we can make sure false positive about zone and NUMA? I mean DMA zone is short in system so VM notify to

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Tejun Heo
Hello, Anton. On Wed, Jan 09, 2013 at 02:06:41PM -0800, Anton Vorontsov wrote: Yeah. I started answering your comments about hierarchical accounting, looked into the memcg code, and realized that *this* is where I need the memcg stuff. :) Yay, I wasn't completely clueless. Thus yes, I guess

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-09 Thread Glauber Costa
On 01/10/2013 02:06 AM, Anton Vorontsov wrote: On Wed, Jan 09, 2013 at 01:55:14PM -0800, Tejun Heo wrote: [...] We can use mempressure w/o memcg, and even then it can (or should :) be useful (for cpuset, for example). The problem is that you end with, at the very least, duplicate

RE: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread leonid.moiseichuk
-Original Message- From: ext Anton Vorontsov [mailto:anton.voront...@linaro.org] Sent: 08 January, 2013 08:30 ... > > +static const uint vmpressure_level_med = 60; > > +static const uint vmpressure_level_oom = 99; > > +static const uint vmpressure_level_oom_prio = 4; > > + .. Seems

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Andrew Morton
On Fri, 4 Jan 2013 00:29:11 -0800 Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for > pressure

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Minchan Kim
Hi Anton, On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Kamezawa Hiroyuki
(2013/01/08 16:29), Anton Vorontsov wrote: On Mon, Jan 07, 2013 at 05:51:46PM +0900, Kamezawa Hiroyuki wrote: [...] I'm just curious.. Thanks for taking a look! :) [...] +/* + * The window size is the number of scanned pages before we try to analyze + * the scanned/reclaimed ratio (or

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Kamezawa Hiroyuki
(2013/01/08 16:29), Anton Vorontsov wrote: On Mon, Jan 07, 2013 at 05:51:46PM +0900, Kamezawa Hiroyuki wrote: [...] I'm just curious.. Thanks for taking a look! :) [...] +/* + * The window size is the number of scanned pages before we try to analyze + * the scanned/reclaimed ratio (or

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Minchan Kim
Hi Anton, On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread Andrew Morton
On Fri, 4 Jan 2013 00:29:11 -0800 Anton Vorontsov anton.voront...@linaro.org wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed

RE: [PATCH 1/2] Add mempressure cgroup

2013-01-08 Thread leonid.moiseichuk
-Original Message- From: ext Anton Vorontsov [mailto:anton.voront...@linaro.org] Sent: 08 January, 2013 08:30 ... +static const uint vmpressure_level_med = 60; +static const uint vmpressure_level_oom = 99; +static const uint vmpressure_level_oom_prio = 4; + .. Seems

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-07 Thread Anton Vorontsov
On Mon, Jan 07, 2013 at 05:51:46PM +0900, Kamezawa Hiroyuki wrote: [...] > I'm just curious.. Thanks for taking a look! :) [...] > > +/* > > + * The window size is the number of scanned pages before we try to analyze > > + * the scanned/reclaimed ratio (or difference). > > + * > > + * It is used

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-07 Thread Kamezawa Hiroyuki
(2013/01/04 17:29), Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for > pressure index calculation.

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-07 Thread Kamezawa Hiroyuki
(2013/01/04 17:29), Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for pressure index calculation. But

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-07 Thread Anton Vorontsov
On Mon, Jan 07, 2013 at 05:51:46PM +0900, Kamezawa Hiroyuki wrote: [...] I'm just curious.. Thanks for taking a look! :) [...] +/* + * The window size is the number of scanned pages before we try to analyze + * the scanned/reclaimed ratio (or difference). + * + * It is used as a

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-04 Thread Kirill A. Shutemov
On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: > This commit implements David Rientjes' idea of mempressure cgroup. > > The main characteristics are the same to what I've tried to add to vmevent > API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for >

[PATCH 1/2] Add mempressure cgroup

2013-01-04 Thread Anton Vorontsov
This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for pressure index calculation. But we don't expose the index to the userland.

[PATCH 1/2] Add mempressure cgroup

2013-01-04 Thread Anton Vorontsov
This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for pressure index calculation. But we don't expose the index to the userland.

Re: [PATCH 1/2] Add mempressure cgroup

2013-01-04 Thread Kirill A. Shutemov
On Fri, Jan 04, 2013 at 12:29:11AM -0800, Anton Vorontsov wrote: This commit implements David Rientjes' idea of mempressure cgroup. The main characteristics are the same to what I've tried to add to vmevent API; internally, it uses Mel Gorman's idea of scanned/reclaimed ratio for pressure