Re: [PATCH 3/3] Provide control over unmapped pages (v5)

2011-03-30 Thread Andrew Morton
On Wed, 30 Mar 2011 11:02:38 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Changelog v4 1. Added documentation for max_unmapped_pages 2. Better #ifdef'ing of max_unmapped_pages and min_unmapped_pages Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain

Re: [PATCH 3/3] Provide control over unmapped pages (v5)

2011-03-30 Thread Balbir Singh
* Andrew Morton a...@linux-foundation.org [2011-03-30 16:35:45]: On Wed, 30 Mar 2011 11:02:38 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Changelog v4 1. Added documentation for max_unmapped_pages 2. Better #ifdef'ing of max_unmapped_pages and min_unmapped_pages Changelog

[PATCH 3/3] Provide control over unmapped pages (v5)

2011-03-29 Thread Balbir Singh
Changelog v4 1. Added documentation for max_unmapped_pages 2. Better #ifdef'ing of max_unmapped_pages and min_unmapped_pages Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt to explain them (General comment) 3.

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-02-16 Thread Minchan Kim
On Mon, Feb 14, 2011 at 2:33 AM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2011-02-10 14:41:44]: I don't know why the part of message is deleted only when I send you. Maybe it's gmail bug. I hope mail sending is successful in this turn. :) On Thu,

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-02-14 Thread Balbir Singh
* MinChan Kim minchan@gmail.com [2011-02-10 14:41:44]: I don't know why the part of message is deleted only when I send you. Maybe it's gmail bug. I hope mail sending is successful in this turn. :) On Thu, Feb 10, 2011 at 2:33 PM, Minchan Kim minchan@gmail.com wrote: Sorry for

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-02-09 Thread Minchan Kim
Sorry for late response. On Fri, Jan 28, 2011 at 8:18 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2011-01-28 16:24:19]: But the assumption for LRU order to change happens only if the page cannot be successfully freed, which means it is in some

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-02-09 Thread Minchan Kim
I don't know why the part of message is deleted only when I send you. Maybe it's gmail bug. I hope mail sending is successful in this turn. :) On Thu, Feb 10, 2011 at 2:33 PM, Minchan Kim minchan@gmail.com wrote: Sorry for late response. On Fri, Jan 28, 2011 at 8:18 PM, Balbir Singh

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-31 Thread Balbir Singh
* KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2011-01-31 08:58:53]: On Fri, 28 Jan 2011 09:20:02 -0600 (CST) Christoph Lameter c...@linux.com wrote: On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: I see it as a tradeoff of when to check? add_to_page_cache or when we are

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-30 Thread KAMEZAWA Hiroyuki
On Fri, 28 Jan 2011 09:20:02 -0600 (CST) Christoph Lameter c...@linux.com wrote: On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: I see it as a tradeoff of when to check? add_to_page_cache or when we are want more free memory (due to allocation). It is OK to wakeup kswapd while

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread KAMEZAWA Hiroyuki
On Fri, 28 Jan 2011 16:24:19 +0900 Minchan Kim minchan@gmail.com wrote: On Fri, Jan 28, 2011 at 3:48 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2011-01-28 14:44:50]: On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh bal...@linux.vnet.ibm.com

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2011-01-28 16:56:05]: On Fri, 28 Jan 2011 16:24:19 +0900 Minchan Kim minchan@gmail.com wrote: On Fri, Jan 28, 2011 at 3:48 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2011-01-28

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread KAMEZAWA Hiroyuki
On Fri, 28 Jan 2011 13:49:28 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2011-01-28 16:56:05]: BTW, it seems this doesn't work when some apps use huge shmem. How to handle the issue ? Could you elaborate further? == static

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* MinChan Kim minchan@gmail.com [2011-01-28 16:24:19]: But the assumption for LRU order to change happens only if the page cannot be successfully freed, which means it is in some way active.. and needs to be moved no? 1. holded page by someone 2. mapped pages 3. active pages 1

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2011-01-28 17:17:44]: On Fri, 28 Jan 2011 13:49:28 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2011-01-28 16:56:05]: BTW, it seems this doesn't work when some apps use huge

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Christoph Lameter
On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: I see it as a tradeoff of when to check? add_to_page_cache or when we are want more free memory (due to allocation). It is OK to wakeup kswapd while allocating memory, somehow for this purpose (global page cache), add_to_page_cache or

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-27 Thread Balbir Singh
On Thu, Jan 27, 2011 at 4:42 AM, Minchan Kim minchan@gmail.com wrote: [snip] index 7b56473..2ac8549 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1660,6 +1660,9 @@ zonelist_scan:                        unsigned long mark;                        int ret; +                      

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-27 Thread Minchan Kim
On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh bal...@linux.vnet.ibm.com wrote: On Thu, Jan 27, 2011 at 4:42 AM, Minchan Kim minchan@gmail.com wrote: [snip] index 7b56473..2ac8549 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1660,6 +1660,9 @@ zonelist_scan:                    

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-27 Thread Balbir Singh
* Christoph Lameter c...@linux.com [2011-01-26 10:57:37]: Reviewed-by: Christoph Lameter c...@linux.com Thanks for the review! -- Three Cheers, Balbir -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-27 Thread Balbir Singh
* MinChan Kim minchan@gmail.com [2011-01-28 14:44:50]: On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh bal...@linux.vnet.ibm.com wrote: On Thu, Jan 27, 2011 at 4:42 AM, Minchan Kim minchan@gmail.com wrote: [snip] index 7b56473..2ac8549 100644 --- a/mm/page_alloc.c +++

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-27 Thread Minchan Kim
On Fri, Jan 28, 2011 at 3:48 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2011-01-28 14:44:50]: On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh bal...@linux.vnet.ibm.com wrote: On Thu, Jan 27, 2011 at 4:42 AM, Minchan Kim minchan@gmail.com wrote:

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-26 Thread Minchan Kim
Hi Balbir, On Tue, Jan 25, 2011 at 2:10 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: Changelog v4 1. Add max_unmapped_ratio and use that as the upper limit to check when to shrink the unmapped page cache (Christoph Lameter) Changelog v2 1. Use a config option to enable the code

[PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-24 Thread Balbir Singh
Changelog v4 1. Add max_unmapped_ratio and use that as the upper limit to check when to shrink the unmapped page cache (Christoph Lameter) Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt to explain them

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-23 Thread Balbir Singh
* Christoph Lameter c...@linux.com [2011-01-21 09:55:17]: On Fri, 21 Jan 2011, Balbir Singh wrote: * Christoph Lameter c...@linux.com [2011-01-20 09:00:09]: On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-21 Thread Christoph Lameter
On Fri, 21 Jan 2011, Balbir Singh wrote: * Christoph Lameter c...@linux.com [2011-01-20 09:00:09]: On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if CONFIG_UNMAPPED_PAGECACHE_CONTROL + is enabled. It controls the

[REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-20 Thread Balbir Singh
Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt to explain them (General comment) 3. Hint uses of the boot parameter with unlikely (Andrew Morton) 4. Use better names (balanced is not a good naming convention)

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-20 Thread Christoph Lameter
On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if CONFIG_UNMAPPED_PAGECACHE_CONTROL + is enabled. It controls the amount of unmapped memory + that is present in the system. This boot option

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-20 Thread Balbir Singh
* Christoph Lameter c...@linux.com [2011-01-20 09:00:09]: On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if CONFIG_UNMAPPED_PAGECACHE_CONTROL + is enabled. It controls the amount of unmapped memory +

Re: [PATCH 3/3] Provide control over unmapped pages (v2)

2010-12-23 Thread Balbir Singh
* MinChan Kim minchan@gmail.com [2010-12-14 20:02:45]: +                       if (should_reclaim_unmapped_pages(zone)) +                               wakeup_kswapd(zone, order); I think we can put the logic into zone_watermark_okay. I did some checks and zone_watermark_ok is used

[PATCH 3/3] Provide control over unmapped pages (v3)

2010-12-23 Thread Balbir Singh
Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt to explain them (General comment) 3. Hint uses of the boot parameter with unlikely (Andrew Morton) 4. Use better names (balanced is not a good naming convention)

Re: [PATCH 3/3] Provide control over unmapped pages (v2)

2010-12-23 Thread Minchan Kim
On Thu, Dec 23, 2010 at 5:33 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * MinChan Kim minchan@gmail.com [2010-12-14 20:02:45]: +                       if (should_reclaim_unmapped_pages(zone)) +                               wakeup_kswapd(zone, order); I think we can put the

Re: [PATCH 3/3] Provide control over unmapped pages (v2)

2010-12-14 Thread Minchan Kim
On Fri, Dec 10, 2010 at 11:32 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt   to explain them (General comment) 3. Hint uses of the boot parameter with

[PATCH 3/3] Provide control over unmapped pages (v2)

2010-12-10 Thread Balbir Singh
Changelog v2 1. Use a config option to enable the code (Andrew Morton) 2. Explain the magic tunables in the code or at-least attempt to explain them (General comment) 3. Hint uses of the boot parameter with unlikely (Andrew Morton) 4. Use better names (balanced is not a good naming convention)

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-04 Thread Balbir Singh
* KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2010-12-02 11:50:36]: On Thu, 2 Dec 2010 10:22:16 +0900 (JST) KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com wrote: On Tue, 30 Nov 2010, Andrew Morton wrote: +#define UNMAPPED_PAGE_RATIO 16 Well. Giving 16 a name didn't

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-01 Thread Minchan Kim
On Wed, Dec 1, 2010 at 2:22 PM, Balbir Singh bal...@linux.vnet.ibm.com wrote: * Balbir Singh bal...@linux.vnet.ibm.com [2010-12-01 10:24:21]: * Andrew Morton a...@linux-foundation.org [2010-11-30 14:25:09]: So you're OK with shoving all this flotsam into 100,000,000 cellphones? This was a

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-01 Thread Christoph Lameter
On Tue, 30 Nov 2010, Andrew Morton wrote: +#define UNMAPPED_PAGE_RATIO 16 Well. Giving 16 a name didn't really clarify anything. Attentive readers will want to know what this does, why 16 was chosen and what the effects of changing it will be. The meaning is analoguous to the other zone

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-01 Thread KOSAKI Motohiro
On Tue, 30 Nov 2010, Andrew Morton wrote: +#define UNMAPPED_PAGE_RATIO 16 Well. Giving 16 a name didn't really clarify anything. Attentive readers will want to know what this does, why 16 was chosen and what the effects of changing it will be. The meaning is analoguous to the

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-01 Thread KAMEZAWA Hiroyuki
On Thu, 2 Dec 2010 10:22:16 +0900 (JST) KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com wrote: On Tue, 30 Nov 2010, Andrew Morton wrote: +#define UNMAPPED_PAGE_RATIO 16 Well. Giving 16 a name didn't really clarify anything. Attentive readers will want to know what this does,

[PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread Balbir Singh
Provide control using zone_reclaim() and a boot parameter. The code reuses functionality from zone_reclaim() to isolate unmapped pages and reclaim them as a priority, ahead of other mapped pages. Signed-off-by: Balbir Singh bal...@linux.vnet.ibm.com --- include/linux/swap.h |5 ++-

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread Andrew Morton
On Tue, 30 Nov 2010 15:46:31 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Provide control using zone_reclaim() and a boot parameter. The code reuses functionality from zone_reclaim() to isolate unmapped pages and reclaim them as a priority, ahead of other mapped pages. Signed-off-by:

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread KAMEZAWA Hiroyuki
On Tue, 30 Nov 2010 15:46:31 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Provide control using zone_reclaim() and a boot parameter. The code reuses functionality from zone_reclaim() to isolate unmapped pages and reclaim them as a priority, ahead of other mapped pages. Signed-off-by:

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread Balbir Singh
* Balbir Singh bal...@linux.vnet.ibm.com [2010-12-01 10:24:21]: * Andrew Morton a...@linux-foundation.org [2010-11-30 14:25:09]: On Tue, 30 Nov 2010 15:46:31 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Provide control using zone_reclaim() and a boot parameter. The code

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread Balbir Singh
* Balbir Singh bal...@linux.vnet.ibm.com [2010-12-01 10:46:32]: * KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com [2010-12-01 09:14:13]: Provide control using zone_reclaim() and a boot parameter. The code reuses functionality from zone_reclaim() to isolate unmapped pages and reclaim

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread Balbir Singh
* Balbir Singh bal...@linux.vnet.ibm.com [2010-12-01 10:48:16]: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2010-12-01 10:32:54]: On Tue, 30 Nov 2010 15:46:31 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: Provide control using zone_reclaim() and a boot parameter. The

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread KAMEZAWA Hiroyuki
On Wed, 1 Dec 2010 10:52:59 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: * Balbir Singh bal...@linux.vnet.ibm.com [2010-12-01 10:48:16]: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2010-12-01 10:32:54]: On Tue, 30 Nov 2010 15:46:31 +0530 Balbir Singh

Re: [PATCH 3/3] Provide control over unmapped pages

2010-11-30 Thread KAMEZAWA Hiroyuki
On Wed, 1 Dec 2010 12:10:43 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: That's a point. Then, why the guest has to do _extra_ work for host even when the host says nothing ? I think trigger this by guests themselves is not very good. I've mentioned it before, the guest