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

2017-12-14 Thread Michal Hocko
On Thu 14-12-17 16:55:54, kemi wrote: > > > On 2017年12月14日 15:29, Michal Hocko wrote: > > On Thu 14-12-17 09:40:32, kemi wrote: > >> > >> > >> or sometimes > >> NUMA stats can't be disabled in their environments. > > > > why? > > > >> That's the reason > >> why we spent time to do that

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

2017-12-14 Thread Michal Hocko
On Thu 14-12-17 16:55:54, kemi wrote: > > > On 2017年12月14日 15:29, Michal Hocko wrote: > > On Thu 14-12-17 09:40:32, kemi wrote: > >> > >> > >> or sometimes > >> NUMA stats can't be disabled in their environments. > > > > why? > > > >> That's the reason > >> why we spent time to do that

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

2017-12-14 Thread kemi
On 2017年12月14日 15:29, Michal Hocko wrote: > On Thu 14-12-17 09:40:32, kemi wrote: >> >> >> or sometimes >> NUMA stats can't be disabled in their environments. > > why? > >> That's the reason >> why we spent time to do that optimization other than simply adding a runtime >> configuration

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

2017-12-14 Thread kemi
On 2017年12月14日 15:29, Michal Hocko wrote: > On Thu 14-12-17 09:40:32, kemi wrote: >> >> >> or sometimes >> NUMA stats can't be disabled in their environments. > > why? > >> That's the reason >> why we spent time to do that optimization other than simply adding a runtime >> configuration

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

2017-12-13 Thread Michal Hocko
On Thu 14-12-17 09:40:32, kemi wrote: > > > On 2017年12月12日 16:11, Michal Hocko wrote: > > On Tue 12-12-17 10:05:26, kemi wrote: > >> > >> > >> On 2017年12月08日 16:47, Michal Hocko wrote: > >>> On Fri 08-12-17 16:38:46, kemi wrote: > > > On 2017年11月30日 17:45, Michal Hocko wrote: >

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

2017-12-13 Thread Michal Hocko
On Thu 14-12-17 09:40:32, kemi wrote: > > > On 2017年12月12日 16:11, Michal Hocko wrote: > > On Tue 12-12-17 10:05:26, kemi wrote: > >> > >> > >> On 2017年12月08日 16:47, Michal Hocko wrote: > >>> On Fri 08-12-17 16:38:46, kemi wrote: > > > On 2017年11月30日 17:45, Michal Hocko wrote: >

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

2017-12-13 Thread kemi
On 2017年12月12日 16:11, Michal Hocko wrote: > On Tue 12-12-17 10:05:26, kemi wrote: >> >> >> On 2017年12月08日 16:47, Michal Hocko wrote: >>> On Fri 08-12-17 16:38:46, kemi wrote: On 2017年11月30日 17:45, Michal Hocko wrote: > On Thu 30-11-17 17:32:08, kemi wrote: After

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

2017-12-13 Thread kemi
On 2017年12月12日 16:11, Michal Hocko wrote: > On Tue 12-12-17 10:05:26, kemi wrote: >> >> >> On 2017年12月08日 16:47, Michal Hocko wrote: >>> On Fri 08-12-17 16:38:46, kemi wrote: On 2017年11月30日 17:45, Michal Hocko wrote: > On Thu 30-11-17 17:32:08, kemi wrote: After

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

2017-12-12 Thread Michal Hocko
On Tue 12-12-17 10:05:26, kemi wrote: > > > On 2017年12月08日 16:47, Michal Hocko wrote: > > On Fri 08-12-17 16:38:46, kemi wrote: > >> > >> > >> On 2017年11月30日 17:45, Michal Hocko wrote: > >>> On Thu 30-11-17 17:32:08, kemi wrote: > >> > >> After thinking about how to optimize our per-node stats

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

2017-12-12 Thread Michal Hocko
On Tue 12-12-17 10:05:26, kemi wrote: > > > On 2017年12月08日 16:47, Michal Hocko wrote: > > On Fri 08-12-17 16:38:46, kemi wrote: > >> > >> > >> On 2017年11月30日 17:45, Michal Hocko wrote: > >>> On Thu 30-11-17 17:32:08, kemi wrote: > >> > >> After thinking about how to optimize our per-node stats

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

2017-12-11 Thread kemi
On 2017年12月08日 16:47, Michal Hocko wrote: > On Fri 08-12-17 16:38:46, kemi wrote: >> >> >> On 2017年11月30日 17:45, Michal Hocko wrote: >>> On Thu 30-11-17 17:32:08, kemi wrote: >> >> After thinking about how to optimize our per-node stats more gracefully, >> we may add u64 vm_numa_stat_diff[] in

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

2017-12-11 Thread kemi
On 2017年12月08日 16:47, Michal Hocko wrote: > On Fri 08-12-17 16:38:46, kemi wrote: >> >> >> On 2017年11月30日 17:45, Michal Hocko wrote: >>> On Thu 30-11-17 17:32:08, kemi wrote: >> >> After thinking about how to optimize our per-node stats more gracefully, >> we may add u64 vm_numa_stat_diff[] in

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

2017-12-08 Thread kemi
On 2017年11月30日 17:45, Michal Hocko wrote: > On Thu 30-11-17 17:32:08, kemi wrote: > Do not get me wrong. If we want to make per-node stats more optimal, > then by all means let's do that. But having 3 sets of counters is just > way to much. > Hi, Michal Apologize to respond later in this

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

2017-12-08 Thread kemi
On 2017年11月30日 17:45, Michal Hocko wrote: > On Thu 30-11-17 17:32:08, kemi wrote: > Do not get me wrong. If we want to make per-node stats more optimal, > then by all means let's do that. But having 3 sets of counters is just > way to much. > Hi, Michal Apologize to respond later in this

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

2017-12-08 Thread Michal Hocko
On Fri 08-12-17 16:38:46, kemi wrote: > > > On 2017年11月30日 17:45, Michal Hocko wrote: > > On Thu 30-11-17 17:32:08, kemi wrote: > > > Do not get me wrong. If we want to make per-node stats more optimal, > > then by all means let's do that. But having 3 sets of counters is just > > way to much.

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

2017-12-08 Thread Michal Hocko
On Fri 08-12-17 16:38:46, kemi wrote: > > > On 2017年11月30日 17:45, Michal Hocko wrote: > > On Thu 30-11-17 17:32:08, kemi wrote: > > > Do not get me wrong. If we want to make per-node stats more optimal, > > then by all means let's do that. But having 3 sets of counters is just > > way to much.

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

2017-11-30 Thread Wang, Kemi
n, Andi <andi.kl...@intel.com>; Chen, Tim C <tim.c.c...@intel.com>; Jesper Dangaard Brouer <bro...@redhat.com>; Huang, Ying <ying.hu...@intel.com>; Lu, Aaron <aaron...@intel.com>; Li, Aubrey <aubrey...@intel.com>; Linux MM <linux...@kvack.org>; Linux Ker

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

2017-11-30 Thread Wang, Kemi
Kernel Subject: Re: [PATCH 1/2] mm: NUMA stats code cleanup and enhancement On Thu 30-11-17 17:32:08, kemi wrote: [...] > Your patch saves more code than mine because the node stats framework > is reused for numa stats. But it has a performance regression because > of the limitation of

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

2017-11-30 Thread Michal Hocko
On Thu 30-11-17 17:32:08, kemi wrote: [...] > Your patch saves more code than mine because the node stats framework is > reused > for numa stats. But it has a performance regression because of the limitation > of > threshold size (125 at most, see calculate_normal_threshold() in vmstat.c) > in

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

2017-11-30 Thread Michal Hocko
On Thu 30-11-17 17:32:08, kemi wrote: [...] > Your patch saves more code than mine because the node stats framework is > reused > for numa stats. But it has a performance regression because of the limitation > of > threshold size (125 at most, see calculate_normal_threshold() in vmstat.c) > in

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

2017-11-30 Thread kemi
On 2017年11月30日 16:53, Michal Hocko wrote: > On Thu 30-11-17 13:56:13, kemi wrote: >> >> >> On 2017年11月29日 20:17, Michal Hocko wrote: >>> On Tue 28-11-17 14:00:23, Kemi Wang wrote: The existed implementation of NUMA counters is per logical CPU along with zone->vm_numa_stat[] separated

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

2017-11-30 Thread kemi
On 2017年11月30日 16:53, Michal Hocko wrote: > On Thu 30-11-17 13:56:13, kemi wrote: >> >> >> On 2017年11月29日 20:17, Michal Hocko wrote: >>> On Tue 28-11-17 14:00:23, Kemi Wang wrote: The existed implementation of NUMA counters is per logical CPU along with zone->vm_numa_stat[] separated

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

2017-11-30 Thread Michal Hocko
On Thu 30-11-17 13:56:13, kemi wrote: > > > On 2017年11月29日 20:17, Michal Hocko wrote: > > On Tue 28-11-17 14:00:23, Kemi Wang wrote: > >> The existed implementation of NUMA counters is per logical CPU along with > >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array > >>

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

2017-11-30 Thread Michal Hocko
On Thu 30-11-17 13:56:13, kemi wrote: > > > On 2017年11月29日 20:17, Michal Hocko wrote: > > On Tue 28-11-17 14:00:23, Kemi Wang wrote: > >> The existed implementation of NUMA counters is per logical CPU along with > >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array > >>

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

2017-11-29 Thread kemi
On 2017年11月29日 20:17, Michal Hocko wrote: > On Tue 28-11-17 14:00:23, Kemi Wang wrote: >> The existed implementation of NUMA counters is per logical CPU along with >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array >> vm_numa_stat[]. However, unlike the other vmstat

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

2017-11-29 Thread kemi
On 2017年11月29日 20:17, Michal Hocko wrote: > On Tue 28-11-17 14:00:23, Kemi Wang wrote: >> The existed implementation of NUMA counters is per logical CPU along with >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array >> vm_numa_stat[]. However, unlike the other vmstat

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

2017-11-29 Thread Michal Hocko
On Tue 28-11-17 14:00:23, Kemi Wang wrote: > The existed implementation of NUMA counters is per logical CPU along with > zone->vm_numa_stat[] separated by zone, plus a global numa counter array > vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't > effect system's decision

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

2017-11-29 Thread Michal Hocko
On Tue 28-11-17 14:00:23, Kemi Wang wrote: > The existed implementation of NUMA counters is per logical CPU along with > zone->vm_numa_stat[] separated by zone, plus a global numa counter array > vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't > effect system's decision

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

2017-11-28 Thread Vlastimil Babka
On 11/28/2017 07:40 PM, Andi Kleen wrote: > Vlastimil Babka writes: >> >> I'm worried about the "for_each_possible..." approach here and elsewhere >> in the patch as it can be rather excessive compared to the online number >> of cpus (we've seen BIOSes report large numbers of

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

2017-11-28 Thread Vlastimil Babka
On 11/28/2017 07:40 PM, Andi Kleen wrote: > Vlastimil Babka writes: >> >> I'm worried about the "for_each_possible..." approach here and elsewhere >> in the patch as it can be rather excessive compared to the online number >> of cpus (we've seen BIOSes report large numbers of possible CPU's).

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

2017-11-28 Thread Andrew Morton
On Tue, 28 Nov 2017 10:40:52 -0800 Andi Kleen wrote: > Vlastimil Babka writes: > > > > I'm worried about the "for_each_possible..." approach here and elsewhere > > in the patch as it can be rather excessive compared to the online number > > of cpus (we've

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

2017-11-28 Thread Andrew Morton
On Tue, 28 Nov 2017 10:40:52 -0800 Andi Kleen wrote: > Vlastimil Babka writes: > > > > I'm worried about the "for_each_possible..." approach here and elsewhere > > in the patch as it can be rather excessive compared to the online number > > of cpus (we've seen BIOSes report large numbers of

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

2017-11-28 Thread Andi Kleen
Vlastimil Babka writes: > > I'm worried about the "for_each_possible..." approach here and elsewhere > in the patch as it can be rather excessive compared to the online number > of cpus (we've seen BIOSes report large numbers of possible CPU's). IIRC Even if they report a few

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

2017-11-28 Thread Andi Kleen
Vlastimil Babka writes: > > I'm worried about the "for_each_possible..." approach here and elsewhere > in the patch as it can be rather excessive compared to the online number > of cpus (we've seen BIOSes report large numbers of possible CPU's). IIRC Even if they report a few hundred extra

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

2017-11-28 Thread kemi
On 2017年11月28日 16:09, Vlastimil Babka wrote: > On 11/28/2017 07:00 AM, Kemi Wang wrote: >> The existed implementation of NUMA counters is per logical CPU along with >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array >> vm_numa_stat[]. However, unlike the other vmstat

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

2017-11-28 Thread kemi
On 2017年11月28日 16:09, Vlastimil Babka wrote: > On 11/28/2017 07:00 AM, Kemi Wang wrote: >> The existed implementation of NUMA counters is per logical CPU along with >> zone->vm_numa_stat[] separated by zone, plus a global numa counter array >> vm_numa_stat[]. However, unlike the other vmstat

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

2017-11-28 Thread Vlastimil Babka
On 11/28/2017 07:00 AM, Kemi Wang wrote: > The existed implementation of NUMA counters is per logical CPU along with > zone->vm_numa_stat[] separated by zone, plus a global numa counter array > vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't > effect system's decision

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

2017-11-28 Thread Vlastimil Babka
On 11/28/2017 07:00 AM, Kemi Wang wrote: > The existed implementation of NUMA counters is per logical CPU along with > zone->vm_numa_stat[] separated by zone, plus a global numa counter array > vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't > effect system's decision

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

2017-11-27 Thread Kemi Wang
The existed implementation of NUMA counters is per logical CPU along with zone->vm_numa_stat[] separated by zone, plus a global numa counter array vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't effect system's decision and are only read from /proc and /sys, it is a

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

2017-11-27 Thread Kemi Wang
The existed implementation of NUMA counters is per logical CPU along with zone->vm_numa_stat[] separated by zone, plus a global numa counter array vm_numa_stat[]. However, unlike the other vmstat counters, numa stats don't effect system's decision and are only read from /proc and /sys, it is a