[PATCH 1/3] tools lib traceevent: Add -O2 option to traceevent

2016-10-17 Thread Honggyu Kim
Since current traceevent somehow does not have an optimization flag, this patch just adds -O2 to optimize its code. Signed-off-by: Honggyu Kim <hong.gyu@lge.com> --- tools/lib/traceevent/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/trac

[PATCH 2/3] tools lib traceevent: Check the return value of asprintf

2016-10-17 Thread Honggyu Kim
Since asprintf generates a compiler warning when its return value is not not properly handled, this patch checks that asprintf call is successful or not. Signed-off-by: Honggyu Kim <hong.gyu@lge.com> --- tools/lib/traceevent/parse-filter.c | 29 +++-- 1 file c

[PATCH 3/3] tools lib traceevent: Fix to set uninitialized variables

2016-10-17 Thread Honggyu Kim
y be used uninitialized in this function [-Wmaybe-uninitialized] kbuf->next = kbuf->index + length; ^ kbuffer-parse.c:297:15: note: ‘length’ was declared here unsigned int length; ^ Signed-off-by: Honggyu Kim <hong.gyu@lge.com> ---

[PATCH 1/3] tools lib traceevent: Add -O2 option to traceevent

2016-10-17 Thread Honggyu Kim
Since current traceevent somehow does not have an optimization flag, this patch just adds -O2 to optimize its code. Signed-off-by: Honggyu Kim --- tools/lib/traceevent/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib

[PATCH 2/3] tools lib traceevent: Check the return value of asprintf

2016-10-17 Thread Honggyu Kim
Since asprintf generates a compiler warning when its return value is not not properly handled, this patch checks that asprintf call is successful or not. Signed-off-by: Honggyu Kim --- tools/lib/traceevent/parse-filter.c | 29 +++-- 1 file changed, 19 insertions(+), 10

[PATCH 3/3] tools lib traceevent: Fix to set uninitialized variables

2016-10-17 Thread Honggyu Kim
y be used uninitialized in this function [-Wmaybe-uninitialized] kbuf->next = kbuf->index + length; ^ kbuffer-parse.c:297:15: note: ‘length’ was declared here unsigned int length; ^ Signed-off-by: Honggyu Kim --- tools/lib/traceevent/event-pa

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

2024-01-14 Thread Honggyu Kim
256GB of local DRAM and 96GB of CXL memory. The performance slowdown is reduced from 20~24% for "default" to 5~7% for "DAMON 2-tier". Having these DAMOS_DEMOTE and DAMOS_PROMOTE actions can make 2-tier memory systems run more efficiently under high memory pressures. Signed-off-by

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

2024-01-14 Thread Honggyu Kim
changes applied. Signed-off-by: Honggyu Kim --- mm/vmscan.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index bba207f41b14..7ca2396ccc3b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2107,15 +2107,16 @@ static unsigned int

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

2024-01-14 Thread Honggyu Kim
-> __promote_folio_list -> promote_folio_list Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim --- include/linux/damon.h | 2 + include/linux/migrate_mode.h | 1 + include/linux/vm_event_item.h | 1 + include/trace/events/migrate.h | 3 +- mm/damon/paddr.c

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

2024-01-14 Thread Honggyu Kim
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 on numa distance. Signed-off-by: Hyeongtak Ji ---

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

2024-01-14 Thread Honggyu Kim
do_demote_folio_list -> __demote_folio_list -> demote_folio_list __demote_folio_list() is a minimized version of shrink_folio_list(), but it's minified only for demotion. Signed-off-by: Honggyu Kim --- include/linux/damon.h| 2 + mm/damon/paddr.c | 17 +--- mm/damon/sysfs-sche

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

2024-01-17 Thread Honggyu Kim
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 results. I > believe the test setup and results make sense, and merging a revised version > of > this

[PATCH v2 2/7] mm: make alloc_demote_folio externally invokable for migration

2024-02-26 Thread Honggyu Kim
The alloc_demote_folio can be used out of vmscan.c so it'd be better to remove static keyword from it. This function can also be used for both demotion and promotion so it'd be better to rename it from alloc_demote_folio to alloc_migrate_folio. Signed-off-by: Honggyu Kim --- mm/internal.h | 1

[PATCH v2 3/7] mm/damon: introduce DAMOS_DEMOTE action for demotion

2024-02-26 Thread Honggyu Kim
of shrink_folio_list(), but it's minified only for demotion. Signed-off-by: Honggyu Kim Signed-off-by: Hyeongtak Ji --- include/linux/damon.h| 2 + mm/damon/paddr.c | 222 ++- mm/damon/sysfs-schemes.c | 1 + 3 files changed, 224 insertions(+), 1

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

2024-02-26 Thread Honggyu Kim
256GB of local DRAM and 96GB of CXL memory. The performance slowdown is reduced from 20~24% for "default" to 5~7% for "DAMON 2-tier". Having these DAMOS_DEMOTE and DAMOS_PROMOTE actions can make 2-tier memory systems run more efficiently under high memory pressures. Signed-off-by

[PATCH v2 1/7] mm/damon: refactor DAMOS_PAGEOUT with migration_mode

2024-02-26 Thread Honggyu Kim
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. No functional changes applied. Signed-off-by: Honggyu Kim --- mm/damon/paddr.c | 18 +++--- 1 file changed, 15

[PATCH v2 6/7] mm/damon/sysfs-schemes: add target_nid on sysfs-schemes

2024-02-26 Thread Honggyu Kim
From: Hyeongtak Ji This patch adds target_nid under /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes/ target_nid can be used as the destination node for DAMOS actions such as DAMOS_DEMOTE or DAMOS_PROMOTE in the future. Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim

[PATCH v2 5/7] mm/damon: introduce DAMOS_PROMOTE action for promotion

2024-02-26 Thread Honggyu Kim
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. Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim --- include/linux/damon.h | 2 ++ include/linux

[PATCH v2 7/7] mm/damon/sysfs-schemes: apply target_nid for promote and demote actions

2024-02-26 Thread Honggyu Kim
Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim --- mm/damon/paddr.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 37a7b34a36dd..5e057a69464f 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c

[PATCH v2 4/7] mm/memory-tiers: add next_promotion_node to find promotion target

2024-02-26 Thread Honggyu Kim
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 on numa distance. Signed-off-by: Hyeongtak Ji ---

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

2024-03-08 Thread Honggyu Kim
; > 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

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

2024-03-18 Thread Honggyu Kim
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, > > > > Thanks for the confirmation. I have a few comments on young filter so > > p

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

2024-03-18 Thread Honggyu Kim
Hi SeongJae, On Sun, 17 Mar 2024 12:13:57 -0700 SeongJae Park wrote: > 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-22 Thread Honggyu Kim
Hi SeongJae, On Wed, 20 Mar 2024 09:56:19 -0700 SeongJae Park wrote: > 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

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

2024-03-22 Thread Honggyu Kim
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 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-03-17 Thread Honggyu Kim
; Sent: Tuesday, March 12, 2024 3:33 AM > > > To: Honggyu Kim > > > Cc: SeongJae Park ; kernel_team > > > Subject: RE: Re: [RFC PATCH v2 0/7] DAMON based 2-tier memory management > > > for CXL memory > > > > > > Hi Honggyu, > > > > &

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

2024-03-20 Thread Honggyu Kim
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, 17 Mar 2024 08:31:44 -0700 SeongJae Park wrote: > > > Hi Honggyu, > > > > > > On

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

2024-03-25 Thread Honggyu Kim
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: > > > Hi SeongJae, > > > > On Tue, 27 Feb 2024 15:51:20 -0800 SeongJae Park wrote: > > > On Mon, 26 Feb 2024

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

2024-04-09 Thread Honggyu Kim
Hi SeongJae, 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 Fri, 5 Apr 2024 15:08:54 +0900 Honggyu Kim wrote: > [...] > >

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

2024-04-09 Thread Honggyu Kim
On Mon, 8 Apr 2024 22:41:04 +0900 Honggyu Kim wrote: [...] > To explain this, I better share more test results. In the section of > "Evaluation Workload", the test sequence can be summarized as follows. > > *. "Turn on DAMON." > 1. Allocate cold memory(m

[RFC PATCH v3 3/7] mm/damon/sysfs-schemes: add target_nid on sysfs-schemes

2024-04-05 Thread Honggyu Kim
From: Hyeongtak Ji This patch adds target_nid under /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes// The 'target_nid' can be used as the destination node for DAMOS actions such as DAMOS_MIGRATE_{HOT,COLD} in the follow up patches. Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu

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

2024-04-05 Thread 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 --- include/linux/migrate_mode.h | 1 + include/trace/events/migrate.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion

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

2024-04-05 Thread Honggyu Kim
folio_list() is a minimized version of shrink_folio_list(), but it's minified only for demotion. Signed-off-by: Honggyu Kim Signed-off-by: Hyeongtak Ji --- include/linux/damon.h| 2 + mm/damon/paddr.c | 146 ++- mm/damon/sysfs-schemes.c | 4 ++ 3 files ch

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

2024-04-05 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

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

2024-04-05 Thread Honggyu Kim
Node 0 Node 1 Node 2 Total -- -- -- -- - 701 (hot_cold) 501 0601 1101 Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim --- include/linux/damon.h| 2 ++ mm/damon/paddr.c | 12 ++-- mm/damon/sysfs-schemes.c | 4 +++- 3 fil

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

2024-04-05 Thread Honggyu Kim
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

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

2024-04-05 Thread Honggyu Kim
The alloc_demote_folio can be used out of vmscan.c so it'd be better to remove static keyword from it. This function can also be used for both demotion and promotion so it'd be better to rename it from alloc_demote_folio to alloc_migrate_folio. Signed-off-by: Honggyu Kim --- mm/internal.h | 1

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

2024-04-05 Thread Honggyu Kim
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. No functional changes applied. Signed-off-by: Honggyu Kim --- mm/damon/paddr.c | 18 +++--- 1 file changed, 15

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

2024-04-05 Thread Honggyu Kim
Hi SeongJae, On Tue, 26 Mar 2024 16:03:09 -0700 SeongJae Park wrote: > 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: > >

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

2024-04-08 Thread Honggyu Kim
Hi Gregory, On Fri, 5 Apr 2024 12:56:14 -0400 Gregory Price wrote: > On Fri, Apr 05, 2024 at 03:08:49PM +0900, Honggyu Kim wrote: > > There was an RFC IDEA "DAMOS-based Tiered-Memory Management" previously > > posted at [1]. > > > > 1. YCSB zi

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

2024-04-08 Thread Honggyu Kim
On Fri, 5 Apr 2024 12:24:30 -0700 SeongJae Park wrote: > 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 > >

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

2024-04-08 Thread Honggyu Kim
Hi SeongJae, On Fri, 5 Apr 2024 12:28:00 -0700 SeongJae Park wrote: > 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]. > >