Re: [PATCH] swap: redirty page if page write fails on swap file

2013-05-01 Thread Simon Jeons
Ping, ;-) On 04/18/2013 08:13 AM, Simon Jeons wrote: Hi Jerome, On 04/17/2013 08:11 PM, Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and is therefore handled afterwards as if it has been

Re: [PATCH] swap: redirty page if page write fails on swap file

2013-05-01 Thread Simon Jeons
Ping, ;-) On 04/18/2013 08:13 AM, Simon Jeons wrote: Hi Jerome, On 04/17/2013 08:11 PM, Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and is therefore handled afterwards as if it has been

Re: [PATCH 1/2] Make the batch size of the percpu_counter configurable

2013-04-30 Thread Simon Jeons
Hi Tim, On 04/30/2013 01:12 AM, Tim Chen wrote: Currently, there is a single, global, variable (percpu_counter_batch) that controls the batch sizes for every 'struct percpu_counter' on the system. However, there are some applications, e.g. memory accounting where it is more appropriate to scale

Re: [PATCH 1/2] Make the batch size of the percpu_counter configurable

2013-04-30 Thread Simon Jeons
Hi Tim, On 04/30/2013 01:12 AM, Tim Chen wrote: Currently, there is a single, global, variable (percpu_counter_batch) that controls the batch sizes for every 'struct percpu_counter' on the system. However, there are some applications, e.g. memory accounting where it is more appropriate to scale

Re: [PATCH] mm: cond_resched in tlb_flush_mmu to fix soft lockups on !CONFIG_PREEMPT

2013-04-27 Thread Simon Jeons
Hi Michal, On 12/19/2012 12:11 AM, Michal Hocko wrote: Since e303297 (mm: extended batches for generic mmu_gather) we are batching pages to be freed until either tlb_next_batch cannot allocate a new batch or we are done. Is there material introduce mmu_gather? This works just fine most of

Re: [PATCH] mm: cond_resched in tlb_flush_mmu to fix soft lockups on !CONFIG_PREEMPT

2013-04-27 Thread Simon Jeons
Hi Michal, On 12/19/2012 12:11 AM, Michal Hocko wrote: Since e303297 (mm: extended batches for generic mmu_gather) we are batching pages to be freed until either tlb_next_batch cannot allocate a new batch or we are done. Is there material introduce mmu_gather? This works just fine most of

Re: [PATCH 0/10] Reduce system disruption due to kswapd V2

2013-04-22 Thread Simon Jeons
Hi Zlatko, On 04/22/2013 02:54 PM, Zlatko Calusic wrote: On 22.04.2013 08:43, Simon Jeons wrote: Hi Zlatko, On 04/22/2013 02:37 PM, Zlatko Calusic wrote: On 12.04.2013 22:07, Zlatko Calusic wrote: On 12.04.2013 21:40, Mel Gorman wrote: On Thu, Apr 11, 2013 at 10:55:13PM +0200, Zlatko Calusic

Re: [PATCH 0/10] Reduce system disruption due to kswapd V2

2013-04-22 Thread Simon Jeons
Hi Zlatko, On 04/22/2013 02:37 PM, Zlatko Calusic wrote: On 12.04.2013 22:07, Zlatko Calusic wrote: On 12.04.2013 21:40, Mel Gorman wrote: On Thu, Apr 11, 2013 at 10:55:13PM +0200, Zlatko Calusic wrote: On 09.04.2013 13:06, Mel Gorman wrote: - The only slightly negative thing I observed is

Re: [PATCH 0/10] Reduce system disruption due to kswapd V2

2013-04-22 Thread Simon Jeons
Hi Zlatko, On 04/22/2013 02:37 PM, Zlatko Calusic wrote: On 12.04.2013 22:07, Zlatko Calusic wrote: On 12.04.2013 21:40, Mel Gorman wrote: On Thu, Apr 11, 2013 at 10:55:13PM +0200, Zlatko Calusic wrote: On 09.04.2013 13:06, Mel Gorman wrote: SNIP - The only slightly negative thing I observed

Re: [PATCH 0/10] Reduce system disruption due to kswapd V2

2013-04-22 Thread Simon Jeons
Hi Zlatko, On 04/22/2013 02:54 PM, Zlatko Calusic wrote: On 22.04.2013 08:43, Simon Jeons wrote: Hi Zlatko, On 04/22/2013 02:37 PM, Zlatko Calusic wrote: On 12.04.2013 22:07, Zlatko Calusic wrote: On 12.04.2013 21:40, Mel Gorman wrote: On Thu, Apr 11, 2013 at 10:55:13PM +0200, Zlatko Calusic

Re: [RFC PATCH v2 00/15][Sorted-buddy] mm: Memory Power Management

2013-04-18 Thread Simon Jeons
Hi Srivatsa, On 04/10/2013 05:45 AM, Srivatsa S. Bhat wrote: [I know, this cover letter is a little too long, but I wanted to clearly explain the overall goals and the high-level design of this patchset in detail. I hope this helps more than it annoys, and makes it easier for reviewers to relate

Re: [RFC PATCH v2 00/15][Sorted-buddy] mm: Memory Power Management

2013-04-18 Thread Simon Jeons
Hi Srivatsa, On 04/10/2013 05:45 AM, Srivatsa S. Bhat wrote: [I know, this cover letter is a little too long, but I wanted to clearly explain the overall goals and the high-level design of this patchset in detail. I hope this helps more than it annoys, and makes it easier for reviewers to relate

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/17/2013 10:55 PM, Naoya Horiguchi wrote: > On Wed, Apr 17, 2013 at 03:14:36PM +0800, Simon Jeons wrote: >> Hi Naoya, >> On 04/11/2013 03:11 PM, Naoya Horiguchi wrote: >>> Hi Tanino-san, >>> >>> On Thu, Apr 11, 2013 at 12:26:19PM +0900, Mit

Re: [PATCH] swap: redirty page if page write fails on swap file

2013-04-17 Thread Simon Jeons
Hi Jerome, On 04/17/2013 08:11 PM, Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and is therefore handled afterwards as if it has been successfully written to the swap file, leading to memory

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-17 Thread Simon Jeons
Hi Robin, On 04/16/2013 05:31 PM, Robin Holt wrote: On Tue, Apr 16, 2013 at 02:39:49PM +0800, Xiao Guangrong wrote: The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple ->release()) breaks the fix: 3ad3d901bbcfb15a5e4690e55350db0899095a68 (mm: mmu_notifier:

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/11/2013 03:11 PM, Naoya Horiguchi wrote: > Hi Tanino-san, > > On Thu, Apr 11, 2013 at 12:26:19PM +0900, Mitsuhiro Tanino wrote: > ... >> Solution >> - >> The patch proposes a new sysctl interface, vm.memory_failure_dirty_panic, >> in order to prevent data corruption comes

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/11/2013 11:23 PM, Naoya Horiguchi wrote: > On Thu, Apr 11, 2013 at 03:49:16PM +0200, Andi Kleen wrote: >>> As a result, if the dirty cache includes user data, the data is lost, >>> and data corruption occurs if an application uses old data. >> The application cannot use old data,

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/11/2013 11:23 PM, Naoya Horiguchi wrote: On Thu, Apr 11, 2013 at 03:49:16PM +0200, Andi Kleen wrote: As a result, if the dirty cache includes user data, the data is lost, and data corruption occurs if an application uses old data. The application cannot use old data, the kernel

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/11/2013 03:11 PM, Naoya Horiguchi wrote: Hi Tanino-san, On Thu, Apr 11, 2013 at 12:26:19PM +0900, Mitsuhiro Tanino wrote: ... Solution - The patch proposes a new sysctl interface, vm.memory_failure_dirty_panic, in order to prevent data corruption comes from data

Re: [PATCH] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU

2013-04-17 Thread Simon Jeons
Hi Robin, On 04/16/2013 05:31 PM, Robin Holt wrote: On Tue, Apr 16, 2013 at 02:39:49PM +0800, Xiao Guangrong wrote: The commit 751efd8610d3 (mmu_notifier_unregister NULL Pointer deref and multiple -release()) breaks the fix: 3ad3d901bbcfb15a5e4690e55350db0899095a68 (mm: mmu_notifier:

Re: [PATCH] swap: redirty page if page write fails on swap file

2013-04-17 Thread Simon Jeons
Hi Jerome, On 04/17/2013 08:11 PM, Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and is therefore handled afterwards as if it has been successfully written to the swap file, leading to memory

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-17 Thread Simon Jeons
Hi Naoya, On 04/17/2013 10:55 PM, Naoya Horiguchi wrote: On Wed, Apr 17, 2013 at 03:14:36PM +0800, Simon Jeons wrote: Hi Naoya, On 04/11/2013 03:11 PM, Naoya Horiguchi wrote: Hi Tanino-san, On Thu, Apr 11, 2013 at 12:26:19PM +0900, Mitsuhiro Tanino wrote: ... Solution - The patch

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-16 Thread Simon Jeons
Hi Mitsuhiro, On 04/12/2013 09:43 PM, Mitsuhiro Tanino wrote: (2013/04/11 22:00), Ric Mason wrote: Hi Mitsuhiro, On 04/11/2013 08:51 PM, Mitsuhiro Tanino wrote: (2013/04/11 12:53), Simon Jeons wrote: One question against mce instead of the patchset. ;-) When check memory is bad? Before

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-16 Thread Simon Jeons
On 04/11/2013 09:49 PM, Andi Kleen wrote: As a result, if the dirty cache includes user data, the data is lost, and data corruption occurs if an application uses old data. Hi Andi, Could you give me the link of your mce testcase? The application cannot use old data, the kernel code kills it

Re: [BUG][s390x] mm: system crashed

2013-04-16 Thread Simon Jeons
Hi Heiko, On 04/16/2013 03:50 PM, Heiko Carstens wrote: On Mon, Apr 15, 2013 at 02:16:55PM +0800, Zhouping Liu wrote: On 04/15/2013 01:56 PM, Heiko Carstens wrote: On Sun, Apr 14, 2013 at 11:28:40PM -0400, Zhouping Liu wrote: � 16109.346170¨ Call Trace: � 16109.346179¨ (� <00100920>¨

Re: [BUG][s390x] mm: system crashed

2013-04-16 Thread Simon Jeons
Hi Heiko, On 04/16/2013 03:50 PM, Heiko Carstens wrote: On Mon, Apr 15, 2013 at 02:16:55PM +0800, Zhouping Liu wrote: On 04/15/2013 01:56 PM, Heiko Carstens wrote: On Sun, Apr 14, 2013 at 11:28:40PM -0400, Zhouping Liu wrote: � 16109.346170¨ Call Trace: � 16109.346179¨ (� 00100920¨

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-16 Thread Simon Jeons
On 04/11/2013 09:49 PM, Andi Kleen wrote: As a result, if the dirty cache includes user data, the data is lost, and data corruption occurs if an application uses old data. Hi Andi, Could you give me the link of your mce testcase? The application cannot use old data, the kernel code kills it

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-16 Thread Simon Jeons
Hi Mitsuhiro, On 04/12/2013 09:43 PM, Mitsuhiro Tanino wrote: (2013/04/11 22:00), Ric Mason wrote: Hi Mitsuhiro, On 04/11/2013 08:51 PM, Mitsuhiro Tanino wrote: (2013/04/11 12:53), Simon Jeons wrote: One question against mce instead of the patchset. ;-) When check memory is bad? Before

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-10 Thread Simon Jeons
Hi Mitsuhiro, On 04/11/2013 11:26 AM, Mitsuhiro Tanino wrote: Hi All, Please find a patch set that introduces these new sysctl interfaces, to handle a case when an memory error is detected on dirty page cache. - vm.memory_failure_dirty_panic - vm.memory_failure_print_ratelimit -

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-10 Thread Simon Jeons
Hi Christoph, On 04/10/2013 09:54 PM, Christoph Lameter wrote: On Wed, 10 Apr 2013, Simon Jeons wrote: It seems that you misunderstand my question. I don't doubt slab/slub can use high order pages. However, what I focus on is why slab/slub can use compound page, PageCompound() just on behalf

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-10 Thread Simon Jeons
Hi H.Peter, On 04/11/2013 10:48 AM, H. Peter Anvin wrote: On 04/10/2013 07:40 PM, Simon Jeons wrote: Hi H.Peter, On 04/04/2013 09:13 AM, H. Peter Anvin wrote: On 04/03/2013 06:11 PM, Simon Jeons wrote: Why we consider boot_cpu_data.x86_phys_bits instead of e820 map here? Because

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-10 Thread Simon Jeons
Hi H.Peter, On 04/04/2013 09:13 AM, H. Peter Anvin wrote: On 04/03/2013 06:11 PM, Simon Jeons wrote: Why we consider boot_cpu_data.x86_phys_bits instead of e820 map here? Because x86_phys_bits is what controls how much address space the processor has. e820 tells us how much *RAM* the machine

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-10 Thread Simon Jeons
Hi H.Peter, On 04/04/2013 09:13 AM, H. Peter Anvin wrote: On 04/03/2013 06:11 PM, Simon Jeons wrote: Why we consider boot_cpu_data.x86_phys_bits instead of e820 map here? Because x86_phys_bits is what controls how much address space the processor has. e820 tells us how much *RAM* the machine

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-10 Thread Simon Jeons
Hi H.Peter, On 04/11/2013 10:48 AM, H. Peter Anvin wrote: On 04/10/2013 07:40 PM, Simon Jeons wrote: Hi H.Peter, On 04/04/2013 09:13 AM, H. Peter Anvin wrote: On 04/03/2013 06:11 PM, Simon Jeons wrote: Why we consider boot_cpu_data.x86_phys_bits instead of e820 map here? Because

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-10 Thread Simon Jeons
Hi Christoph, On 04/10/2013 09:54 PM, Christoph Lameter wrote: On Wed, 10 Apr 2013, Simon Jeons wrote: It seems that you misunderstand my question. I don't doubt slab/slub can use high order pages. However, what I focus on is why slab/slub can use compound page, PageCompound() just on behalf

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-10 Thread Simon Jeons
Hi Mitsuhiro, On 04/11/2013 11:26 AM, Mitsuhiro Tanino wrote: Hi All, Please find a patch set that introduces these new sysctl interfaces, to handle a case when an memory error is detected on dirty page cache. - vm.memory_failure_dirty_panic - vm.memory_failure_print_ratelimit -

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-09 Thread Simon Jeons
Hi Christoph, On 04/09/2013 10:32 PM, Christoph Lameter wrote: On Tue, 9 Apr 2013, Simon Jeons wrote: + int pages = 1 << compound_order(page); One question irrelevant this patch. Why slab cache can use compound page(hugetlbfs pages/thp pages)? They are just used by app to optimi

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Simon Jeons
On 04/10/2013 08:11 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 6:05 PM, Simon Jeons wrote: Hi Andrew, On 04/10/2013 07:56 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton wrote: On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker wrote: Should I add

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Simon Jeons
Hi Andrew, On 04/10/2013 07:56 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton wrote: On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker wrote: Should I add the memory notifier code to mm/nommu.c too? I'm guessing that if a system doesn't have an mmu that it also

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-09 Thread Simon Jeons
Hi Michal, On 04/09/2013 06:14 PM, Michal Hocko wrote: On Tue 09-04-13 18:05:30, Simon Jeons wrote: [...] I try this in v3.9-rc5: dd if=/dev/sda of=/dev/null bs=1MB 14813+0 records in 14812+0 records out 1481200 bytes (15 GB) copied, 105.988 s, 140 MB/s free -m -s 1

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-09 Thread Simon Jeons
Hi Michal, On 04/05/2013 02:31 PM, Simon Jeons wrote: Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 09:21 AM, Joonsoo Kim wrote: Currently, freed pages via rcu is not counted for reclaimed_slab, because it is freed in rcu context, not current task context. But, this free is initiated by this task, so counting this into this task's reclaimed_slab is meaningful to

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 02:53 PM, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 02:53 PM, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 09:21 AM, Joonsoo Kim wrote: Currently, freed pages via rcu is not counted for reclaimed_slab, because it is freed in rcu context, not current task context. But, this free is initiated by this task, so counting this into this task's reclaimed_slab is meaningful to

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-09 Thread Simon Jeons
Hi Michal, On 04/05/2013 02:31 PM, Simon Jeons wrote: Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-09 Thread Simon Jeons
Hi Michal, On 04/09/2013 06:14 PM, Michal Hocko wrote: On Tue 09-04-13 18:05:30, Simon Jeons wrote: [...] I try this in v3.9-rc5: dd if=/dev/sda of=/dev/null bs=1MB 14813+0 records in 14812+0 records out 1481200 bytes (15 GB) copied, 105.988 s, 140 MB/s free -m -s 1

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Simon Jeons
Hi Andrew, On 04/10/2013 07:56 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker ags...@gmail.com wrote: Should I add the memory notifier code to mm/nommu.c too? I'm guessing that if a

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Simon Jeons
On 04/10/2013 08:11 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 6:05 PM, Simon Jeons simon.je...@gmail.com wrote: Hi Andrew, On 04/10/2013 07:56 AM, Andrew Shewmaker wrote: On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 8 Apr 2013 17:00:40 -0400

Re: [PATCH 2/3] mm, slub: count freed pages via rcu as this task's reclaimed_slab

2013-04-09 Thread Simon Jeons
Hi Christoph, On 04/09/2013 10:32 PM, Christoph Lameter wrote: On Tue, 9 Apr 2013, Simon Jeons wrote: + int pages = 1 compound_order(page); One question irrelevant this patch. Why slab cache can use compound page(hugetlbfs pages/thp pages)? They are just used by app to optimize tlb

Re: [PATCH 1/3] mm/page_alloc: factor out setting of pcp->high and pcp->batch.

2013-04-08 Thread Simon Jeons
Hi Cody, On 04/09/2013 01:39 AM, Cody P Schafer wrote: On 04/06/2013 06:37 PM, Simon Jeons wrote: Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: Creates pageset_set_batch() for use in setup_pageset(). pageset_set_batch() imitates the functionality of setup_pagelist_highmark(), but uses

Re: [PATCH 1/3] mm/page_alloc: factor out setting of pcp-high and pcp-batch.

2013-04-08 Thread Simon Jeons
Hi Cody, On 04/09/2013 01:39 AM, Cody P Schafer wrote: On 04/06/2013 06:37 PM, Simon Jeons wrote: Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: Creates pageset_set_batch() for use in setup_pageset(). pageset_set_batch() imitates the functionality of setup_pagelist_highmark(), but uses

Re: [RFC] mm: remove swapcache page early

2013-04-07 Thread Simon Jeons
On 04/08/2013 09:48 AM, Minchan Kim wrote: Hello Simon, On Sun, Apr 07, 2013 at 03:26:12PM +0800, Simon Jeons wrote: Ping Minchan. On 04/02/2013 09:40 PM, Simon Jeons wrote: Hi Hugh, On 03/28/2013 05:41 AM, Hugh Dickins wrote: On Wed, 27 Mar 2013, Minchan Kim wrote: Swap subsystem does

Re: [RFC] mm: remove swapcache page early

2013-04-07 Thread Simon Jeons
Ping Minchan. On 04/02/2013 09:40 PM, Simon Jeons wrote: Hi Hugh, On 03/28/2013 05:41 AM, Hugh Dickins wrote: On Wed, 27 Mar 2013, Minchan Kim wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can't avoid unnecessary write

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-07 Thread Simon Jeons
Ping! On 04/05/2013 02:31 PM, Simon Jeons wrote: Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim was enabled

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-07 Thread Simon Jeons
Ping! On 04/05/2013 02:31 PM, Simon Jeons wrote: Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim was enabled

Re: [RFC] mm: remove swapcache page early

2013-04-07 Thread Simon Jeons
Ping Minchan. On 04/02/2013 09:40 PM, Simon Jeons wrote: Hi Hugh, On 03/28/2013 05:41 AM, Hugh Dickins wrote: On Wed, 27 Mar 2013, Minchan Kim wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can't avoid unnecessary write

Re: [RFC] mm: remove swapcache page early

2013-04-07 Thread Simon Jeons
On 04/08/2013 09:48 AM, Minchan Kim wrote: Hello Simon, On Sun, Apr 07, 2013 at 03:26:12PM +0800, Simon Jeons wrote: Ping Minchan. On 04/02/2013 09:40 PM, Simon Jeons wrote: Hi Hugh, On 03/28/2013 05:41 AM, Hugh Dickins wrote: On Wed, 27 Mar 2013, Minchan Kim wrote: Swap subsystem does

Re: [PATCH 3/3] mm: when handling percpu_pagelist_fraction, use on_each_cpu() to set percpu pageset fields.

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: In free_hot_cold_page(), we rely on pcp->batch remaining stable. Updating it without being on the cpu owning the percpu pageset potentially destroys this stability. If cpu is off, can its pcp pageset be used in free_hot_code_page()?

Re: [PATCH 1/3] mm/page_alloc: factor out setting of pcp->high and pcp->batch.

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: Creates pageset_set_batch() for use in setup_pageset(). pageset_set_batch() imitates the functionality of setup_pagelist_highmark(), but uses the boot time (percpu_pagelist_fraction == 0) calculations for determining ->high Why need adjust

Re: [PATCH v4, part3 00/15] accurately calculate memory statisitic information

2013-04-06 Thread Simon Jeons
Hi Jiang, On 04/06/2013 09:54 PM, Jiang Liu wrote: The original goal of this patchset is to fix the bug reported by https://bugzilla.kernel.org/show_bug.cgi?id=53501 Now it has also been expanded to reduce common code used by memory initializion. This is the third part, previous two patch sets

Re: [PATCH 0/3] mm: fixup changers of per cpu pageset's ->high and ->batch

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: In one case while modifying the ->high and ->batch fields of per cpu pagesets we're unneededly using stop_machine() (patches 1 & 2), and in another we don't have any syncronization at all (patch 3). Do you mean stop_machine() is used for

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-06 Thread Simon Jeons
Hi Andrew, On 04/05/2013 11:02 PM, Andrew Shewmaker wrote: On Wed, Apr 3, 2013 at 9:50 PM, Simon Jeons wrote: FAQ ... * How do you calculate a minimum useful reserve? A user or the admin needs enough memory to login and perform recovery operations, which includes, at a minimum

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-06 Thread Simon Jeons
Hi Michal, On 04/05/2013 05:30 PM, Michal Hocko wrote: On Fri 05-04-13 17:00:58, Simon Jeons wrote: Hi Michal, On 04/05/2013 04:08 PM, Michal Hocko wrote: On Fri 05-04-13 09:14:58, Simon Jeons wrote: Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-06 Thread Simon Jeons
Hi Michal, On 04/05/2013 05:30 PM, Michal Hocko wrote: On Fri 05-04-13 17:00:58, Simon Jeons wrote: Hi Michal, On 04/05/2013 04:08 PM, Michal Hocko wrote: On Fri 05-04-13 09:14:58, Simon Jeons wrote: Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-06 Thread Simon Jeons
Hi Andrew, On 04/05/2013 11:02 PM, Andrew Shewmaker wrote: On Wed, Apr 3, 2013 at 9:50 PM, Simon Jeons simon.je...@gmail.com wrote: FAQ ... * How do you calculate a minimum useful reserve? A user or the admin needs enough memory to login and perform recovery operations, which

Re: [PATCH 0/3] mm: fixup changers of per cpu pageset's -high and -batch

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: In one case while modifying the -high and -batch fields of per cpu pagesets we're unneededly using stop_machine() (patches 1 2), and in another we don't have any syncronization at all (patch 3). Do you mean stop_machine() is used for

Re: [PATCH v4, part3 00/15] accurately calculate memory statisitic information

2013-04-06 Thread Simon Jeons
Hi Jiang, On 04/06/2013 09:54 PM, Jiang Liu wrote: The original goal of this patchset is to fix the bug reported by https://bugzilla.kernel.org/show_bug.cgi?id=53501 Now it has also been expanded to reduce common code used by memory initializion. This is the third part, previous two patch sets

Re: [PATCH 1/3] mm/page_alloc: factor out setting of pcp-high and pcp-batch.

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: Creates pageset_set_batch() for use in setup_pageset(). pageset_set_batch() imitates the functionality of setup_pagelist_highmark(), but uses the boot time (percpu_pagelist_fraction == 0) calculations for determining -high Why need adjust

Re: [PATCH 3/3] mm: when handling percpu_pagelist_fraction, use on_each_cpu() to set percpu pageset fields.

2013-04-06 Thread Simon Jeons
Hi Cody, On 04/06/2013 04:33 AM, Cody P Schafer wrote: In free_hot_cold_page(), we rely on pcp-batch remaining stable. Updating it without being on the cpu owning the percpu pageset potentially destroys this stability. If cpu is off, can its pcp pageset be used in free_hot_code_page()?

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-05 Thread Simon Jeons
Hi Michal, On 04/05/2013 04:08 PM, Michal Hocko wrote: On Fri 05-04-13 09:14:58, Simon Jeons wrote: Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13 07:46:32, Simon Jeons wrote: Hi Michal, On 03/21/2013 08:56 PM, Michal Hocko wrote: On Thu 21-03-13

Re: [PATCH 0/6] mm/hugetlb: gigantic hugetlb page pools shrink supporting

2013-04-05 Thread Simon Jeons
Hi Michal, On 04/05/2013 04:12 PM, Michal Hocko wrote: On Fri 05-04-13 07:41:23, Wanpeng Li wrote: On Thu, Apr 04, 2013 at 06:17:46PM +0200, Michal Hocko wrote: On Thu 04-04-13 17:09:08, Wanpeng Li wrote: order >= MAX_ORDER pages are only allocated at boot stage using the bootmem allocator

Re: [PATCHv2, RFC 20/30] ramfs: enable transparent huge page cache

2013-04-05 Thread Simon Jeons
Hi Minchan, On 04/03/2013 09:11 AM, Minchan Kim wrote: On Tue, Apr 02, 2013 at 03:15:23PM -0700, Hugh Dickins wrote: On Tue, 2 Apr 2013, Kirill A. Shutemov wrote: Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" ramfs is the most simple fs from page cache point of view. Let's start

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-05 Thread Simon Jeons
Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim was enabled but the same problem applies to the mainline

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-05 Thread Simon Jeons
Hi Michal, On 03/21/2013 04:19 PM, Michal Hocko wrote: On Thu 21-03-13 10:33:07, Simon Jeons wrote: Hi Mel, On 03/21/2013 02:19 AM, Mel Gorman wrote: The following problem was reported against a distribution kernel when zone_reclaim was enabled but the same problem applies to the mainline

Re: [PATCHv2, RFC 20/30] ramfs: enable transparent huge page cache

2013-04-05 Thread Simon Jeons
Hi Minchan, On 04/03/2013 09:11 AM, Minchan Kim wrote: On Tue, Apr 02, 2013 at 03:15:23PM -0700, Hugh Dickins wrote: On Tue, 2 Apr 2013, Kirill A. Shutemov wrote: Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com ramfs is the most simple fs from page cache

Re: [PATCH 0/6] mm/hugetlb: gigantic hugetlb page pools shrink supporting

2013-04-05 Thread Simon Jeons
Hi Michal, On 04/05/2013 04:12 PM, Michal Hocko wrote: On Fri 05-04-13 07:41:23, Wanpeng Li wrote: On Thu, Apr 04, 2013 at 06:17:46PM +0200, Michal Hocko wrote: On Thu 04-04-13 17:09:08, Wanpeng Li wrote: order = MAX_ORDER pages are only allocated at boot stage using the bootmem allocator

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-05 Thread Simon Jeons
Hi Michal, On 04/05/2013 04:08 PM, Michal Hocko wrote: On Fri 05-04-13 09:14:58, Simon Jeons wrote: Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13 07:46:32, Simon Jeons wrote: Hi Michal, On 03/21/2013 08:56 PM, Michal Hocko wrote: On Thu 21-03-13

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-04 Thread Simon Jeons
Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13 07:46:32, Simon Jeons wrote: Hi Michal, On 03/21/2013 08:56 PM, Michal Hocko wrote: On Thu 21-03-13 07:49:48, Simon Jeons wrote: [...] When I hacking arch/x86/mm/hugetlbpage.c like this, diff --git

Re: [PATCH, RFC 00/16] Transparent huge page cache

2013-04-04 Thread Simon Jeons
Hi Hugh, On 01/31/2013 10:12 AM, Hugh Dickins wrote: On Tue, 29 Jan 2013, Kirill A. Shutemov wrote: Hugh Dickins wrote: On Mon, 28 Jan 2013, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Here's first steps towards huge pages in page cache. The intend of the work is get code ready to

Re: [PATCH, RFC 00/16] Transparent huge page cache

2013-04-04 Thread Simon Jeons
Hi Hugh, On 01/31/2013 10:12 AM, Hugh Dickins wrote: On Tue, 29 Jan 2013, Kirill A. Shutemov wrote: Hugh Dickins wrote: On Mon, 28 Jan 2013, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Here's first steps towards huge pages in page cache. The intend of the work is get code ready to

Re: [PATCH, RFC 00/16] Transparent huge page cache

2013-04-04 Thread Simon Jeons
Hi Hugh, On 01/31/2013 10:12 AM, Hugh Dickins wrote: On Tue, 29 Jan 2013, Kirill A. Shutemov wrote: Hugh Dickins wrote: On Mon, 28 Jan 2013, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com Here's first steps towards huge pages in page cache. The intend of

Re: [PATCH, RFC 00/16] Transparent huge page cache

2013-04-04 Thread Simon Jeons
Hi Hugh, On 01/31/2013 10:12 AM, Hugh Dickins wrote: On Tue, 29 Jan 2013, Kirill A. Shutemov wrote: Hugh Dickins wrote: On Mon, 28 Jan 2013, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com Here's first steps towards huge pages in page cache. The intend of

Re: [RFC][PATCH 0/9] extend hugepage migration

2013-04-04 Thread Simon Jeons
Hi Michal, On 03/22/2013 04:15 PM, Michal Hocko wrote: [getting off-list] On Fri 22-03-13 07:46:32, Simon Jeons wrote: Hi Michal, On 03/21/2013 08:56 PM, Michal Hocko wrote: On Thu 21-03-13 07:49:48, Simon Jeons wrote: [...] When I hacking arch/x86/mm/hugetlbpage.c like this, diff --git

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
Hi H.Peter, On 04/04/2013 09:32 AM, H. Peter Anvin wrote: On 04/03/2013 06:17 PM, Simon Jeons wrote: e820 also contain mmio, correct? No. How to check which address is used by mmio? /proc/iomem, correct? So cpu should not access address beyond e820 map(RAM+MMIO). No. -hpa

Re: [PATCH 1/9] migrate: add migrate_entry_wait_huge()

2013-04-03 Thread Simon Jeons
Ping! On 03/21/2013 07:36 AM, Simon Jeons wrote: > Hi Naoya, > On 03/21/2013 05:53 AM, Naoya Horiguchi wrote: >> On Wed, Mar 20, 2013 at 07:57:32AM +0800, Simon Jeons wrote: >>> Hi Naoya, >>> On 02/22/2013 03:41 AM, Naoya Horiguchi wrote: >>>> When

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-03 Thread Simon Jeons
umes 4kb pages * Code duplicated for nommu v4 discussion: * "Please add changelog, otherwise it's for other guys to review." -Simon Jeons Sorry, I'll be sure to include one in the future. And it looks like I do need a v5 ... I think this needs to be tunable like th

Re: [PATCH] THP: Use explicit memory barrier

2013-04-03 Thread Simon Jeons
Hi Minchan, On 04/01/2013 07:45 AM, Minchan Kim wrote: __do_huge_pmd_anonymous_page depends on page_add_new_anon_rmap's spinlock for making sure that clear_huge_page write become visible after set set_pmd_at() write. 1. There are no pte modify, why take page_table_lock here? 2. What's the

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
On 04/04/2013 10:14 AM, H. Peter Anvin wrote: Because git didn't exist before then? Oh, I see, thanks! :-) Simon Jeons wrote: On 04/04/2013 09:32 AM, H. Peter Anvin wrote: On 04/03/2013 06:17 PM, Simon Jeons wrote: e820 also contain mmio, correct? No. So cpu should not access

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
On 04/04/2013 09:32 AM, H. Peter Anvin wrote: On 04/03/2013 06:17 PM, Simon Jeons wrote: e820 also contain mmio, correct? No. So cpu should not access address beyond e820 map(RAM+MMIO). No. -hpa One offline question, why can't check git log before 2005? -- To unsubscribe from

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
Hi H.Peter, On 04/04/2013 09:13 AM, H. Peter Anvin wrote: On 04/03/2013 06:11 PM, Simon Jeons wrote: Why we consider boot_cpu_data.x86_phys_bits instead of e820 map here? Because x86_phys_bits is what controls how much address space the processor has. e820 tells us how much *RAM* the machine

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
Hi H.Peter, On 04/03/2013 02:48 AM, H. Peter Anvin wrote: On 04/02/2013 05:28 AM, Frantisek Hrbata wrote: diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index d8e8eef..39607c6 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -242,6 +242,10 @@ static

Re: [PATCH] mm, x86: no zeroing of hugetlbfs pages at boot

2013-04-03 Thread Simon Jeons
On 03/07/2013 05:50 AM, Cliff Wickman wrote: From: Cliff Wickman Allocating a large number of 1GB hugetlbfs pages at boot takes a very long time. Large system sites would at times like to allocate a very large amount of memory as 1GB pages. They would put this on the kernel boot line:

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
On 04/04/2013 10:14 AM, H. Peter Anvin wrote: Because git didn't exist before then? Oh, I see, thanks! :-) Simon Jeons simon.je...@gmail.com wrote: On 04/04/2013 09:32 AM, H. Peter Anvin wrote: On 04/03/2013 06:17 PM, Simon Jeons wrote: e820 also contain mmio, correct? No. So cpu

Re: [PATCH] THP: Use explicit memory barrier

2013-04-03 Thread Simon Jeons
Hi Minchan, On 04/01/2013 07:45 AM, Minchan Kim wrote: __do_huge_pmd_anonymous_page depends on page_add_new_anon_rmap's spinlock for making sure that clear_huge_page write become visible after set set_pmd_at() write. 1. There are no pte modify, why take page_table_lock here? 2. What's the

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-03 Thread Simon Jeons
, otherwise it's for other guys to review. -Simon Jeons Sorry, I'll be sure to include one in the future. And it looks like I do need a v5 ... I think this needs to be tunable like the admin reserve. The user_reserve_pages default certainly needs to be higher since this reserve

Re: [PATCH 1/9] migrate: add migrate_entry_wait_huge()

2013-04-03 Thread Simon Jeons
Ping! On 03/21/2013 07:36 AM, Simon Jeons wrote: Hi Naoya, On 03/21/2013 05:53 AM, Naoya Horiguchi wrote: On Wed, Mar 20, 2013 at 07:57:32AM +0800, Simon Jeons wrote: Hi Naoya, On 02/22/2013 03:41 AM, Naoya Horiguchi wrote: When we have a page fault for the address which is backed

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
Hi H.Peter, On 04/04/2013 09:32 AM, H. Peter Anvin wrote: On 04/03/2013 06:17 PM, Simon Jeons wrote: e820 also contain mmio, correct? No. How to check which address is used by mmio? /proc/iomem, correct? So cpu should not access address beyond e820 map(RAM+MMIO). No. -hpa

Re: [PATCH] mm, x86: no zeroing of hugetlbfs pages at boot

2013-04-03 Thread Simon Jeons
On 03/07/2013 05:50 AM, Cliff Wickman wrote: From: Cliff Wickman c...@sgi.com Allocating a large number of 1GB hugetlbfs pages at boot takes a very long time. Large system sites would at times like to allocate a very large amount of memory as 1GB pages. They would put this on the kernel boot

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-03 Thread Simon Jeons
Hi H.Peter, On 04/03/2013 02:48 AM, H. Peter Anvin wrote: On 04/02/2013 05:28 AM, Frantisek Hrbata wrote: diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index d8e8eef..39607c6 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -242,6 +242,10 @@ static

  1   2   3   4   >