[PATCH v2 1/5] mm: migrate NUMA stats from per-zone to per-node

2017-12-18 Thread Kemi Wang
com> Suggested-by: Michal Hocko <mho...@kernel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- drivers/base/node.c| 23 +++ include/linux/mmzone.h | 27 include/linux/vmstat.h | 31 - mm/mempolicy.c | 2 +- mm/page_alloc.c| 16

[PATCH v2 1/5] mm: migrate NUMA stats from per-zone to per-node

2017-12-18 Thread Kemi Wang
Hocko Signed-off-by: Kemi Wang --- drivers/base/node.c| 23 +++ include/linux/mmzone.h | 27 include/linux/vmstat.h | 31 - mm/mempolicy.c | 2 +- mm/page_alloc.c| 16 +++-- mm/vmstat.c| 177

[PATCH v2 5/5] mm: Rename zone_statistics() to numa_statistics()

2017-12-18 Thread Kemi Wang
Since the functionality of zone_statistics() updates numa counters, but numa statistics has been separated from zone statistics framework. Thus, the function name makes people confused. So, change the name to numa_statistics() as well as its call sites accordingly. Signed-off-by: Kemi Wang

[PATCH v2 5/5] mm: Rename zone_statistics() to numa_statistics()

2017-12-18 Thread Kemi Wang
Since the functionality of zone_statistics() updates numa counters, but numa statistics has been separated from zone statistics framework. Thus, the function name makes people confused. So, change the name to numa_statistics() as well as its call sites accordingly. Signed-off-by: Kemi Wang

[PATCH v2 4/5] mm: use node_page_state_snapshot to avoid deviation

2017-12-18 Thread Kemi Wang
worry about it. Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- drivers/base/node.c | 17 ++--- mm/vmstat.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index a045ea1..cf303f8 100644 --- a/driver

[PATCH v2 4/5] mm: use node_page_state_snapshot to avoid deviation

2017-12-18 Thread Kemi Wang
worry about it. Signed-off-by: Kemi Wang --- drivers/base/node.c | 17 ++--- mm/vmstat.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index a045ea1..cf303f8 100644 --- a/drivers/base/node.c +++ b/drivers

[PATCH v2 2/5] mm: Extends local cpu counter vm_diff_nodestat from s8 to s16

2017-12-18 Thread Kemi Wang
any functionality change. before after sizeof(struct per_cpu_nodestat)28 68 Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- include/linux/mmzone.h | 4 ++-- mm/vmstat.c| 16 2 files changed, 10 insertions(

[PATCH v2 3/5] mm: enlarge NUMA counters threshold size

2017-12-18 Thread Kemi Wang
ith global counter update using different threshold size for node page stats. Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- mm/vmstat.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 9c681cc..64e08ae 100644 --- a/mm/v

[PATCH v2 2/5] mm: Extends local cpu counter vm_diff_nodestat from s8 to s16

2017-12-18 Thread Kemi Wang
any functionality change. before after sizeof(struct per_cpu_nodestat)28 68 Signed-off-by: Kemi Wang --- include/linux/mmzone.h | 4 ++-- mm/vmstat.c| 16 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH v2 3/5] mm: enlarge NUMA counters threshold size

2017-12-18 Thread Kemi Wang
ith global counter update using different threshold size for node page stats. Signed-off-by: Kemi Wang --- mm/vmstat.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 9c681cc..64e08ae 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -

[PATCH v2 0/5] mm: NUMA stats code cleanup and enhancement

2017-12-18 Thread Kemi Wang
ucture for node page stats by entending local cpu counters vm_node_stat_diff from s8 to s16 b) reuse the per-cpu infrastrcuture for NUMA stats Kemi Wang (5): mm: migrate NUMA stats from per-zone to per-node mm: Extends local cpu counter vm_diff_nodestat from s8 to s16 mm: enlarge NUMA co

[PATCH v2 0/5] mm: NUMA stats code cleanup and enhancement

2017-12-18 Thread Kemi Wang
ucture for node page stats by entending local cpu counters vm_node_stat_diff from s8 to s16 b) reuse the per-cpu infrastrcuture for NUMA stats Kemi Wang (5): mm: migrate NUMA stats from per-zone to per-node mm: Extends local cpu counter vm_diff_nodestat from s8 to s16 mm: enlarge NUMA co

[PATCH 2/2] mm: Rename zone_statistics() to numa_statistics()

2017-11-27 Thread Kemi Wang
Since numa statistics has been separated from zone statistics framework, but the functionality of zone_statistics() updates numa counters. Thus, the function name makes people confused. So, change the name to numa_statistics() as well as its call sites accordingly. Signed-off-by: Kemi Wang

[PATCH 2/2] mm: Rename zone_statistics() to numa_statistics()

2017-11-27 Thread Kemi Wang
Since numa statistics has been separated from zone statistics framework, but the functionality of zone_statistics() updates numa counters. Thus, the function name makes people confused. So, change the name to numa_statistics() as well as its call sites accordingly. Signed-off-by: Kemi Wang

[PATCH 1/2] mm: NUMA stats code cleanup and enhancement

2017-11-27 Thread Kemi Wang
sys 0m0.000s node/node*/numastat We would not worry it much as it is a slow path and will not be read frequently. Suggested-by: Andi Kleen <a...@linux.intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- drivers/base/node.c| 14 ++--- include/linux/mmzone.h |

[PATCH 1/2] mm: NUMA stats code cleanup and enhancement

2017-11-27 Thread Kemi Wang
sys 0m0.000s node/node*/numastat We would not worry it much as it is a slow path and will not be read frequently. Suggested-by: Andi Kleen Signed-off-by: Kemi Wang --- drivers/base/node.c| 14 ++--- include/linux/mmzone.h | 2 - include/linux/vmstat.h | 61 +---

[PATCH v2] buffer: Avoid setting buffer bits that are already set

2017-10-23 Thread Kemi Wang
riginal patch is contributed by Andi Kleen. Signed-off-by: Andi Kleen <a...@linux.intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> Tested-by: Kemi Wang <kemi.w...@intel.com> Reviewed-by: Jens Axboe <ax...@kernel.dk> --- include/linux/buffer_head.h | 5 - 1 file

[PATCH v2] buffer: Avoid setting buffer bits that are already set

2017-10-23 Thread Kemi Wang
riginal patch is contributed by Andi Kleen. Signed-off-by: Andi Kleen Signed-off-by: Kemi Wang Tested-by: Kemi Wang Reviewed-by: Jens Axboe --- include/linux/buffer_head.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/buffer_head.h b/include/linux/buffer

[PATCH] buffer: Avoid setting buffer bits that are already set

2017-10-23 Thread Kemi Wang
riginal patch is contributed by Andi Kleen. Signed-off-by: Andi Kleen <a...@linux.intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> Tested-by: Kemi Wang <kemi.w...@intel.com> --- include/linux/buffer_head.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

[PATCH] buffer: Avoid setting buffer bits that are already set

2017-10-23 Thread Kemi Wang
riginal patch is contributed by Andi Kleen. Signed-off-by: Andi Kleen Signed-off-by: Kemi Wang Tested-by: Kemi Wang --- include/linux/buffer_head.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c8dae55..e

[PATCH v5] mm, sysctl: make NUMA stats configurable

2017-10-17 Thread Kemi Wang
ed-by: Jesper Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- Documentation/sysctl/vm.txt | 16 +++ include/linux/vmstat.h

[PATCH v5] mm, sysctl: make NUMA stats configurable

2017-10-17 Thread Kemi Wang
Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- Documentation/sysctl/vm.txt | 16 +++ include/linux/vmstat.h | 10 +++ kernel/sysctl.c | 9 ++ mm/mempolicy.c | 3 ++ mm/page_alloc.c

[PATCH v4] mm, sysctl: make NUMA stats configurable

2017-10-16 Thread Kemi Wang
by: Jesper Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- Documentation/sysctl/vm.txt | 16 +++ include/linux/vmstat.h |

[PATCH v4] mm, sysctl: make NUMA stats configurable

2017-10-16 Thread Kemi Wang
rted-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- Documentation/sysctl/vm.txt | 16 +++ include/linux/vmstat.h | 10 +++ kernel/sysctl.c | 7 + mm/mempolicy.c | 3 ++ mm/page_alloc.c

[PATCH v3] mm, sysctl: make NUMA stats configurable

2017-09-28 Thread Kemi Wang
Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- Documentation/sysctl/vm.txt | 24 + drivers/base/node.c | 4 ++ include/li

[PATCH v3] mm, sysctl: make NUMA stats configurable

2017-09-28 Thread Kemi Wang
ard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- Documentation/sysctl/vm.txt | 24 + drivers/base/node.c | 4 ++ include/linux/vmstat.h | 23 init/main.c | 3 ++ kernel/sysctl.c | 7

[PATCH v2] mm, sysctl: make VM stats configurable

2017-09-22 Thread Kemi Wang
label to eliminate the overhead of branch selection; c) Add a single-time log message at boot time to help tell users what happened. Reported-by: Jesper Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com&

[PATCH v2] mm, sysctl: make VM stats configurable

2017-09-22 Thread Kemi Wang
label to eliminate the overhead of branch selection; c) Add a single-time log message at boot time to help tell users what happened. Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- Documentation/sysctl/vm.txt | 26 + d

[PATCH 2/3] mm: Handle numa statistics distinctively based-on different VM stats modes

2017-09-15 Thread Kemi Wang
ub.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/ bench Reported-by: Jesper Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- drivers/b

[PATCH 1/3] mm, sysctl: make VM stats configurable

2017-09-15 Thread Kemi Wang
..@intel.com> Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- include/linux/vmstat.h | 14 ++ kernel/sysctl.c| 7 + mm/vmstat.c| 70 ++ 3 files changed, 91 insertions(+) diff --git a/include/linux/vmstat.h b/inc

[PATCH 2/3] mm: Handle numa statistics distinctively based-on different VM stats modes

2017-09-15 Thread Kemi Wang
ub.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/ bench Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- drivers/base/node.c| 2 ++ include/linux/vmstat.h | 6 + mm/page_alloc.c| 13 +++ mm/vm

[PATCH 1/3] mm, sysctl: make VM stats configurable

2017-09-15 Thread Kemi Wang
can do: echo [A|a]uto > /proc/sys/vm/vmstat_mode The next patch handles numa statistics distinctively based-on different VM stats mode. Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- include/linux/vmstat.h | 14 +

[PATCH 3/3] sysctl/vm.txt: Update document

2017-09-15 Thread Kemi Wang
Add a paragraph to introduce the functionality and usage on vmstat_mode in sysctl/vm.txt Reported-by: Jesper Dangaard Brouer <bro...@redhat.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> Signed-off-by: Kemi Wang &l

[PATCH 3/3] sysctl/vm.txt: Update document

2017-09-15 Thread Kemi Wang
Add a paragraph to introduce the functionality and usage on vmstat_mode in sysctl/vm.txt Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Signed-off-by: Kemi Wang --- Documentation/sysctl/vm.txt | 26 ++ 1 file changed, 26

[PATCH 0/3] Handle zone statistics distinctively based-on

2017-09-15 Thread Kemi Wang
hreads for single page allocation. The third patch updates ABI document accordingly. Kemi Wang (3): mm, sysctl: make VM stats configurable mm: Handle numa statistics distinctively based-on different VM stats modes sysctl/vm.txt: Update document Documentation/sysctl/vm.txt

[PATCH 0/3] Handle zone statistics distinctively based-on

2017-09-15 Thread Kemi Wang
hreads for single page allocation. The third patch updates ABI document accordingly. Kemi Wang (3): mm, sysctl: make VM stats configurable mm: Handle numa statistics distinctively based-on different VM stats modes sysctl/vm.txt: Update document Documentation/sysctl/vm.txt

[PATCH v2 2/3] mm: Update NUMA counter threshold size

2017-08-24 Thread Kemi Wang
hreshold. d) Move zone_numa_state_snapshot() to an individual patch, since it does not appear to be related to this patch. Signed-off-by: Kemi Wang <kemi.w...@intel.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> --- inclu

[PATCH v2 0/3] Separate NUMA statistics from zone statistics

2017-08-24 Thread Kemi Wang
489009617 3 395 488017817 65533 369(-31.3%) 521661345(+45.3%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Kemi Wang (3): mm: Change the call sites of numa statistics items mm: Update NUMA counter threshol

[PATCH v2 2/3] mm: Update NUMA counter threshold size

2017-08-24 Thread Kemi Wang
hreshold. d) Move zone_numa_state_snapshot() to an individual patch, since it does not appear to be related to this patch. Signed-off-by: Kemi Wang Suggested-by: Dave Hansen Suggested-by: Ying Huang --- include/linux/mmzone.h | 3 +-- mm/vmstat.c| 28 ++--

[PATCH v2 0/3] Separate NUMA statistics from zone statistics

2017-08-24 Thread Kemi Wang
489009617 3 395 488017817 65533 369(-31.3%) 521661345(+45.3%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Kemi Wang (3): mm: Change the call sites of numa statistics items mm: Update NUMA counter threshol

[PATCH v2 1/3] mm: Change the call sites of numa statistics items

2017-08-24 Thread Kemi Wang
. Changelog: v2: a) Modify the name of numa-stats-specific functions and params to avoid confusion with those for zone/node page stats. b) Get rid of showing the number of numa stat threshold in /proc/zoneinfo since the value of this item is a constant. Signed-off-by: Kemi Wang <kemi.w...@intel.

[PATCH v2 1/3] mm: Change the call sites of numa statistics items

2017-08-24 Thread Kemi Wang
. Changelog: v2: a) Modify the name of numa-stats-specific functions and params to avoid confusion with those for zone/node page stats. b) Get rid of showing the number of numa stat threshold in /proc/zoneinfo since the value of this item is a constant. Signed-off-by: Kemi Wang --- drivers/base/node.c

[PATCH v2 3/3] mm: Consider the number in local CPUs when *reads* NUMA stats

2017-08-24 Thread Kemi Wang
. Changelog: v2: a) new creation. Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- include/linux/vmstat.h | 6 +- mm/vmstat.c| 9 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index a29bd98..72e9ca6

[PATCH v2 3/3] mm: Consider the number in local CPUs when *reads* NUMA stats

2017-08-24 Thread Kemi Wang
. Changelog: v2: a) new creation. Signed-off-by: Kemi Wang --- include/linux/vmstat.h | 6 +- mm/vmstat.c| 9 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index a29bd98..72e9ca6 100644 --- a/include/linux

[PATCH 1/2] mm: Change the call sites of numa statistics items

2017-08-15 Thread Kemi Wang
threshold: 10* ... The next patch updates the numa stats counter size and threshold. Signed-off-by: Kemi Wang <kemi.w...@intel.com> --- drivers/base/node.c| 22 --- include/linux/mmzone.h | 25 +--- include/linux/vmstat.h

[PATCH 1/2] mm: Change the call sites of numa statistics items

2017-08-15 Thread Kemi Wang
threshold: 10* ... The next patch updates the numa stats counter size and threshold. Signed-off-by: Kemi Wang --- drivers/base/node.c| 22 --- include/linux/mmzone.h | 25 +--- include/linux/vmstat.h | 29 + mm/page_alloc.c

[PATCH 0/2] Separate NUMA statistics from zone statistics

2017-08-15 Thread Kemi Wang
395 488017817 32765 394(-26.6%) 488932078(+36.2%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Kemi Wang (2): mm: Change the call sites of numa statistics items mm: Update NUMA counter threshold size driv

[PATCH 0/2] Separate NUMA statistics from zone statistics

2017-08-15 Thread Kemi Wang
395 488017817 32765 394(-26.6%) 488932078(+36.2%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Kemi Wang (2): mm: Change the call sites of numa statistics items mm: Update NUMA counter threshold size driv

[PATCH 2/2] mm: Update NUMA counter threshold size

2017-08-15 Thread Kemi Wang
with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Signed-off-by: Kemi Wang <kemi.w...@intel.com> Suggested-by: Dave Hansen <dave.han...@intel.com> Suggested-by: Ying Huang <ying.hu...@intel.com> --- include/linux/mmzone.h | 4 ++

[PATCH 2/2] mm: Update NUMA counter threshold size

2017-08-15 Thread Kemi Wang
with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Signed-off-by: Kemi Wang Suggested-by: Dave Hansen Suggested-by: Ying Huang --- include/linux/mmzone.h | 4 ++-- include/linux/vmstat.h | 6 +- mm/vmstat.c| 23 ++--