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

2017-09-17 Thread kemi
On 2017年09月18日 12:13, Dave Hansen wrote: > On 09/17/2017 08:07 PM, kemi wrote: + if (vmstat_mode) { + if (vmstat_mode == VMSTAT_COARSE_MODE) + return; + } else if (disable_zone_statistics) + return; + if (z->node !=

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

2017-09-17 Thread kemi
On 2017年09月18日 12:13, Dave Hansen wrote: > On 09/17/2017 08:07 PM, kemi wrote: + if (vmstat_mode) { + if (vmstat_mode == VMSTAT_COARSE_MODE) + return; + } else if (disable_zone_statistics) + return; + if (z->node !=

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

2017-09-17 Thread Dave Hansen
On 09/17/2017 08:07 PM, kemi wrote: >>> + if (vmstat_mode) { >>> + if (vmstat_mode == VMSTAT_COARSE_MODE) >>> + return; >>> + } else if (disable_zone_statistics) >>> + return; >>> + >>> if (z->node != numa_node_id()) >>> local_stat =

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

2017-09-17 Thread Dave Hansen
On 09/17/2017 08:07 PM, kemi wrote: >>> + if (vmstat_mode) { >>> + if (vmstat_mode == VMSTAT_COARSE_MODE) >>> + return; >>> + } else if (disable_zone_statistics) >>> + return; >>> + >>> if (z->node != numa_node_id()) >>> local_stat =

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

2017-09-17 Thread kemi
On 2017年09月15日 19:50, Michal Hocko wrote: > On Fri 15-09-17 17:23:25, Kemi Wang wrote: > [...] >> @@ -2743,6 +2745,17 @@ static inline void zone_statistics(struct zone >> *preferred_zone, struct zone *z) >> #ifdef CONFIG_NUMA >> enum numa_stat_item local_stat = NUMA_LOCAL; >> >> +/*

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

2017-09-17 Thread kemi
On 2017年09月15日 19:50, Michal Hocko wrote: > On Fri 15-09-17 17:23:25, Kemi Wang wrote: > [...] >> @@ -2743,6 +2745,17 @@ static inline void zone_statistics(struct zone >> *preferred_zone, struct zone *z) >> #ifdef CONFIG_NUMA >> enum numa_stat_item local_stat = NUMA_LOCAL; >> >> +/*

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

2017-09-15 Thread Michal Hocko
On Fri 15-09-17 17:23:25, Kemi Wang wrote: [...] > @@ -2743,6 +2745,17 @@ static inline void zone_statistics(struct zone > *preferred_zone, struct zone *z) > #ifdef CONFIG_NUMA > enum numa_stat_item local_stat = NUMA_LOCAL; > > + /* > + * skip zone_statistics() if vmstat is a

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

2017-09-15 Thread Michal Hocko
On Fri 15-09-17 17:23:25, Kemi Wang wrote: [...] > @@ -2743,6 +2745,17 @@ static inline void zone_statistics(struct zone > *preferred_zone, struct zone *z) > #ifdef CONFIG_NUMA > enum numa_stat_item local_stat = NUMA_LOCAL; > > + /* > + * skip zone_statistics() if vmstat is a

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

2017-09-15 Thread Kemi Wang
Each page allocation updates a set of per-zone statistics with a call to zone_statistics(). As discussed at the 2017 MM Summit, these are a substantial source of overhead in the page allocator and are very rarely consumed. A link to the MM summit slides:

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

2017-09-15 Thread Kemi Wang
Each page allocation updates a set of per-zone statistics with a call to zone_statistics(). As discussed at the 2017 MM Summit, these are a substantial source of overhead in the page allocator and are very rarely consumed. A link to the MM summit slides: