Re: [RFC PATCH v3 7/7] mm/damon: Add "damon_migrate_{hot,cold}" vmstat

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 15:08:56 +0900 Honggyu Kim wrote: > This patch adds "damon_migrate_{hot,cold}" under node specific vmstat > counters at the following location. > > /sys/devices/system/node/node*/vmstat > > The counted values are accumulcated to the global vm

[RFC PATCH v3 7/7] mm/damon: Add "damon_migrate_{hot,cold}" vmstat

2024-04-04 Thread Honggyu Kim
This patch adds "damon_migrate_{hot,cold}" under node specific vmstat counters at the following location. /sys/devices/system/node/node*/vmstat The counted values are accumulcated to the global vmstat so it also introduces the same counter at /proc/vmstat as well. Signed-off-by: H

[PATCH-next v5 2/4] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-20 Thread Waiman Long
Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of

Re: [PATCH v4 2/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-19 Thread Waiman Long
On 4/19/21 12:38 PM, Johannes Weiner wrote: On Sun, Apr 18, 2021 at 08:00:29PM -0400, Waiman Long wrote: Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every

Re: [PATCH v4 2/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-19 Thread Johannes Weiner
On Sun, Apr 18, 2021 at 08:00:29PM -0400, Waiman Long wrote: > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kme

[PATCH 04/10] mm/vmstat: Inline NUMA event counter updates

2021-04-19 Thread Mel Gorman
__count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka --- include/linux/vmstat.h | 10 +- mm/vmstat.c| 9 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/inc

[PATCH 03/10] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-19 Thread Mel Gorman
maintain perfect accuracy similar to what is required for a vmstat like NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to turn off the collection of NUMA statistics like NUMA_HIT. This patch converts NUMA_HIT and friends to be NUMA events with similar accuracy to VM events

[PATCH v4 2/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-18 Thread Waiman Long
Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of

Re: [PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-15 Thread Johannes Weiner
On Thu, Apr 15, 2021 at 01:08:29PM -0400, Waiman Long wrote: > On 4/15/21 12:50 PM, Johannes Weiner wrote: > > On Tue, Apr 13, 2021 at 09:20:25PM -0400, Waiman Long wrote: > > > Before the new slab memory controller with per object byte charging, > > > charging and vms

Re: [PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-15 Thread Waiman Long
On 4/15/21 12:50 PM, Johannes Weiner wrote: On Tue, Apr 13, 2021 at 09:20:25PM -0400, Waiman Long wrote: Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every

Re: [PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-15 Thread Johannes Weiner
On Tue, Apr 13, 2021 at 09:20:25PM -0400, Waiman Long wrote: > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kme

Re: [PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-15 Thread Mel Gorman
s there's no such thing for > >> the numa > >> counters. > >> > > > > That is a problem I missed. Even if zonestats was preserved on > > hot-remove, fold_vm_zone_numa_events would not be reading the CPU so > > hotplug events jump all over

Re: [PATCH 04/11] mm/vmstat: Inline NUMA event counter updates

2021-04-15 Thread Mel Gorman
On Wed, Apr 14, 2021 at 06:26:25PM +0200, Vlastimil Babka wrote: > On 4/14/21 6:20 PM, Vlastimil Babka wrote: > > On 4/14/21 3:39 PM, Mel Gorman wrote: > >> __count_numa_event is small enough to be treated similarly to > >> __count_vm_event so inline it. > >> > >> Signed-off-by: Mel Gorman > > >

Re: [PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-14 Thread Masayoshi Mizuma
On Tue, Apr 13, 2021 at 09:20:25PM -0400, Waiman Long wrote: > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kme

Re: [PATCH 04/11] mm/vmstat: Inline NUMA event counter updates

2021-04-14 Thread Vlastimil Babka
On 4/14/21 6:20 PM, Vlastimil Babka wrote: > On 4/14/21 3:39 PM, Mel Gorman wrote: >> __count_numa_event is small enough to be treated similarly to >> __count_vm_event so inline it. >> >> Signed-off-by: Mel Gorman > > Acked-by: Vlastimil Babka > >> --- >> include/linux/vmstat.h | 9 +

Re: [PATCH 04/11] mm/vmstat: Inline NUMA event counter updates

2021-04-14 Thread Vlastimil Babka
On 4/14/21 3:39 PM, Mel Gorman wrote: > __count_numa_event is small enough to be treated similarly to > __count_vm_event so inline it. > > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > include/linux/vmstat.h | 9 + > mm/vmstat.c| 9 - > 2 files change

Re: [PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-14 Thread Vlastimil Babka
ers. >> > > That is a problem I missed. Even if zonestats was preserved on > hot-remove, fold_vm_zone_numa_events would not be reading the CPU so > hotplug events jump all over the place. > > So some periodic folding is necessary. I would still prefer not to do it > by t

Re: [PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-14 Thread Mel Gorman
The counters are used by userspace to get a general overview > > of a workloads NUMA behaviour but the page allocator incurs a high cost to > > maintain perfect accuracy similar to what is required for a vmstat like > > NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow u

[PATCH 04/11] mm/vmstat: Inline NUMA event counter updates

2021-04-14 Thread Mel Gorman
__count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Signed-off-by: Mel Gorman --- include/linux/vmstat.h | 9 + mm/vmstat.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/vmstat.h b/include/l

[PATCH 03/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-14 Thread Mel Gorman
maintain perfect accuracy similar to what is required for a vmstat like NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to turn off the collection of NUMA statistics like NUMA_HIT. This patch converts NUMA_HIT and friends to be NUMA events with similar accuracy to VM events

Re: [PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-14 Thread Vlastimil Babka
MA behaviour but the page allocator incurs a high cost to > maintain perfect accuracy similar to what is required for a vmstat like > NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to > turn off the collection of NUMA statistics like NUMA_HIT. > > This patch conve

[PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-13 Thread Waiman Long
Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of

Re: [PATCH v2 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-12 Thread Shakeel Butt
On Mon, Apr 12, 2021 at 3:55 PM Waiman Long wrote: > > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kmem_cac

[PATCH v2 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-12 Thread Waiman Long
Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of

Re: [PATCH 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-12 Thread Waiman Long
On 4/12/21 2:22 PM, Roman Gushchin wrote: On Fri, Apr 09, 2021 at 07:18:40PM -0400, Waiman Long wrote: Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every

Re: [PATCH 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-12 Thread Roman Gushchin
On Fri, Apr 09, 2021 at 07:18:40PM -0400, Waiman Long wrote: > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kme

[PATCH 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-09 Thread Waiman Long
Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of

[PATCH v7 04/28] mm/vmstat: Add functions to account folio statistics

2021-04-09 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

[PATCH 05/11] mm/vmstat: Inline NUMA event counter updates

2021-04-07 Thread Mel Gorman
__count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Signed-off-by: Mel Gorman --- include/linux/vmstat.h | 9 + mm/vmstat.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/vmstat.h b/include/l

[PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-07 Thread Mel Gorman
maintain perfect accuracy similar to what is required for a vmstat like NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to turn off the collection of NUMA statistics like NUMA_HIT. This patch converts NUMA_HIT and friends to be NUMA events with similar accuracy to VM events

Re: [PATCH v6 03/27] mm/vmstat: Add functions to account folio statistics

2021-04-06 Thread Christoph Hellwig
On Wed, Mar 31, 2021 at 07:47:04PM +0100, Matthew Wilcox (Oracle) wrote: > Allow page counters to be more readily modified by callers which have > a folio. Name these wrappers with 'stat' instead of 'state' as requested > by Linus here: Looks good, Reviewed-by: Christoph Hellwig

[PATCH v6 03/27] mm/vmstat: Add functions to account folio statistics

2021-03-31 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

[PATCH 4/6] mm/vmstat: Inline NUMA event counter updates

2021-03-29 Thread Mel Gorman
__count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Signed-off-by: Mel Gorman --- include/linux/vmstat.h | 9 + mm/vmstat.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/vmstat.h b/include/l

[PATCH 3/6] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-03-29 Thread Mel Gorman
high cost to maintain perfect accuracy similar to what is required for a vmstat like NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to turn off the collection of NUMA statistics like NUMA_HIT. This patch converts NUMA_HIT and friends to be NUMA events with similar accuracy

[PATCH v5 06/27] mm/vmstat: Add functions to account folio statistics

2021-03-19 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-17 Thread Christoph Hellwig
> +static inline > +void __inc_zone_folio_stat(struct folio *folio, enum zone_stat_item item) This prototype style is weird and doesn't follow either of the preffered styles.. > static inline void __mod_zone_freepage_state(struct zone *zone, int nr_pages, >

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Andrew Morton
On Sun, 14 Mar 2021 04:11:55 + Matthew Wilcox wrote: > On Sat, Mar 13, 2021 at 12:37:07PM -0800, Andrew Morton wrote: > > On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" > > wrote: > > > > > Allow page counters to be more readily modified by callers which have > > > a folio.

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Matthew Wilcox
On Sat, Mar 13, 2021 at 12:37:07PM -0800, Andrew Morton wrote: > On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" > wrote: > > > Allow page counters to be more readily modified by callers which have > > a folio. Name these wrappers with 'stat' instead of 'state' as requested > > by

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Andrew Morton
On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" wrote: > Allow page counters to be more readily modified by callers which have > a folio. Name these wrappers with 'stat' instead of 'state' as requested > by Linus here: > https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xff

[PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-04 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

Re: [PATCH v2] mm: vmstat: add cma statistics

2021-03-03 Thread John Hubbard
On 3/2/21 10:33, Minchan Kim wrote: Since CMA is used more widely, it's worth to have CMA allocation statistics into vmstat. With it, we could know how agressively system uses cma allocation and how often it fails. Signed-off-by: Minchan Kim --- * from v1 - https://lore.kernel.org/lin

[PATCH v2] mm: vmstat: add cma statistics

2021-03-02 Thread Minchan Kim
Since CMA is used more widely, it's worth to have CMA allocation statistics into vmstat. With it, we could know how agressively system uses cma allocation and how often it fails. Signed-off-by: Minchan Kim --- * from v1 - https://lore.kernel.org/linux-mm/20210217170025.512704-1

Re: [PATCH v3 03/25] mm/vmstat: Add folio stat wrappers

2021-03-01 Thread Matthew Wilcox
On Mon, Mar 01, 2021 at 04:17:39PM -0500, Zi Yan wrote: > On 28 Jan 2021, at 2:03, Matthew Wilcox (Oracle) wrote: > > Allow page counters to be more readily modified by callers which have > > a folio. Name these wrappers with 'stat' instead of 'state' as requested > > Shouldn’t we change the stats

Re: [PATCH v3 03/25] mm/vmstat: Add folio stat wrappers

2021-03-01 Thread Zi Yan
On 28 Jan 2021, at 2:03, Matthew Wilcox (Oracle) wrote: > Allow page counters to be more readily modified by callers which have > a folio. Name these wrappers with 'stat' instead of 'state' as requested > by Linus here: > https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwg

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2021-02-25 Thread Roman Gushchin
, so we would have > > > > > more time to find a solution, acceptable for all? > > > > > > > > No probs. I already had a big red asterisk on it ;) > > > > > > I've a suspicion that Andrew might be tiring of his big red asterisk, > >

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2021-02-25 Thread Hugh Dickins
> No probs. I already had a big red asterisk on it ;) > > > > I've a suspicion that Andrew might be tiring of his big red asterisk, > > and wanting to unload > > mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings.patch > > mm-vmstat-fix-pr

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2021-02-24 Thread Roman Gushchin
haven't reached a consensus here. > > > Can, you, please, not merge this patch into 5.9, so we would have > > > more time to find a solution, acceptable for all? > > > > No probs. I already had a big red asterisk on it ;) > > I've a suspicion that Andr

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2021-02-23 Thread Hugh Dickins
we would have > > more time to find a solution, acceptable for all? > > No probs. I already had a big red asterisk on it ;) I've a suspicion that Andrew might be tiring of his big red asterisk, and wanting to unload mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-

Re: [PATCH v3 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-18 Thread Michal Koutný
On Tue, Feb 09, 2021 at 11:33:04AM -0500, Johannes Weiner wrote: > --- > tools/testing/selftests/cgroup/test_kmem.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) Reviewed-by: Michal Koutný signature.asc Description: Digital signature

Re: [PATCH] mm: vmstat: add cma statistics

2021-02-17 Thread Minchan Kim
On Wed, Feb 17, 2021 at 12:57:25PM -0800, John Hubbard wrote: > On 2/17/21 9:00 AM, Minchan Kim wrote: > > Since CMA is used more widely, it's worth to have CMA > > allocation statistics into vmstat. With it, we could > > know how agressively system uses cma allocation

Re: [PATCH] mm: vmstat: add cma statistics

2021-02-17 Thread John Hubbard
On 2/17/21 9:00 AM, Minchan Kim wrote: Since CMA is used more widely, it's worth to have CMA allocation statistics into vmstat. With it, we could know how agressively system uses cma allocation and how often it fails. Signed-off-by: Minchan Kim --- include/linux/vm_event_item.h | 3 +++

[PATCH] mm: vmstat: add cma statistics

2021-02-17 Thread Minchan Kim
Since CMA is used more widely, it's worth to have CMA allocation statistics into vmstat. With it, we could know how agressively system uses cma allocation and how often it fails. Signed-off-by: Minchan Kim --- include/linux/vm_event_item.h | 3 +++ mm/cma.c

Re: [PATCH v3 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-09 Thread Roman Gushchin
On Tue, Feb 09, 2021 at 11:33:04AM -0500, Johannes Weiner wrote: > With memcg having switched to rstat, memory.stat output is precise. > Update the cgroup selftest to reflect the expectations and error > tolerances of the new implementation. > > Also add newly tracked types of memory to the memory

[PATCH v3 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-09 Thread Johannes Weiner
tests/cgroup/test_kmem.c index 0941aa16157e..22b31ebb3513 100644 --- a/tools/testing/selftests/cgroup/test_kmem.c +++ b/tools/testing/selftests/cgroup/test_kmem.c @@ -19,12 +19,12 @@ /* - * Memory cgroup charging and vmstat data aggregation is performed using - * percpu batches 32 pages big (lo

Re: [PATCH 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-09 Thread Shakeel Butt
On Fri, Feb 5, 2021 at 10:28 AM Johannes Weiner wrote: > > With memcg having switched to rstat, memory.stat output is precise. > Update the cgroup selftest to reflect the expectations and error > tolerances of the new implementation. > > Also add newly tracked types of memory to the memory.stat si

[PATCH 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-05 Thread Johannes Weiner
index 0941aa16157e..22b31ebb3513 100644 --- a/tools/testing/selftests/cgroup/test_kmem.c +++ b/tools/testing/selftests/cgroup/test_kmem.c @@ -19,12 +19,12 @@ /* - * Memory cgroup charging and vmstat data aggregation is performed using - * percpu batches 32 pages big (look at MEMCG_CHARGE_BATCH). S

[PATCH] mm: vmstat: add some comments on internal storage of byte items

2021-02-02 Thread Johannes Weiner
Byte-accounted items are used for slab object accounting at the cgroup level, because the objects in a slab page can belong to different cgroups. At the global level these items always change in multiples of whole slab pages. The vmstat code exploits this and stores these items as pages internally

[PATCH] mm: vmstat: fix NOHZ wakeups for node stat changes

2021-02-02 Thread Johannes Weiner
On NOHZ, the periodic vmstat flushers on each CPU can go to sleep and won't wake up until stat changes are detected in the per-cpu deltas of the zone vmstat counters. In commit 75ef71840539 ("mm, vmstat: add infrastructure for per-node vmstats") per-node counters were introduced, a

[PATCH v3 03/25] mm/vmstat: Add folio stat wrappers

2021-01-27 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

Re: [PATCH] mm: memcontrol: skip propagate percpu vmstat values to current memcg

2021-01-20 Thread Michal Hocko
On Tue 19-01-21 11:58:42, Johannes Weiner wrote: > On Tue, Jan 19, 2021 at 01:27:44PM +0800, Muchun Song wrote: > > The current memcg will be freed soon, so updating it's vmstat and > > vmevent values is pointless. Just skip updating it. > > > > Signed-off-by: Much

Re: [PATCH] mm: memcontrol: skip propagate percpu vmstat values to current memcg

2021-01-19 Thread Johannes Weiner
On Tue, Jan 19, 2021 at 01:27:44PM +0800, Muchun Song wrote: > The current memcg will be freed soon, so updating it's vmstat and > vmevent values is pointless. Just skip updating it. > > Signed-off-by: Muchun Song Oof, that's pretty subtle! Somebody trying to refact

[PATCH] mm: memcontrol: skip propagate percpu vmstat values to current memcg

2021-01-18 Thread Muchun Song
The current memcg will be freed soon, so updating it's vmstat and vmevent values is pointless. Just skip updating it. Signed-off-by: Muchun Song --- mm/memcontrol.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c0a9076

[PATCH v2 03/27] mm/vmstat: Add folio stat wrappers

2021-01-18 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox (Oracle)

[PATCH v6 0/7] Convert all THP vmstat counters to pages

2020-12-28 Thread Muchun Song
This patch series is aimed to convert all THP vmstat counters to pages. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know the unit of the vmstat counters is which one

[PATCH v5 0/7] Convert all THP vmstat counters to pages

2020-12-16 Thread Muchun Song
This patch series is aimed to convert all THP vmstat counters to pages. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know the unit of the vmstat counters is which one

[PATCH v4 0/7] Convert all THP vmstat counters to pages

2020-12-10 Thread Muchun Song
Hi, This patch series is aimed to convert all THP vmstat counters to pages. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know the unit of the vmstat counters is which

[PATCH v3 0/7] Convert all THP vmstat counters to pages

2020-12-07 Thread Muchun Song
Hi, This patch series is aimed to convert all THP vmstat counters to pages. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know the unit of the vmstat counters is which

Re: [External] Re: [RESEND PATCH v2 09/12] mm: memcontrol: convert vmstat slab counters to bytes

2020-12-07 Thread Muchun Song
On Tue, Dec 8, 2020 at 3:46 AM Roman Gushchin wrote: > > On Sun, Dec 06, 2020 at 06:14:48PM +0800, Muchun Song wrote: > > the global and per-node counters are stored in pages, however memcg > > and lruvec counters are stored in bytes. This scheme looks weird. > > So

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Muchun Song
On Tue, Dec 8, 2020 at 4:33 AM Hugh Dickins wrote: > > On Mon, 7 Dec 2020, Roman Gushchin wrote: > > On Mon, Dec 07, 2020 at 04:02:54PM +0100, Michal Hocko wrote: > > > > > > As I've said the THP accounting change makes more sense to me because it > > > allows future changes which are already unde

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 11:02 PM Michal Hocko wrote: > > On Mon 07-12-20 22:52:30, Muchun Song wrote: > > On Mon, Dec 7, 2020 at 9:00 PM Michal Hocko wrote: > > > > > > On Sun 06-12-20 18:14:39, Muchun Song wrote: > > > > Hi, > > > > > &

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Muchun Song
ng wrote: > >>>> Hi, > >>>> > >>>> This patch series is aimed to convert all THP vmstat counters to pages > >>>> and some KiB vmstat counters to bytes. > >>>> > >>>> The unit of some vmstat counters are pages, s

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Hugh Dickins
On Mon, 7 Dec 2020, Roman Gushchin wrote: > On Mon, Dec 07, 2020 at 04:02:54PM +0100, Michal Hocko wrote: > > > > As I've said the THP accounting change makes more sense to me because it > > allows future changes which are already undergoing so there is more > > merit in those. > > +1 > And this

Re: [RESEND PATCH v2 09/12] mm: memcontrol: convert vmstat slab counters to bytes

2020-12-07 Thread Roman Gushchin
On Mon, Dec 07, 2020 at 11:46:22AM -0800, Roman Gushchin wrote: > On Sun, Dec 06, 2020 at 06:14:48PM +0800, Muchun Song wrote: > > the global and per-node counters are stored in pages, however memcg > > and lruvec counters are stored in bytes. This scheme looks weird. > >

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Roman Gushchin
t; > > > This patch series is aimed to convert all THP vmstat counters to pages > > > > and some KiB vmstat counters to bytes. > > > > > > > > The unit of some vmstat counters are pages, some are bytes, some are > > > > HPAGE_PMD_NR, and some

Re: [RESEND PATCH v2 09/12] mm: memcontrol: convert vmstat slab counters to bytes

2020-12-07 Thread Roman Gushchin
On Sun, Dec 06, 2020 at 06:14:48PM +0800, Muchun Song wrote: > the global and per-node counters are stored in pages, however memcg > and lruvec counters are stored in bytes. This scheme looks weird. > So convert all vmstat slab counters to bytes. There is a reason for this weird schem

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Randy Dunlap
On 12/7/20 7:02 AM, Michal Hocko wrote: > On Mon 07-12-20 22:52:30, Muchun Song wrote: >> On Mon, Dec 7, 2020 at 9:00 PM Michal Hocko wrote: >>> >>> On Sun 06-12-20 18:14:39, Muchun Song wrote: >>>> Hi, >>>> >>>> This patch series is

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Michal Hocko
On Mon 07-12-20 22:52:30, Muchun Song wrote: > On Mon, Dec 7, 2020 at 9:00 PM Michal Hocko wrote: > > > > On Sun 06-12-20 18:14:39, Muchun Song wrote: > > > Hi, > > > > > > This patch series is aimed to convert all THP vmstat counters to pages &

Re: [External] Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 9:00 PM Michal Hocko wrote: > > On Sun 06-12-20 18:14:39, Muchun Song wrote: > > Hi, > > > > This patch series is aimed to convert all THP vmstat counters to pages > > and some KiB vmstat counters to bytes. > > > > The unit of some

Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Michal Hocko
On Sun 06-12-20 18:14:39, Muchun Song wrote: > Hi, > > This patch series is aimed to convert all THP vmstat counters to pages > and some KiB vmstat counters to bytes. > > The unit of some vmstat counters are pages, some are bytes, some are > HPAGE_PMD_NR, and some are KiB. W

[RESEND PATCH v2 10/12] mm: memcontrol: scale stat_threshold for byted-sized vmstat

2020-12-06 Thread Muchun Song
Some vmstat counters are being accounted in bytes not pages, so the stat_threshold should also scale to bytes. The vmstat counters are already long type for memcg (can reference to struct lruvec_stat). For the global per-node vmstat counters also can scale to long. But the maximum vmstat

[RESEND PATCH v2 09/12] mm: memcontrol: convert vmstat slab counters to bytes

2020-12-06 Thread Muchun Song
the global and per-node counters are stored in pages, however memcg and lruvec counters are stored in bytes. This scheme looks weird. So convert all vmstat slab counters to bytes. Signed-off-by: Muchun Song --- include/linux/vmstat.h | 17 ++--- mm/vmstat.c| 21

[RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-06 Thread Muchun Song
Hi, This patch series is aimed to convert all THP vmstat counters to pages and some KiB vmstat counters to bytes. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know

Re: [PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-06 Thread Muchun Song
I am very sorry that I have hit 'git send-email *' in a directory containing both v1 and v2 patchs. Please ignore this. I will resend this version. Very sorry for the noise. Thanks. On Sun, Dec 6, 2020 at 4:25 PM Muchun Song wrote: > > Hi, > > This patch series is aimed to

[PATCH v2 09/12] mm: memcontrol: convert vmstat slab counters to bytes

2020-12-06 Thread Muchun Song
the global and per-node counters are stored in pages, however memcg and lruvec counters are stored in bytes. This scheme looks weird. So convert all vmstat slab counters to bytes. Signed-off-by: Muchun Song --- include/linux/vmstat.h | 17 ++--- mm/vmstat.c| 21

[PATCH v2 10/12] mm: memcontrol: scale stat_threshold for byted-sized vmstat

2020-12-06 Thread Muchun Song
Some vmstat counters are being accounted in bytes not pages, so the stat_threshold should also scale to bytes. The vmstat counters are already long type for memcg (can reference to struct lruvec_stat). For the global per-node vmstat counters also can scale to long. But the maximum vmstat

[PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-06 Thread Muchun Song
Hi, This patch series is aimed to convert all THP vmstat counters to pages and some KiB vmstat counters to bytes. The unit of some vmstat counters are pages, some are bytes, some are HPAGE_PMD_NR, and some are KiB. When we want to expose these vmstat counters to the userspace, we have to know

[PATCH 1/9] mm: vmstat: fix stat_threshold for NR_KERNEL_STACK_KB

2020-12-06 Thread Muchun Song
The kernel stack is being accounted in KiB not page, so the stat_threshold should also adjust to byte. Signed-off-by: Muchun Song --- mm/vmstat.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index 8d77ee426e22..f7857a7052e4 100644 --- a/mm/vmstat.c +++ b/mm/v

[PATCH 1/9] mm: vmstat: fix stat_threshold for NR_KERNEL_STACK_KB

2020-12-05 Thread Muchun Song
The kernel stack is being accounted in KiB not page, so the stat_threshold should also adjust to byte. Signed-off-by: Muchun Song --- mm/vmstat.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index 8d77ee426e22..f7857a7052e4 100644 --- a/mm/vmstat.c +++ b/mm/v

[PATCH 0/9] Convert all THP vmstat counters to pages

2020-12-05 Thread Muchun Song
Hi, This patch series is aimed to convert all THP vmstat counters to pages and the kernel stack vmstat counter to bytes. The unit of some vmstat counters are pages, the unit of some vmstat counters are bytes, the unit of some vmstat counters are HPAGE_PMD_NR, and the unit of some vmstat counters

Re: [PATCH v5 2/9] task_isolation: vmstat: add vmstat_idle function

2020-11-23 Thread Thomas Gleixner
On Mon, Nov 23 2020 at 17:56, Alex Belits wrote: > This function checks to see if a vmstat worker is not running, > and the vmstat diffs don't require an update. The function is > called from the task-isolation code to see if we need to > actually do some work to quiet vmstat. A

Re: [PATCH v5 1/9] task_isolation: vmstat: add quiet_vmstat_sync function

2020-11-23 Thread Thomas Gleixner
the project name you are using but the affected code belongs to the memory management subsystem and if you run git log mm/vmstat.c you might get a hint what the proper prefix is, i.e. 'mm/vmstat: ' > In commit f01f17d3705b ("mm, vmstat: make quiet_vmstat lighter") >

[PATCH v5 2/9] task_isolation: vmstat: add vmstat_idle function

2020-11-23 Thread Alex Belits
From: Chris Metcalf This function checks to see if a vmstat worker is not running, and the vmstat diffs don't require an update. The function is called from the task-isolation code to see if we need to actually do some work to quiet vmstat. Signed-off-by: Chris Metcalf Signed-off-by:

[PATCH v5 1/9] task_isolation: vmstat: add quiet_vmstat_sync function

2020-11-23 Thread Alex Belits
From: Chris Metcalf In commit f01f17d3705b ("mm, vmstat: make quiet_vmstat lighter") the quiet_vmstat() function became asynchronous, in the sense that the vmstat work was still scheduled to run on the core when the function returned. For task isolation, we need a synchronous vers

Re: [PATCH] docs/vm: remove unused 3 items explanation for /proc/vmstat

2020-11-18 Thread Alex Shi
在 2020/11/19 上午4:46, Jonathan Corbet 写道: > On Mon, 16 Nov 2020 17:51:22 +0800 > Alex Shi wrote: > >> Commit 5647bc293ab1 ("mm: compaction: Move migration fail/success >> stats to migrate.c"), removed 3 items in /proc/vmstat. but the docs >> still has

Re: [PATCH] docs/vm: remove unused 3 items explanation for /proc/vmstat

2020-11-18 Thread Jonathan Corbet
On Mon, 16 Nov 2020 17:51:22 +0800 Alex Shi wrote: > Commit 5647bc293ab1 ("mm: compaction: Move migration fail/success > stats to migrate.c"), removed 3 items in /proc/vmstat. but the docs > still has their explanation. let's remove them. > > "compact_bl

Re: [PATCH] docs/vm: remove unused 3 items explanation for /proc/vmstat

2020-11-16 Thread Zi Yan
On 16 Nov 2020, at 4:51, Alex Shi wrote: > Commit 5647bc293ab1 ("mm: compaction: Move migration fail/success > stats to migrate.c"), removed 3 items in /proc/vmstat. but the docs > still has their explanation. let's remove them. > > "compact_bl

[PATCH] docs/vm: remove unused 3 items explanation for /proc/vmstat

2020-11-16 Thread Alex Shi
Commit 5647bc293ab1 ("mm: compaction: Move migration fail/success stats to migrate.c"), removed 3 items in /proc/vmstat. but the docs still has their explanation. let's remove them. "compact_blocks_moved", "compact_pages_moved", "compact_pagemigrate_failed&

Re: [RFC V2] mm/vmstat: Add events for HugeTLB migration

2020-10-06 Thread Michal Hocko
:49, Anshuman Khandual wrote: > >>>> Add following new vmstat events which will track HugeTLB page migration. > >>>> > >>>> 1. HUGETLB_MIGRATION_SUCCESS > >>>> 2. HUGETLB_MIGRATION_FAILURE > >>>> > >>>> It fo

Re: [RFC V2] mm/vmstat: Add events for HugeTLB migration

2020-10-05 Thread Anshuman Khandual
On 10/05/2020 11:35 AM, Michal Hocko wrote: > On Mon 05-10-20 07:59:12, Anshuman Khandual wrote: >> >> >> On 10/02/2020 05:34 PM, Michal Hocko wrote: >>> On Wed 30-09-20 11:30:49, Anshuman Khandual wrote: >>>> Add following new vmstat events which will

Re: [RFC V2] mm/vmstat: Add events for HugeTLB migration

2020-10-04 Thread Michal Hocko
On Mon 05-10-20 07:59:12, Anshuman Khandual wrote: > > > On 10/02/2020 05:34 PM, Michal Hocko wrote: > > On Wed 30-09-20 11:30:49, Anshuman Khandual wrote: > >> Add following new vmstat events which will track HugeTLB page migration. > >> > &g

  1   2   3   4   5   6   7   8   9   10   >