Re: [RFC PATCH v4 0/5] DAMON based tiered memory management for CXL memory

2024-05-15 Thread SeongJae Park
malloc No problem at all. We all work on our own schedule and nobody can chase/push anybody :) > > On Sun, 12 May 2024 10:54:42 -0700 SeongJae Park wrote: > > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > > posted at [1]. > >

[RFC IDEA v2 6/6] drivers/virtio/virtio_balloon: integrate ACMA and ballooning

2024-05-12 Thread SeongJae Park
and put it into the balloon. As a result, the host can use the requested amount of guest memory, so from the host's perspective, the ballooning just works, but in transparent and access/contiguity-aware way. Signed-off-by: SeongJae Park --- drivers/virtio/virtio_balloon.c | 26

[RFC IDEA v2 0/6] mm/damon: introduce Access/Contiguity-aware Memory Auto-scaling (ACMA)

2024-05-12 Thread SeongJae Park
over-commit VM systems? - Is it ok to reuse pages reporting infrastructure from ACMA? - Is it ok to reuse virtio-balloon's interface for ACMA-integration? - Will access-aware migration make real benefit? - Does future usages of access-aware memory allocation make sense? SeongJae Park (6): mm

Re: [RFC PATCH v3 1/7] mm/damon/paddr: refactor DAMOS_PAGEOUT with migration_mode

2024-05-12 Thread SeongJae Park
On Sat, 11 May 2024 13:16:17 -0700 SeongJae Park wrote: > On Fri, 5 Apr 2024 12:19:07 -0700 SeongJae Park wrote: > > > On Fri, 5 Apr 2024 15:08:50 +0900 Honggyu Kim wrote: > > > > > This is a preparation patch that introduces migration modes. > > > &

[RFC PATCH v4 3/5] mm/migrate: add MR_DAMON to migrate_reason

2024-05-12 Thread SeongJae Park
From: Honggyu Kim The current patch series introduces DAMON based migration across NUMA nodes so it'd be better to have a new migrate_reason in trace events. Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park --- include/linux/migrate_mode.h | 1 + include

[RFC PATCH v4 0/5] DAMON based tiered memory management for CXL memory

2024-05-12 Thread SeongJae Park
n the system runs with high memory pressure on its fast tier DRAM nodes. Having these DAMOS_MIGRATE_HOT and DAMOS_MIGRATE_COLD actions can make tiered memory systems run more efficiently under high memory pressures. Signed-off-by: Honggyu Kim Signed-off-by: Hyeongtak Ji Signed-off-by: Rakie Kim Signed-

Re: [RFC PATCH v3 1/7] mm/damon/paddr: refactor DAMOS_PAGEOUT with migration_mode

2024-05-11 Thread SeongJae Park
On Fri, 5 Apr 2024 12:19:07 -0700 SeongJae Park wrote: > On Fri, 5 Apr 2024 15:08:50 +0900 Honggyu Kim wrote: > > > This is a preparation patch that introduces migration modes. > > > > The damon_pa_pageout is renamed to damon_pa_migrate and it receiv

Re: [RFC PATCH v3 5/7] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion

2024-04-09 Thread SeongJae Park
Hi Honggyu, On Tue, 9 Apr 2024 18:54:14 +0900 Honggyu Kim wrote: > On Mon, 8 Apr 2024 10:52:28 -0700 SeongJae Park wrote: > > On Mon, 8 Apr 2024 21:06:44 +0900 Honggyu Kim wrote: > > > On Fri, 5 Apr 2024 12:24:30 -0700 SeongJae Park wrote: > > > > On F

Re: [RFC PATCH v3 5/7] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion

2024-04-08 Thread SeongJae Park
On Mon, 8 Apr 2024 21:06:44 +0900 Honggyu Kim wrote: > On Fri, 5 Apr 2024 12:24:30 -0700 SeongJae Park wrote: > > On Fri, 5 Apr 2024 15:08:54 +0900 Honggyu Kim wrote: [...] > > > Here is one of the example usage of this 'migrate_cold' action. > > > > > &g

Re: [RFC PATCH v3 0/7] DAMON based tiered memory management for CXL memory

2024-04-05 Thread SeongJae Park
Hello Honggyu, On Fri, 5 Apr 2024 15:08:49 +0900 Honggyu Kim wrote: > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > posted at [1]. > > It says there is no implementation of the demote/promote DAMOS action > are made. This RFC is about its implementation for

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 vmstat so it also > introduces

Re: [RFC PATCH v3 6/7] mm/damon/paddr: introduce DAMOS_MIGRATE_HOT action for promotion

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 15:08:55 +0900 Honggyu Kim wrote: > From: Hyeongtak Ji > > This patch introduces DAMOS_MIGRATE_HOT action, which is similar to > DAMOS_MIGRATE_COLD, but it is targeted to migrate hot pages. My understanding of our last discussion was that 'HOT/COLD' here is only for

Re: [RFC PATCH v3 5/7] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 16:55:57 +0900 Hyeongtak Ji wrote: > On Fri, 5 Apr 2024 15:08:54 +0900 Honggyu Kim wrote: > > ...snip... > > > +static unsigned long damon_pa_migrate_pages(struct list_head *folio_list, > > + enum migration_mode mm, > > +

Re: [RFC PATCH v3 5/7] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 15:08:54 +0900 Honggyu Kim wrote: > This patch introduces DAMOS_MIGRATE_COLD action, which is similar to > DAMOS_PAGEOUT, but migrate folios to the given 'target_nid' in the sysfs > instead of swapping them out. > > The 'target_nid' sysfs knob is created by this patch to

Re: [RFC PATCH v3 4/7] mm/migrate: add MR_DAMON to migrate_reason

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 15:08:53 +0900 Honggyu Kim wrote: > The current patch series introduces DAMON based migration across NUMA > nodes so it'd be better to have a new migrate_reason in trace events. > > Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Thanks, SJ > --- &

Re: [RFC PATCH v3 2/7] mm: make alloc_demote_folio externally invokable for migration

2024-04-05 Thread SeongJae Park
oc_demote_folio to alloc_migrate_folio. I'm not sure if renaming is really needed, but has no strong opinion. > > Signed-off-by: Honggyu Kim I have one more trivial comment below, but finds no blocker for me. Reviewed-by: SeongJae Park > --- > mm/internal.h | 1 + > mm/vmscan.c | 10

Re: [RFC PATCH v3 1/7] mm/damon/paddr: refactor DAMOS_PAGEOUT with migration_mode

2024-04-05 Thread SeongJae Park
On Fri, 5 Apr 2024 15:08:50 +0900 Honggyu Kim wrote: > This is a preparation patch that introduces migration modes. > > The damon_pa_pageout is renamed to damon_pa_migrate and it receives an > extra argument for migration_mode. I personally think keeping damon_pa_pageout() as is and adding a

Re: [PATCH v9 1/2] memory tier: dax/kmem: introduce an abstract layer for finding, allocating, and putting memory types

2024-03-31 Thread SeongJae Park
Hi Ho-Ren, On Fri, 29 Mar 2024 05:33:52 + "Ho-Ren (Jack) Chuang" wrote: > Since different memory devices require finding, allocating, and putting > memory types, these common steps are abstracted in this patch, > enhancing the scalability and conciseness of the code. > > Signed-off-by:

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-26 Thread SeongJae Park
On Mon, 25 Mar 2024 15:53:03 -0700 SeongJae Park wrote: > On Mon, 25 Mar 2024 21:01:04 +0900 Honggyu Kim wrote: [...] > > On Fri, 22 Mar 2024 09:32:23 -0700 SeongJae Park wrote: > > > On Fri, 22 Mar 2024 18:02:23 +0900 Honggyu Kim wrote: [...] > > > > I would li

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-25 Thread SeongJae Park
On Mon, 25 Mar 2024 21:01:04 +0900 Honggyu Kim wrote: > Hi SeongJae, > > On Fri, 22 Mar 2024 09:32:23 -0700 SeongJae Park wrote: > > On Fri, 22 Mar 2024 18:02:23 +0900 Honggyu Kim wrote: [...] > > > > Honggyu joined DAMON Beer/Coffee/Tea Chat[1] yesterday, and

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-22 Thread SeongJae Park
On Fri, 22 Mar 2024 17:27:34 +0900 Honggyu Kim wrote: [...] > OK. It could be a matter of preference and the current filter is already > in the mainline so I won't insist more. Thank you for accepting my humble suggestion. [...] > > I'd prefer improving the documents or > > user-space tool and

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-22 Thread SeongJae Park
On Fri, 22 Mar 2024 18:02:23 +0900 Honggyu Kim wrote: > Hi SeongJae, > > On Tue, 27 Feb 2024 15:51:20 -0800 SeongJae Park wrote: > > On Mon, 26 Feb 2024 23:05:46 +0900 Honggyu Kim wrote: > > > > > There was an RFC IDEA "DAMOS-based Tiered-Memory Manage

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-20 Thread SeongJae Park
Hi Honggyu, On Wed, 20 Mar 2024 16:07:48 +0900 Honggyu Kim wrote: > Hi SeongJae, > > On Mon, 18 Mar 2024 12:07:21 -0700 SeongJae Park wrote: > > On Mon, 18 Mar 2024 22:27:45 +0900 Honggyu Kim wrote: > > > > > Hi SeongJae, > > > > > > On Sun,

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-18 Thread SeongJae Park
On Mon, 18 Mar 2024 22:27:45 +0900 Honggyu Kim wrote: > Hi SeongJae, > > On Sun, 17 Mar 2024 08:31:44 -0700 SeongJae Park wrote: > > Hi Honggyu, > > > > On Sun, 17 Mar 2024 17:36:29 +0900 Honggyu Kim wrote: > > > > > Hi SeongJae, > > >

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-17 Thread SeongJae Park
On Sun, 17 Mar 2024 08:31:44 -0700 SeongJae Park wrote: > Hi Honggyu, > > On Sun, 17 Mar 2024 17:36:29 +0900 Honggyu Kim wrote: > > > Hi SeongJae, > > > > Thanks for the confirmation. I have a few comments on young filter so > > please read the inline com

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-17 Thread SeongJae Park
Hi Honggyu, On Sun, 17 Mar 2024 17:36:29 +0900 Honggyu Kim wrote: > Hi SeongJae, > > Thanks for the confirmation. I have a few comments on young filter so > please read the inline comments again. > > On Wed, 12 Mar 2024 08:53:00 -0800 SeongJae Park wro

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-03-06 Thread SeongJae Park
Hello, On Tue, 27 Feb 2024 15:51:20 -0800 SeongJae Park wrote: > On Mon, 26 Feb 2024 23:05:46 +0900 Honggyu Kim wrote: > > > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > > posted at [1]. > > > > It says there is no im

Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management for CXL memory

2024-02-27 Thread SeongJae Park
On Mon, 26 Feb 2024 23:05:46 +0900 Honggyu Kim wrote: > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > posted at [1]. > > It says there is no implementation of the demote/promote DAMOS action > are made. This RFC is about its implementation for physical address >

Re: [RFC PATCH 0/4] DAMON based 2-tier memory management for CXL memory

2024-01-18 Thread SeongJae Park
On Thu, 18 Jan 2024 19:40:16 +0900 Hyeongtak Ji wrote: > Hi SeongJae, > > On Wed, 17 Jan 2024 SeongJae Park wrote: > > [...] > >> Let's say there are 3 nodes in the system and the first node0 and node1 > >> are the first tier, and node2 is the second tier

Re: [RFC PATCH 0/4] DAMON based 2-tier memory management for CXL memory

2024-01-17 Thread SeongJae Park
On Wed, 17 Jan 2024 13:11:03 -0800 SeongJae Park wrote: [...] > Hi Honggyu, > > On Wed, 17 Jan 2024 20:49:25 +0900 Honggyu Kim wrote: > > > Hi SeongJae, > > > > Thanks very much for your comments in details. > > > > On Tue, 16 Ja

Re: [RFC PATCH 0/4] DAMON based 2-tier memory management for CXL memory

2024-01-17 Thread SeongJae Park
Hi Honggyu, On Wed, 17 Jan 2024 20:49:25 +0900 Honggyu Kim wrote: > Hi SeongJae, > > Thanks very much for your comments in details. > > On Tue, 16 Jan 2024 12:31:59 -0800 SeongJae Park wrote: > > > Thank you so much for this great patches and the above nice test

Re: [RFC PATCH 2/4] mm/damon: introduce DAMOS_DEMOTE action for demotion

2024-01-16 Thread SeongJae Park
On Mon, 15 Jan 2024 13:52:50 +0900 Honggyu Kim wrote: > This patch introduces DAMOS_DEMOTE action, which is similar to > DAMOS_PAGEOUT, but demote folios instead of swapping them out. > > Since there are some common routines with pageout, many functions have > similar logics between pageout and

Re: [RFC PATCH 1/4] mm/vmscan: refactor reclaim_pages with reclaim_or_migrate_folios

2024-01-16 Thread SeongJae Park
On Mon, 15 Jan 2024 13:52:49 +0900 Honggyu Kim wrote: > Since we will introduce reclaim_pages like functions such as > demote_pages and promote_pages, the most of the code can be shared. > > This is a preparation patch that introduces reclaim_or_migrate_folios() > to cover all the logics, but

Re: [RFC PATCH 4/4] mm/damon: introduce DAMOS_PROMOTE action for promotion

2024-01-16 Thread SeongJae Park
On Mon, 15 Jan 2024 13:52:52 +0900 Honggyu Kim wrote: > From: Hyeongtak Ji > > This patch introduces DAMOS_PROMOTE action for paddr mode. > > It includes renaming alloc_demote_folio to alloc_migrate_folio to use it > for promotion as well. > > The execution sequence of DAMOS_DEMOTE and

Re: [RFC PATCH 3/4] mm/memory-tiers: add next_promotion_node to find promotion target

2024-01-16 Thread SeongJae Park
On Mon, 15 Jan 2024 13:52:51 +0900 Honggyu Kim wrote: > From: Hyeongtak Ji > > This patch adds next_promotion_node that can be used to identify the > appropriate promotion target based on memory tiers. When multiple > promotion target nodes are available, the nearest node is selected based >

Re: [RFC PATCH 0/4] DAMON based 2-tier memory management for CXL memory

2024-01-16 Thread SeongJae Park
Hello, On Mon, 15 Jan 2024 13:52:48 +0900 Honggyu Kim wrote: > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > posted at [1]. > > It says there is no implementation of the demote/promote DAMOS action > are made. This RFC is about its implementation for physical

Re: [PATCH v3] vmscan: add trace events for lru_gen

2023-09-25 Thread SeongJae Park
Hello, On Sun, 24 Sep 2023 23:23:43 +0900 Jaewon Kim wrote: > As the legacy lru provides, the lru_gen needs some trace events for > debugging. > > This commit introduces 2 trace events. > trace_mm_vmscan_lru_gen_scan > trace_mm_vmscan_lru_gen_evict > > Each event is similar to the

[PATCH 3/9] mm/damon/core: use nr_accesses_bp as a source of damos_before_apply tracepoint

2023-09-15 Thread SeongJae Park
that it doesn't expose the value as is in the basis point, but after converting it to the natural number by dividing it by 10,000. Therefore this change doesn't make user-visible behavioral differences. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH RESEND v2 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-12 Thread SeongJae Park
' action is used). Until now, only statistics or snapshots were supported. Addition of this tracepoint allows efficient full recording of DAMOS-based filtered monitoring results. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 39 mm/damon

[PATCH v2 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-12 Thread SeongJae Park
' action is used). Until now, only statistics or snapshots were supported. Addition of this tracepoint allows efficient full recording of DAMOS-based filtered monitoring results. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 39 mm/damon

Re: [PATCH 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-11 Thread SeongJae Park
On Mon, 11 Sep 2023 16:51:44 -0400 Steven Rostedt wrote: > On Mon, 11 Sep 2023 20:36:42 + > SeongJae Park wrote: > > > > Then tracing is fully enabled here, and now we enter: > > > > > > if (trace_damos_before_apply_enabled()) { > > >

Re: [PATCH 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-11 Thread SeongJae Park
Hi Steven, On Mon, 11 Sep 2023 14:19:55 -0400 Steven Rostedt wrote: > On Mon, 11 Sep 2023 04:59:07 + > SeongJae Park wrote: > > > --- a/mm/damon/core.c > > +++ b/mm/damon/core.c > > @@ -950,6 +950,28 @@ static void damos_apply_scheme(struct damon_ctx *c,

Re: [PATCH 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-11 Thread SeongJae Park
On Mon, 11 Sep 2023 16:31:27 -0400 Steven Rostedt wrote: > On Mon, 11 Sep 2023 19:05:04 + > SeongJae Park wrote: > > > > Also, this if statement is only done when the trace event is enabled, so > > > it's equivalent to: > > > > >

[PATCH 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-10 Thread SeongJae Park
' action is used). Until now, only statistics or snapshots were supported. Addition of this tracepoint allows efficient full recording of DAMOS-based filtered monitoring results. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 37 mm/damon

[RFC 3/8] mm/damon/core: expose nr_accesses_bp from damos_before_apply tracepoint

2023-09-09 Thread SeongJae Park
the value as is in the basis point, but after converting it to the natural number by dividing it by 10,000. That's for avoiding confuses for old users. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events

Re: [PATCH v2 00/16] Multigenerational LRU Framework

2021-04-13 Thread SeongJae Park
From: SeongJae Park On Tue, 13 Apr 2021 10:13:24 -0600 Jens Axboe wrote: > On 4/13/21 1:51 AM, SeongJae Park wrote: > > From: SeongJae Park > > > > Hello, > > > > > > Very interesting work, thank you for sharing this :) > > > >

[PATCH v28 11/13] mm/damon: Add kunit tests

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit adds kunit based unit tests for the core and the virtual address spaces monitoring primitives of DAMON. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins --- mm/damon/Kconfig | 36 + mm/damon/core-test.h | 253

[PATCH v28 12/13] mm/damon: Add user space selftests

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit adds a simple user space tests for DAMON. The tests are using kselftest framework. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/Makefile| 7 ++ .../selftests/damon/_chk_dependency.sh| 28 ++ .../testing/selftests/damon

[PATCH v28 10/13] Documentation: Add documents for DAMON

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit adds documents for DAMON under `Documentation/admin-guide/mm/damon/` and `Documentation/vm/damon/`. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/guide.rst | 158 + Documentation/admin-guide/mm/damon/index.rst | 15

[PATCH v28 13/13] MAINTAINERS: Update for DAMON

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit updates MAINTAINERS file for DAMON related files. Signed-off-by: SeongJae Park --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4d68184d3f76..42bbcaec5050 100644 --- a/MAINTAINERS +++ b

[PATCH v28 08/13] mm/damon/dbgfs: Export kdamond pid to the user space

2021-04-13 Thread SeongJae Park
From: SeongJae Park For CPU usage accounting, knowing pid of the monitoring thread could be helpful. For example, users could use cpuaccount cgroups with the pid. This commit therefore exports the pid of currently running monitoring thread to the user space via 'kdamond_pid' file

[PATCH v28 09/13] mm/damon/dbgfs: Support multiple contexts

2021-04-13 Thread SeongJae Park
From: SeongJae Park In some use cases, users would want to run multiple monitoring context. For example, if a user wants a high precision monitoring and dedicating multiple CPUs for the job is ok, because DAMON creates one monitoring thread per one context, the user can split the monitoring

[PATCH v28 05/13] mm/damon: Implement primitives for the virtual memory address spaces

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit introduces a reference implementation of the address space specific low level primitives for the virtual address space, so that users of DAMON can easily monitor the data accesses on virtual address spaces of specific processes by simply configuring

[PATCH v28 03/13] mm/damon: Adaptively adjust regions

2021-04-13 Thread SeongJae Park
From: SeongJae Park Even somehow the initial monitoring target regions are well constructed to fulfill the assumption (pages in same region have similar access frequencies), the data access pattern can be dynamically changed. This will result in low monitoring quality. To keep the assumption

[PATCH v28 06/13] mm/damon: Add a tracepoint

2021-04-13 Thread SeongJae Park
From: SeongJae Park This commit adds a tracepoint for DAMON. It traces the monitoring results of each region for each aggregation interval. Using this, DAMON can easily integrated with tracepoints supporting tools such as perf. Signed-off-by: SeongJae Park Reviewed-by: Leonard Foerster

[PATCH v28 07/13] mm/damon: Implement a debugfs-based user space interface

2021-04-13 Thread SeongJae Park
From: SeongJae Park DAMON is designed to be used by kernel space code such as the memory management subsystems, and therefore it provides only kernel space API. That said, letting the user space control DAMON could provide some benefits to them. For example, it will allow user space to analyze

[PATCH v28 01/13] mm: Introduce Data Access MONitor (DAMON)

2021-04-13 Thread SeongJae Park
From: SeongJae Park DAMON is a data access monitoring framework for the Linux kernel. The core mechanisms of DAMON make it - accurate (the monitoring output is useful enough for DRAM level performance-centric memory management; It might be inappropriate for CPU cache levels, though

[PATCH v28 04/13] mm/idle_page_tracking: Make PG_idle reusable

2021-04-13 Thread SeongJae Park
From: SeongJae Park PG_idle and PG_young allow the two PTE Accessed bit users, Idle Page Tracking and the reclaim logic concurrently work while don't interfere each other. That is, when they need to clear the Accessed bit, they set PG_young to represent the previous state of the bit

[PATCH v28 02/13] mm/damon/core: Implement region-based sampling

2021-04-13 Thread SeongJae Park
From: SeongJae Park To avoid the unbounded increase of the overhead, DAMON groups adjacent pages that are assumed to have the same access frequencies into a region. As long as the assumption (pages in a region have the same access frequencies) is kept, only one page in the region is required

[PATCH v28 00/13] Introduce Data Access MONitor (DAMON)

2021-04-13 Thread SeongJae Park
From: SeongJae Park Changes from Previous Version (v27) === - Rebase on latest -mm tree (v5.12-rc7-mmots-2021-04-11-20-49) - dbgfs: Fix wrong failure handlings (Stefan Nuernberger) - dbgfs: Change return type of 'dbgfs_fill_ctx_dir()' to void (Greg KH

Re: [PATCH v2 00/16] Multigenerational LRU Framework

2021-04-13 Thread SeongJae Park
From: SeongJae Park Hello, Very interesting work, thank you for sharing this :) On Tue, 13 Apr 2021 00:56:17 -0600 Yu Zhao wrote: > What's new in v2 > > Special thanks to Jens Axboe for reporting a regression in buffered > I/O and helping test the fix. Is th

Re: [PATCH v27 07/13] mm/damon: Implement a debugfs-based user space interface

2021-04-12 Thread SeongJae Park
From: SeongJae Park On Thu, 8 Apr 2021 13:48:48 + SeongJae Park wrote: > From: SeongJae Park > > DAMON is designed to be used by kernel space code such as the memory > management subsystems, and therefore it provides only kernel space API. > That said, letting the use

Re: [PATCH v27 07/13] mm/damon: Implement a debugfs-based user space interface

2021-04-10 Thread SeongJae Park
From: SeongJae Park On Sat, 10 Apr 2021 10:55:01 +0200 Greg KH wrote: > On Thu, Apr 08, 2021 at 01:48:48PM +0000, SeongJae Park wrote: > > +static int dbgfs_fill_ctx_dir(struct dentry *dir, struct damon_ctx *ctx) > > +{ > > + const char * const file_names[] =

[PATCH v27 13/13] MAINTAINERS: Update for DAMON

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit updates MAINTAINERS file for DAMON related files. Signed-off-by: SeongJae Park --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ad650102f950..0df746019eb9 100644 --- a/MAINTAINERS +++ b

[PATCH v27 12/13] mm/damon: Add user space selftests

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit adds a simple user space tests for DAMON. The tests are using kselftest framework. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/Makefile| 7 ++ .../selftests/damon/_chk_dependency.sh| 28 ++ .../testing/selftests/damon

[PATCH v27 10/13] Documentation: Add documents for DAMON

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit adds documents for DAMON under `Documentation/admin-guide/mm/damon/` and `Documentation/vm/damon/`. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/guide.rst | 158 + Documentation/admin-guide/mm/damon/index.rst | 15

[PATCH v27 11/13] mm/damon: Add kunit tests

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit adds kunit based unit tests for the core and the virtual address spaces monitoring primitives of DAMON. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins --- mm/damon/Kconfig | 36 + mm/damon/core-test.h | 253

[PATCH v27 08/13] mm/damon/dbgfs: Export kdamond pid to the user space

2021-04-08 Thread SeongJae Park
From: SeongJae Park For CPU usage accounting, knowing pid of the monitoring thread could be helpful. For example, users could use cpuaccount cgroups with the pid. This commit therefore exports the pid of currently running monitoring thread to the user space via 'kdamond_pid' file

[PATCH v27 09/13] mm/damon/dbgfs: Support multiple contexts

2021-04-08 Thread SeongJae Park
From: SeongJae Park In some use cases, users would want to run multiple monitoring context. For example, if a user wants a high precision monitoring and dedicating multiple CPUs for the job is ok, because DAMON creates one monitoring thread per one context, the user can split the monitoring

[PATCH v27 07/13] mm/damon: Implement a debugfs-based user space interface

2021-04-08 Thread SeongJae Park
From: SeongJae Park DAMON is designed to be used by kernel space code such as the memory management subsystems, and therefore it provides only kernel space API. That said, letting the user space control DAMON could provide some benefits to them. For example, it will allow user space to analyze

[PATCH v27 06/13] mm/damon: Add a tracepoint

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit adds a tracepoint for DAMON. It traces the monitoring results of each region for each aggregation interval. Using this, DAMON can easily integrated with tracepoints supporting tools such as perf. Signed-off-by: SeongJae Park Reviewed-by: Leonard Foerster

[PATCH v27 05/13] mm/damon: Implement primitives for the virtual memory address spaces

2021-04-08 Thread SeongJae Park
From: SeongJae Park This commit introduces a reference implementation of the address space specific low level primitives for the virtual address space, so that users of DAMON can easily monitor the data accesses on virtual address spaces of specific processes by simply configuring

[PATCH v27 03/13] mm/damon: Adaptively adjust regions

2021-04-08 Thread SeongJae Park
From: SeongJae Park Even somehow the initial monitoring target regions are well constructed to fulfill the assumption (pages in same region have similar access frequencies), the data access pattern can be dynamically changed. This will result in low monitoring quality. To keep the assumption

[PATCH v27 04/13] mm/idle_page_tracking: Make PG_idle reusable

2021-04-08 Thread SeongJae Park
From: SeongJae Park PG_idle and PG_young allow the two PTE Accessed bit users, Idle Page Tracking and the reclaim logic concurrently work while don't interfere each other. That is, when they need to clear the Accessed bit, they set PG_young to represent the previous state of the bit

[PATCH v27 02/13] mm/damon/core: Implement region-based sampling

2021-04-08 Thread SeongJae Park
From: SeongJae Park To avoid the unbounded increase of the overhead, DAMON groups adjacent pages that are assumed to have the same access frequencies into a region. As long as the assumption (pages in a region have the same access frequencies) is kept, only one page in the region is required

[PATCH v27 01/13] mm: Introduce Data Access MONitor (DAMON)

2021-04-08 Thread SeongJae Park
From: SeongJae Park DAMON is a data access monitoring framework for the Linux kernel. The core mechanisms of DAMON make it - accurate (the monitoring output is useful enough for DRAM level performance-centric memory management; It might be inappropriate for CPU cache levels, though

[PATCH v27 00/13] Introduce Data Access MONitor (DAMON)

2021-04-08 Thread SeongJae Park
From: SeongJae Park Changes from Previous Version (v26) === - Rebase on latest -mm tree (v5.12-rc6-mmots-2021-04-06-22-33) - Check kmalloc() failures in dbgfs init (Greg KH) - Fix a typo: s/stollen/stolen/ (Stefan Nuernberger) - Update document for updated user

Re: [PATCH v26 07/13] mm/damon: Implement a debugfs-based user space interface

2021-03-30 Thread SeongJae Park
From: SeongJae Park On Tue, 30 Mar 2021 09:59:50 + SeongJae Park wrote: > From: SeongJae Park > > On Tue, 30 Mar 2021 11:22:45 +0200 Greg KH wrote: > > > On Tue, Mar 30, 2021 at 09:05:31AM +, sj38.p...@gmail.com wrote: > > > +static int __i

Re: [PATCH v26 07/13] mm/damon: Implement a debugfs-based user space interface

2021-03-30 Thread SeongJae Park
From: SeongJae Park On Tue, 30 Mar 2021 11:22:45 +0200 Greg KH wrote: > On Tue, Mar 30, 2021 at 09:05:31AM +, sj38.p...@gmail.com wrote: > > +static int __init __damon_dbgfs_init(void) > > +{ > > + struct dentry *dbgfs_root; > > + const char * const

Re: [PATCH v25 05/13] mm/damon: Implement primitives for the virtual memory address spaces

2021-03-26 Thread SeongJae Park
From: SeongJae Park On Thu, 18 Mar 2021 10:08:48 + sj38.p...@gmail.com wrote: > From: SeongJae Park > > This commit introduces a reference implementation of the address space > specific low level primitives for the virtual address space, so that > users of DAMON can

Re: [PATCH v2] mm/shmem: Enclose shmem_mcopy_atomic_pte() with 'CONFIG_USERFAULTFD'

2021-03-16 Thread SeongJae Park
t all, thank you for letting me know! :) FYI, I tested on 'master' of https://github.com/hnaz/linux-mm. Thanks, SeongJae Park [...] Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenbu

[PATCH v2] mm/shmem: Enclose shmem_mcopy_atomic_pte() with 'CONFIG_USERFAULTFD'

2021-03-16 Thread SeongJae Park
From: SeongJae Park Commit 49eeab03fa0a ("userfaultfd: support minor fault handling for shmem") introduced shmem_mcopy_atomic_pte(). The function is declared in 'userfaultfd_k.h' when 'CONFIG_USERFAULTFD' is defined, and defined as 'BUG()' if the config is unset. However, the

[PATCH] mm/shmem: Enclose shmem_mcopy_atomic_pte() with 'CONFIG_USERFAULTFD'

2021-03-16 Thread SeongJae Park
From: SeongJae Park Commit 49eeab03fa0a ("userfaultfd: support minor fault handling for shmem") introduced shmem_mcopy_atomic_pte(). The function is declared in 'userfaultfd_k.h' when 'CONFIG_USERFAULTFD' is defined, and defined as 'BUG()' if the config is unset. However, the

Re: [PATCH] docs/kokr: make sections on bug reporting match practice

2021-03-16 Thread SeongJae Park
ping? On Mon, 8 Mar 2021 08:57:01 +0100 SeongJae Park wrote: > From: SeongJae Park > > Translate this commit to Korean: > > cf6d6fc27936 ("docs: process/howto.rst: make sections on bug reporting > match practice") > > Signed-off-by: SeongJae Park &

[PATCH] docs/kokr: make sections on bug reporting match practice

2021-03-07 Thread SeongJae Park
From: SeongJae Park Translate this commit to Korean: cf6d6fc27936 ("docs: process/howto.rst: make sections on bug reporting match practice") Signed-off-by: SeongJae Park --- Documentation/translations/ko_KR/howto.rst | 18 +- 1 file changed, 9 insertions(+), 9

Re: [PATCH v24 00/14] Subject: Introduce Data Access MONitor (DAMON)

2021-03-04 Thread SeongJae Park
On Thu, 4 Feb 2021 16:31:36 +0100 SeongJae Park wrote: > From: SeongJae Park [...] > > Introduction > > > DAMON is a data access monitoring framework for the Linux kernel. The core > mechanisms of DAMON called 'region based sampling' and 'adaptive regions

[PATCH v24 11/14] Documentation: Add documents for DAMON

2021-03-03 Thread SeongJae Park
From: SeongJae Park This commit adds documents for DAMON under `Documentation/admin-guide/mm/damon/` and `Documentation/vm/damon/`. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/guide.rst | 159 ++ Documentation/admin-guide/mm/damon/index.rst | 15

[PATCH v24 10/14] mm/damon/dbgfs: Support multiple contexts

2021-03-03 Thread SeongJae Park
From: SeongJae Park In some use cases, users would want to run multiple monitoring context. For example, if a user wants a high precision monitoring and dedicating multiple CPUs for the job is ok, because DAMON creates one monitoring thread per one context, the user can split the monitoring

Re: Please apply "xen-netback: delete NAPI instance when queue fails to initialize" to v4.4.y

2021-02-24 Thread SeongJae Park
On Wed, 24 Feb 2021 18:21:09 +0100 Greg KH wrote: > On Wed, Feb 24, 2021 at 06:03:56PM +0100, SeongJae Park wrote: > > This is a request for merge of upstream commit 4a658527271b ("xen-netback: > > delete NAPI instance when queue fails to initialize") on v4.4.y tree. &g

Please apply "xen-netback: delete NAPI instance when queue fails to initialize" to v4.4.y

2021-02-24 Thread SeongJae Park
its error handling code, if the 'xenvif_free()' is called for the vif, use-after-free occurs. The upstream commit fixes the problem by cleaning up the napi in the 'xenvif_connect()'. Attaching the original patch below for your convenience. Tested-by: Markus Boehme Thanks, Seo

Re: [PATCH v24 00/14] Subject: Introduce Data Access MONitor (DAMON)

2021-02-24 Thread SeongJae Park
On Thu, 4 Feb 2021 16:31:36 +0100 SeongJae Park wrote: > From: SeongJae Park > [...] > > Introduction > > > DAMON is a data access monitoring framework for the Linux kernel. The core > mechanisms of DAMON called 'region based sampling' and 'adaptive regi

Re: [PATCH v24 11/14] Documentation: Add documents for DAMON

2021-02-23 Thread SeongJae Park
On Thu, 4 Feb 2021 16:31:47 +0100 SeongJae Park wrote: > From: SeongJae Park > > This commit adds documents for DAMON under > `Documentation/admin-guide/mm/damon/` and `Documentation/vm/damon/`. > > Signed-off-by: SeongJae Park > --- > Documentation/admin-guide/

Re: [PATCH v24 07/14] mm/damon: Implement a debugfs-based user space interface

2021-02-05 Thread SeongJae Park
On Fri, 5 Feb 2021 16:29:41 +0100 Greg KH wrote: > On Thu, Feb 04, 2021 at 04:31:43PM +0100, SeongJae Park wrote: > > From: SeongJae Park > > > > DAMON is designed to be used by kernel space code such as the memory > > management subsystems, and therefore it pro

[PATCH v24 05/14] mm/damon: Implement primitives for the virtual memory address spaces

2021-02-04 Thread SeongJae Park
From: SeongJae Park This commit introduces a reference implementation of the address space specific low level primitives for the virtual address space, so that users of DAMON can easily monitor the data accesses on virtual address spaces of specific processes by simply configuring

[PATCH v24 14/14] MAINTAINERS: Update for DAMON

2021-02-04 Thread SeongJae Park
From: SeongJae Park This commit updates MAINTAINERS file for DAMON related files. Signed-off-by: SeongJae Park --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 281de213ef47..88b2125b0f07 100644 --- a/MAINTAINERS +++ b

[PATCH v24 13/14] mm/damon: Add user space selftests

2021-02-04 Thread SeongJae Park
From: SeongJae Park This commit adds a simple user space tests for DAMON. The tests are using kselftest framework. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/Makefile| 7 + .../selftests/damon/_chk_dependency.sh| 28 +++ tools/testing/selftests/damon

[PATCH v24 12/14] mm/damon: Add kunit tests

2021-02-04 Thread SeongJae Park
From: SeongJae Park This commit adds kunit based unit tests for the core and the virtual address spaces monitoring primitives of DAMON. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins --- mm/damon/Kconfig | 36 + mm/damon/core-test.h | 253

[PATCH v24 09/14] mm/damon/dbgfs: Export kdamond pid to the user space

2021-02-04 Thread SeongJae Park
From: SeongJae Park For CPU usage accounting, knowing pid of the monitoring thread could be helpful. For example, users could use cpuaccount cgroups with the pid. This commit therefore exports the pid of currently running monitoring thread to the user space via 'kdamond_pid' file

[PATCH v24 08/14] mm/damon/dbgfs: Implement recording feature

2021-02-04 Thread SeongJae Park
From: SeongJae Park The user space users can control DAMON and get the monitoring results via the 'damon_aggregated' tracepoint event. However, dealing with the tracepoint might be complex for some simple use cases. This commit therefore implements 'recording' feature in 'damon-dbgfs

[PATCH v24 06/14] mm/damon: Add a tracepoint

2021-02-04 Thread SeongJae Park
From: SeongJae Park This commit adds a tracepoint for DAMON. It traces the monitoring results of each region for each aggregation interval. Using this, DAMON can easily integrated with tracepoints supporting tools such as perf. Signed-off-by: SeongJae Park Reviewed-by: Leonard Foerster

  1   2   3   4   5   6   7   8   9   10   >