[PATCH v5 0/8] DAMON based tiered memory management for CXL memory

2024-06-13 Thread Honggyu Kim
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 patch series is about its implementation for physical address space so that this scheme can be applied in system wide level.

[PATCH v5 3/8] mm/damon/sysfs-schemes: add target_nid on sysfs-schemes

2024-06-13 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 Ki

[PATCH v5 1/8] mm: make alloc_demote_folio externally invokable for migration

2024-06-13 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. Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park --- mm/internal.h | 1 + mm/vmscan.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v5 2/8] mm: rename alloc_demote_folio to alloc_migrate_folio

2024-06-13 Thread Honggyu Kim
The alloc_demote_folio can also be used for general migration including 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 | 2 +- mm/vmscan.c | 4 ++-- 2 files changed, 3 insertions(+), 3 dele

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-13 Thread Cindy Lu
On Thu, Jun 13, 2024 at 2:59 PM Michael S. Tsirkin wrote: > > On Tue, Jun 11, 2024 at 01:32:32PM +0800, Cindy Lu wrote: > > Add new UAPI to support the mac address from vdpa tool > > Function vdpa_nl_cmd_dev_config_set_doit() will get the > > MAC address from the vdpa tool and then set it to the d

[PATCH 5/8] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion

2024-06-13 Thread Honggyu Kim
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 informs the migration target node ID. Here is one of the example usage of this 'migrate_cold' act

[PATCH 2/8] mm: rename alloc_demote_folio to alloc_migrate_folio

2024-06-13 Thread Honggyu Kim
The alloc_demote_folio can also be used for general migration including 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 | 2 +- mm/vmscan.c | 4 ++-- 2 files changed, 3 insertions(+), 3 dele

[PATCH 3/8] mm/damon/sysfs-schemes: add target_nid on sysfs-schemes

2024-06-13 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 Ki

[PATCH 1/8] mm: make alloc_demote_folio externally invokable for migration

2024-06-13 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. Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park --- mm/internal.h | 1 + mm/vmscan.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 1/1] s390/virtio_ccw: fix config change notifications

2024-06-13 Thread Halil Pasic
On Wed, 12 Jun 2024 16:04:15 +0200 Thomas Huth wrote: > On 11/06/2024 23.47, Halil Pasic wrote: > > Commit e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API") > > broke configuration change notifications for virtio-ccw by putting the > > DMA address of *indicatorp directly into ccw->cda

[PATCH v5 8/8] Docs/.../mm/damon: add more damos actions

2024-06-13 Thread Honggyu Kim
This patch adds damon description for "migrate_hot" and "migrate_cold" actions for both usage and design documents as long as a new "target_nid" knob to set the migration target node. Signed-off-by: Honggyu Kim --- Documentation/admin-guide/mm/damon/usage.rst | 8 +++- Documentation/mm/damon

[PATCH 4/8] mm/migrate: add MR_DAMON to migrate_reason

2024-06-13 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 Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park --- include/linux/migrate_mode.h | 1 + include/trace/events/migrate.

[PATCH 0/8] DAMON based tiered memory management for CXL memory

2024-06-13 Thread Honggyu Kim
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 patch series is about its implementation for physical address space so that this scheme can be applied in system wide level.

Re: [PATCH v2 00/13] OMAP mailbox FIFO removal

2024-06-13 Thread Andrew Davis
On 6/13/24 2:58 AM, Dominic Rath wrote: Hello Andrew, On 10.04.2024 15:59, Andrew Davis wrote: Changes for v2:   - Use threaded irq as suggested by Hari and to   fix possible "scheduling while atomic" issue sorry for beeing late, I noticed this already got merged. I was wondering what th

[PATCH] trace: riscv: Remove deprecated kprobe on ftrace support

2024-06-13 Thread Jinjie Ruan
Since commit 7caa9765465f60 ("ftrace: riscv: move from REGS to ARGS"), kprobe on ftrace is not supported by riscv, because riscv's support for FTRACE_WITH_REGS has been replaced with support for FTRACE_WITH_ARGS, and KPROBES_ON_FTRACE will be supplanted by FPROBES. So remove the deprecated kprobe o

Re: [PATCH V1] rpmsg: glink: Make glink smem interrupt wakeup capable

2024-06-13 Thread Deepak Kumar Singh
On 6/3/2024 3:07 PM, Caleb Connolly wrote: Hi Deepak, On 03/06/2024 09:36, Deepak Kumar Singh wrote: There are certain usecases which require glink interrupt to be wakeup capable. For example if handset is in sleep state and usb charger is plugged in, dsp wakes up and sends glink interrupt t

[PATCH v2] net: missing check virtio

2024-06-13 Thread Denis Arefev
Two missing check in virtio_net_hdr_to_skb() allowed syzbot to crash kernels again 1. After the skb_segment function the buffer may become non-linear (nr_frags != 0), but since the SKBTX_SHARED_FRAG flag is not set anywhere the __skb_linearize function will not be executed, then the buffer will re

Re: [PATCH v2 00/13] OMAP mailbox FIFO removal

2024-06-13 Thread Dominic Rath
Hello Andrew, On 10.04.2024 15:59, Andrew Davis wrote: Changes for v2: - Use threaded irq as suggested by Hari and to fix possible "scheduling while atomic" issue sorry for beeing late, I noticed this already got merged. I was wondering what the reason was for ending up with the threa

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-13 Thread Michael S. Tsirkin
On Thu, Jun 13, 2024 at 09:21:07AM +0200, Jiri Pirko wrote: > Thu, Jun 13, 2024 at 08:49:25AM CEST, m...@redhat.com wrote: > >On Wed, Jun 12, 2024 at 09:22:32AM +0200, Jiri Pirko wrote: > >> Wed, Jun 12, 2024 at 09:15:44AM CEST, m...@redhat.com wrote: > >> >On Wed, Jun 12, 2024 at 08:29:53AM +0200,

Re: [PATCH] riscv: Fix early ftrace nop patching

2024-06-13 Thread Conor Dooley
On Thu, May 23, 2024 at 01:51:34PM +0200, Alexandre Ghiti wrote: > Commit c97bf629963e ("riscv: Fix text patching when IPI are used") > converted ftrace_make_nop() to use patch_insn_write() which does not > emit any icache flush relying entirely on __ftrace_modify_code() to do > that. > > But we m

Re: Bug in Kernel 6.8.x, 6.9.x Causing Trace/Panic During Shutdown/Reboot

2024-06-13 Thread Linux regression tracking (Thorsten Leemhuis)
On 13.06.24 09:32, Ilkka Naulapää wrote: > On Wed, Jun 12, 2024 at 6:56 PM Steven Rostedt wrote: >> On Wed, 12 Jun 2024 15:36:22 +0200 >> "Linux regression tracking (Thorsten Leemhuis)" >> wrote: >>> >>> Ilkka or Steven, what happened to this? This thread looks stalled. I >>> also was unsuccessf

Re: [PATCH] ARM: dts: qcom: motorola-falcon: add accelerometer, magnetometer

2024-06-13 Thread Konrad Dybcio
On 6/9/24 13:05, Stanislav Jakubek wrote: Add the accelerometer and magnetometer that are present on the Motorola Moto G (2013) device. Signed-off-by: Stanislav Jakubek --- [...] +&blsp1_i2c2 { Consider setting a clock-frequency = <> With that: Reviewed-by: Konrad Dybcio Konrad

[PATCH 8/8] riscv: ftrace: support PREEMPT

2024-06-13 Thread Andy Chiu
Now, we can safely enable dynamic ftrace with kernel preemption. Signed-off-by: Andy Chiu --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 80b8d48e1e46..c1493ee1b8cd 100644 --- a/arch/riscv/Kconfig +++ b/arch

[PATCH 7/8] riscv: vector: Support calling schedule() for preemptible Vector

2024-06-13 Thread Andy Chiu
Each function entry implies a call to ftrace infrastructure. And it may call into schedule in some cases. So, it is possible for preemptible kernel-mode Vector to implicitly call into schedule. Since all V-regs are caller-saved, it is possible to drop all V context when a thread voluntarily call sc

[PATCH 6/8] riscv: ftrace: do not use stop_machine to update code

2024-06-13 Thread Andy Chiu
Now it is safe to remove dependency from stop_machine() for us to patch code in ftrace. Signed-off-by: Andy Chiu --- arch/riscv/kernel/ftrace.c | 53 -- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/arch/riscv/kernel/ftrace.c b/arch/ri

Re: Bug in Kernel 6.8.x, 6.9.x Causing Trace/Panic During Shutdown/Reboot

2024-06-13 Thread Ilkka Naulapää
ok, so if you don't have any idea where this bug is after those debug patches, I'll try to find some time to bisect it as a last resort. Stay tuned. --Ilkka On Wed, Jun 12, 2024 at 6:56 PM Steven Rostedt wrote: > > On Wed, 12 Jun 2024 15:36:22 +0200 > "Linux regression tracking (Thorsten Leemhui

[PATCH 5/8] riscv: ftrace: prepare ftrace for atomic code patching

2024-06-13 Thread Andy Chiu
We use an AUIPC+JALR pair to jump into a ftrace trampoline. Since instruction fetch can break down to 4 byte at a time, it is impossible to update two instructions without a race. In order to mitigate it, we initialize the patchable entry to AUIPC + NOP4. Then, the run-time code patching can change

[PATCH 4/8] riscv: ftrace: align patchable functions to 4 Byte boundary

2024-06-13 Thread Andy Chiu
We are changing ftrace code patching in order to remove dependency from stop_machine() and enable kernel preemption. This requires us to align functions entry at a 4-B align address. However, -falign-functions on older versions of GCC alone was not strong enoungh to align all functions. In fact, c

[PATCH 3/8] riscv: ftrace: support fastcc in Clang for WITH_ARGS

2024-06-13 Thread Andy Chiu
Some caller-saved registers which are not defined as function arguments in the ABI can still be passed as arguments when the kernel is compiled with Clang. As a result, we must save and restore those registers to prevent ftrace from clobbering them. - [1]: https://reviews.llvm.org/D68559 Reported-

[PATCH 2/8] tracing: do not trace kernel_text_address()

2024-06-13 Thread Andy Chiu
kernel_text_address() and __kernel_text_address() are called in arch_stack_walk() of riscv. This results in excess amount of un-related traces when the kernel is compiled with CONFIG_TRACE_IRQFLAGS. The situation worsens when function_graph is active, as it calls local_irq_save/restore in each func

[PATCH 1/8] riscv: stacktrace: convert arch_stack_walk() to noinstr

2024-06-13 Thread Andy Chiu
arch_stack_walk() is called intensively in function_graph when the kernel is compiled with CONFIG_TRACE_IRQFLAGS. As a result, the kernel logs a lot of arch_stack_walk and its sub-functions into the ftrace buffer. However, these functions should not appear on the trace log because they are part of

[PATCH 0/8] riscv: ftrace: atmoic patching and preempt improvements

2024-06-13 Thread Andy Chiu
arch/riscv/kernel/mcount-dyn.S | 25 +-- arch/riscv/kernel/stacktrace.c | 2 +- kernel/extable.c | 4 +- 10 files changed, 129 insertions(+), 90 deletions(-) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240613-dev-andyc-dyn-ftra

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-13 Thread Jiri Pirko
Thu, Jun 13, 2024 at 08:49:25AM CEST, m...@redhat.com wrote: >On Wed, Jun 12, 2024 at 09:22:32AM +0200, Jiri Pirko wrote: >> Wed, Jun 12, 2024 at 09:15:44AM CEST, m...@redhat.com wrote: >> >On Wed, Jun 12, 2024 at 08:29:53AM +0200, Jiri Pirko wrote: >> >> Wed, Jun 12, 2024 at 03:58:10AM CEST, k...@

<    1   2