* [PATCH 0/3] Allow to enable PREEMPT_RT.
@ 2024-09-06 10:59 Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 1/3] x86: " Sebastian Andrzej Siewior
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-06 10:59 UTC (permalink / raw)
To: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86
Cc: H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon
The printk bits required for PREEMPT_RT are sitting in linux-next. This
was the last known roadblock for PREEMPT_RT. The RT queue has
additionally the "atomic console" for the 8250 UART which is not yet in
linux-next. This means "legacy console" behaviour as in no printing from
atomic context in emergency cases. The 8250 UART driver is the only one
providing "atomic console" support as of today.
With the printk bits merged, PREEMPT_RT could be enabled on X86, ARM64
and Risc-V. These three architectures merged required changes over the
years leaving me in a position where I have no essential changes in the
queue that would affect them.
ARM and POWERPC have a few essential patches left and I lost track of
MIPS.
Sebastian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/3] x86: Allow to enable PREEMPT_RT.
2024-09-06 10:59 [PATCH 0/3] Allow to enable PREEMPT_RT Sebastian Andrzej Siewior
@ 2024-09-06 10:59 ` Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 2/3] arm64: " Sebastian Andrzej Siewior
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-06 10:59 UTC (permalink / raw)
To: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86
Cc: H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon, Sebastian Andrzej Siewior
It is really time.
x86 has all the required architecture related changes, that have been
identified over time, in order to enable PREEMPT_RT. With the recent
printk changes, the last known road block has been addressed.
Allow to enable PREEMPT_RT on x86.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/x86/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 28401c16b0c3f..a8cf61c52b063 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -125,6 +125,7 @@ config X86
select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
+ select ARCH_SUPPORTS_RT
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF if X86_CMPXCHG64
select ARCH_USE_MEMTEST
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] arm64: Allow to enable PREEMPT_RT.
2024-09-06 10:59 [PATCH 0/3] Allow to enable PREEMPT_RT Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 1/3] x86: " Sebastian Andrzej Siewior
@ 2024-09-06 10:59 ` Sebastian Andrzej Siewior
2024-09-06 11:30 ` Will Deacon
2024-09-06 10:59 ` [PATCH 3/3] riscv: " Sebastian Andrzej Siewior
2024-09-10 2:39 ` [PATCH 0/3] " Mingcong Bai
3 siblings, 1 reply; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-06 10:59 UTC (permalink / raw)
To: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86
Cc: H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon, Sebastian Andrzej Siewior
It is really time.
arm64 has all the required architecture related changes, that have been
identified over time, in order to enable PREEMPT_RT. With the recent
printk changes, the last known road block has been addressed.
Allow to enable PREEMPT_RT on arm64.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 0e5bd38633936..2cce9cb44c31e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -101,6 +101,7 @@ config ARM64
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
select ARCH_SUPPORTS_PER_VMA_LOCK
+ select ARCH_SUPPORTS_RT
select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-06 10:59 [PATCH 0/3] Allow to enable PREEMPT_RT Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 1/3] x86: " Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 2/3] arm64: " Sebastian Andrzej Siewior
@ 2024-09-06 10:59 ` Sebastian Andrzej Siewior
2024-09-06 15:13 ` Nam Cao
2024-09-10 2:39 ` [PATCH 0/3] " Mingcong Bai
3 siblings, 1 reply; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-06 10:59 UTC (permalink / raw)
To: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86
Cc: H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon, Sebastian Andrzej Siewior
It is really time.
riscv has all the required architecture related changes, that have been
identified over time, in order to enable PREEMPT_RT. With the recent
printk changes, the last known road block has been addressed.
Allow to enable PREEMPT_RT on riscv.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 801ee681059ca..a9be4dca380dc 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -65,6 +65,7 @@ config RISCV
select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
+ select ARCH_SUPPORTS_RT
select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
select ARCH_USE_MEMTEST
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] arm64: Allow to enable PREEMPT_RT.
2024-09-06 10:59 ` [PATCH 2/3] arm64: " Sebastian Andrzej Siewior
@ 2024-09-06 11:30 ` Will Deacon
2024-09-06 14:13 ` Steven Rostedt
0 siblings, 1 reply; 16+ messages in thread
From: Will Deacon @ 2024-09-06 11:30 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86,
H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt
On Fri, Sep 06, 2024 at 12:59:05PM +0200, Sebastian Andrzej Siewior wrote:
> It is really time.
>
> arm64 has all the required architecture related changes, that have been
> identified over time, in order to enable PREEMPT_RT. With the recent
> printk changes, the last known road block has been addressed.
>
> Allow to enable PREEMPT_RT on arm64.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> arch/arm64/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 0e5bd38633936..2cce9cb44c31e 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -101,6 +101,7 @@ config ARM64
> select ARCH_SUPPORTS_NUMA_BALANCING
> select ARCH_SUPPORTS_PAGE_TABLE_CHECK
> select ARCH_SUPPORTS_PER_VMA_LOCK
> + select ARCH_SUPPORTS_RT
> select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
> select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
> select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
> --
> 2.45.2
Acked-by: Will Deacon <will@kernel.org>
"Let it rip!"
Will
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] arm64: Allow to enable PREEMPT_RT.
2024-09-06 11:30 ` Will Deacon
@ 2024-09-06 14:13 ` Steven Rostedt
0 siblings, 0 replies; 16+ messages in thread
From: Steven Rostedt @ 2024-09-06 14:13 UTC (permalink / raw)
To: Will Deacon
Cc: Sebastian Andrzej Siewior, Thomas Gleixner, linux-arm-kernel,
linux-kernel, linux-riscv, x86, H. Peter Anvin, Albert Ou,
Borislav Petkov, Catalin Marinas, Clark Williams, Dave Hansen,
Ingo Molnar, John Ogness, Palmer Dabbelt, Paul Walmsley,
Petr Mladek, Sergey Senozhatsky
On Fri, 6 Sep 2024 12:30:51 +0100
Will Deacon <will@kernel.org> wrote:
> Acked-by: Will Deacon <will@kernel.org>
>
> "Let it rip!"
Woot! Woot!
-- Steve
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-06 10:59 ` [PATCH 3/3] riscv: " Sebastian Andrzej Siewior
@ 2024-09-06 15:13 ` Nam Cao
2024-09-06 18:48 ` Palmer Dabbelt
0 siblings, 1 reply; 16+ messages in thread
From: Nam Cao @ 2024-09-06 15:13 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86,
H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon
On Fri, Sep 06, 2024 at 12:59:06PM +0200, Sebastian Andrzej Siewior wrote:
> It is really time.
>
> riscv has all the required architecture related changes, that have been
> identified over time, in order to enable PREEMPT_RT. With the recent
> printk changes, the last known road block has been addressed.
>
> Allow to enable PREEMPT_RT on riscv.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
With the printk patches applied:
Tested-by: Nam Cao <namcao@linutronix.de> # Visionfive 2
Best regards,
Nam
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-06 15:13 ` Nam Cao
@ 2024-09-06 18:48 ` Palmer Dabbelt
2024-09-17 10:44 ` Sebastian Andrzej Siewior
2024-10-09 16:44 ` Palmer Dabbelt
0 siblings, 2 replies; 16+ messages in thread
From: Palmer Dabbelt @ 2024-09-06 18:48 UTC (permalink / raw)
To: namcao
Cc: bigeasy, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On Fri, 06 Sep 2024 08:13:24 PDT (-0700), namcao@linutronix.de wrote:
> On Fri, Sep 06, 2024 at 12:59:06PM +0200, Sebastian Andrzej Siewior wrote:
>> It is really time.
>>
>> riscv has all the required architecture related changes, that have been
>> identified over time, in order to enable PREEMPT_RT. With the recent
>> printk changes, the last known road block has been addressed.
>>
>> Allow to enable PREEMPT_RT on riscv.
>>
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>
> With the printk patches applied:
>
> Tested-by: Nam Cao <namcao@linutronix.de> # Visionfive 2
Thanks. LMK if you guys want me to take this through the RISC-V tree,
but no big deal if you want it somewhere else -- and if there's some
dependencies already going in through some sort of RT tree maybe that's
just easier. So
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
I don't have a test setup yet, but I figure it's a new feature so I'll
just flip it on as a config post-rc1. Presumably this just works in the
QEMU virt board, or is there some wizardry I'll need to copy?
> Best regards,
> Nam
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Allow to enable PREEMPT_RT.
2024-09-06 10:59 [PATCH 0/3] Allow to enable PREEMPT_RT Sebastian Andrzej Siewior
` (2 preceding siblings ...)
2024-09-06 10:59 ` [PATCH 3/3] riscv: " Sebastian Andrzej Siewior
@ 2024-09-10 2:39 ` Mingcong Bai
2024-09-12 7:14 ` Sebastian Andrzej Siewior
3 siblings, 1 reply; 16+ messages in thread
From: Mingcong Bai @ 2024-09-10 2:39 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Thomas Gleixner, linux-arm-kernel,
linux-kernel, linux-riscv, x86
Cc: H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon
Hi Sebastian,
在 2024/9/6 18:59, Sebastian Andrzej Siewior 写道:
> The printk bits required for PREEMPT_RT are sitting in linux-next. This
> was the last known roadblock for PREEMPT_RT. The RT queue has
> additionally the "atomic console" for the 8250 UART which is not yet in
> linux-next. This means "legacy console" behaviour as in no printing from
> atomic context in emergency cases. The 8250 UART driver is the only one
> providing "atomic console" support as of today.
>
> With the printk bits merged, PREEMPT_RT could be enabled on X86, ARM64
> and Risc-V. These three architectures merged required changes over the
> years leaving me in a position where I have no essential changes in the
> queue that would affect them.
> ARM and POWERPC have a few essential patches left and I lost track of
> MIPS.
Congratulations, it's been a long time coming!
I'm wondering, for the architectures not included in the enablement this
time, do we have a readiness checklist/guide for maintainers to refer to?
Thanks in advance.
>
> Sebastian
>
>
Best Regards,
Mingcong Bai
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Allow to enable PREEMPT_RT.
2024-09-10 2:39 ` [PATCH 0/3] " Mingcong Bai
@ 2024-09-12 7:14 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-12 7:14 UTC (permalink / raw)
To: Mingcong Bai
Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-riscv, x86,
H. Peter Anvin, Albert Ou, Borislav Petkov, Catalin Marinas,
Clark Williams, Dave Hansen, Ingo Molnar, John Ogness,
Palmer Dabbelt, Paul Walmsley, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, Will Deacon
On 2024-09-10 10:39:45 [+0800], Mingcong Bai wrote:
> Hi Sebastian,
Hi Mingcong,
> Congratulations, it's been a long time coming!
thank you.
> I'm wondering, for the architectures not included in the enablement this
> time, do we have a readiness checklist/guide for maintainers to refer to?
I don't think there is. The plain PREEMPT should work. Then need to
follow the checklist for forced-threaded interrupts. Generic code such
as GENERIC_ENTRY makes things easier but at least
HAVE_POSIX_CPU_TIMERS_TASK_WORK is needed with kvm enabled if my memory
serves me right. Everything else is part of generic code.
> Thanks in advance.
> Best Regards,
> Mingcong Bai
Sebastian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-06 18:48 ` Palmer Dabbelt
@ 2024-09-17 10:44 ` Sebastian Andrzej Siewior
2024-10-09 16:47 ` Palmer Dabbelt
2024-10-09 16:44 ` Palmer Dabbelt
1 sibling, 1 reply; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-09-17 10:44 UTC (permalink / raw)
To: Palmer Dabbelt
Cc: namcao, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On 2024-09-06 11:48:03 [-0700], Palmer Dabbelt wrote:
> I don't have a test setup yet, but I figure it's a new feature so I'll just
> flip it on as a config post-rc1. Presumably this just works in the QEMU
> virt board, or is there some wizardry I'll need to copy?
I don't think you want to enable it by default for everyone. The riscv
defconfig sets CONFIG_PREEMPT_NONE=y by default. For testing you need to
flip this to CONFIG_PREEMPT_RT=y and since CONFIG_EXPERT=y is already
set this option is available.
And yes, it works on the virt board and there is no wizardry needed ;)
Sebastian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-06 18:48 ` Palmer Dabbelt
2024-09-17 10:44 ` Sebastian Andrzej Siewior
@ 2024-10-09 16:44 ` Palmer Dabbelt
2024-10-09 17:41 ` Nam Cao
` (2 more replies)
1 sibling, 3 replies; 16+ messages in thread
From: Palmer Dabbelt @ 2024-10-09 16:44 UTC (permalink / raw)
To: namcao
Cc: bigeasy, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On Fri, 06 Sep 2024 11:48:03 PDT (-0700), Palmer Dabbelt wrote:
> On Fri, 06 Sep 2024 08:13:24 PDT (-0700), namcao@linutronix.de wrote:
>> On Fri, Sep 06, 2024 at 12:59:06PM +0200, Sebastian Andrzej Siewior wrote:
>>> It is really time.
>>>
>>> riscv has all the required architecture related changes, that have been
>>> identified over time, in order to enable PREEMPT_RT. With the recent
>>> printk changes, the last known road block has been addressed.
>>>
>>> Allow to enable PREEMPT_RT on riscv.
>>>
>>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>
>> With the printk patches applied:
>>
>> Tested-by: Nam Cao <namcao@linutronix.de> # Visionfive 2
>
>
> Thanks. LMK if you guys want me to take this through the RISC-V tree,
> but no big deal if you want it somewhere else -- and if there's some
> dependencies already going in through some sort of RT tree maybe that's
> just easier. So
>
> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
>
> I don't have a test setup yet, but I figure it's a new feature so I'll
> just flip it on as a config post-rc1. Presumably this just works in the
> QEMU virt board, or is there some wizardry I'll need to copy?
and it breaks my boot test script. Looks like it's actually working
mostly fine, I'm just not getting the "reboot: System halted" message
that I'm checking for to make sure the system actually went down
cleanly.
I'm not sure if this is expected behavior in RT land, or if we've got
some sort of bug. It sort of smells like we're losing the last printk()
line...
>
>> Best regards,
>> Nam
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-09-17 10:44 ` Sebastian Andrzej Siewior
@ 2024-10-09 16:47 ` Palmer Dabbelt
0 siblings, 0 replies; 16+ messages in thread
From: Palmer Dabbelt @ 2024-10-09 16:47 UTC (permalink / raw)
To: bigeasy
Cc: namcao, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On Tue, 17 Sep 2024 03:44:09 PDT (-0700), bigeasy@linutronix.de wrote:
> On 2024-09-06 11:48:03 [-0700], Palmer Dabbelt wrote:
>> I don't have a test setup yet, but I figure it's a new feature so I'll just
>> flip it on as a config post-rc1. Presumably this just works in the QEMU
>> virt board, or is there some wizardry I'll need to copy?
>
> I don't think you want to enable it by default for everyone. The riscv
> defconfig sets CONFIG_PREEMPT_NONE=y by default. For testing you need to
> flip this to CONFIG_PREEMPT_RT=y and since CONFIG_EXPERT=y is already
> set this option is available.
> And yes, it works on the virt board and there is no wizardry needed ;)
Sorry I missed this. Just in case anyone's curious: I'm not flipping it
on by default or anything, just adding a CONFIG_PREEMPT_RT=y
configuration to the list of things I test before pushing to
for-next or fixes.
>
> Sebastian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-10-09 16:44 ` Palmer Dabbelt
@ 2024-10-09 17:41 ` Nam Cao
2024-10-10 8:54 ` John Ogness
2024-10-10 12:21 ` Sebastian Andrzej Siewior
2 siblings, 0 replies; 16+ messages in thread
From: Nam Cao @ 2024-10-09 17:41 UTC (permalink / raw)
To: Palmer Dabbelt
Cc: bigeasy, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On Wed, Oct 09, 2024 at 09:44:59AM -0700, Palmer Dabbelt wrote:
> On Fri, 06 Sep 2024 11:48:03 PDT (-0700), Palmer Dabbelt wrote:
> > On Fri, 06 Sep 2024 08:13:24 PDT (-0700), namcao@linutronix.de wrote:
> > > On Fri, Sep 06, 2024 at 12:59:06PM +0200, Sebastian Andrzej Siewior wrote:
> > > > It is really time.
> > > >
> > > > riscv has all the required architecture related changes, that have been
> > > > identified over time, in order to enable PREEMPT_RT. With the recent
> > > > printk changes, the last known road block has been addressed.
> > > >
> > > > Allow to enable PREEMPT_RT on riscv.
> > > >
> > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > >
> > > With the printk patches applied:
> > >
> > > Tested-by: Nam Cao <namcao@linutronix.de> # Visionfive 2
> >
> >
> > Thanks. LMK if you guys want me to take this through the RISC-V tree,
> > but no big deal if you want it somewhere else -- and if there's some
> > dependencies already going in through some sort of RT tree maybe that's
> > just easier. So
> >
> > Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
> >
> > I don't have a test setup yet, but I figure it's a new feature so I'll
> > just flip it on as a config post-rc1. Presumably this just works in the
> > QEMU virt board, or is there some wizardry I'll need to copy?
>
> and it breaks my boot test script. Looks like it's actually working mostly
> fine, I'm just not getting the "reboot: System halted" message that I'm
> checking for to make sure the system actually went down cleanly.
>
> I'm not sure if this is expected behavior in RT land, or if we've got some
> sort of bug. It sort of smells like we're losing the last printk() line...
I also had some occasional problem with rebooting my Visionfive 2 board,
which was fixed with:
https://lore.kernel.org/lkml/20241003084152.2422969-1-namcao@linutronix.de/
Any chance this fixes your issue as well?
Best regards,
Nam
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-10-09 16:44 ` Palmer Dabbelt
2024-10-09 17:41 ` Nam Cao
@ 2024-10-10 8:54 ` John Ogness
2024-10-10 12:21 ` Sebastian Andrzej Siewior
2 siblings, 0 replies; 16+ messages in thread
From: John Ogness @ 2024-10-10 8:54 UTC (permalink / raw)
To: Palmer Dabbelt, namcao
Cc: bigeasy, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
Paul Walmsley, pmladek, senozhatsky, rostedt, Will Deacon
On 2024-10-09, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> and it breaks my boot test script. Looks like it's actually working
> mostly fine, I'm just not getting the "reboot: System halted" message
> that I'm checking for to make sure the system actually went down
> cleanly.
>
> I'm not sure if this is expected behavior in RT land, or if we've got
> some sort of bug. It sort of smells like we're losing the last printk()
> line...
For PREEMPT_RT, the console printing is done via a thread. On
shutdown/reboot, the threads are no longer active to print the final
messages. There is a new console driver type (NBCON) that is available
for this. However, currently in mainline there are no console drivers
that have been converted to NBCON yet.
I am currently working [0] to get an NBCON console driver for the 8250
uart in mainline. But that will not help your case if you are using some
other console driver.
John Ogness
[0] https://lore.kernel.org/lkml/20240913140538.221708-1-john.ogness@linutronix.de
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.
2024-10-09 16:44 ` Palmer Dabbelt
2024-10-09 17:41 ` Nam Cao
2024-10-10 8:54 ` John Ogness
@ 2024-10-10 12:21 ` Sebastian Andrzej Siewior
2 siblings, 0 replies; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-10-10 12:21 UTC (permalink / raw)
To: Palmer Dabbelt
Cc: namcao, tglx, linux-arm-kernel, linux-kernel, linux-riscv, x86,
hpa, aou, bp, Catalin Marinas, williams, dave.hansen, mingo,
john.ogness, Paul Walmsley, pmladek, senozhatsky, rostedt,
Will Deacon
On 2024-10-09 09:44:59 [-0700], Palmer Dabbelt wrote:
>
> and it breaks my boot test script. Looks like it's actually working mostly
> fine, I'm just not getting the "reboot: System halted" message that I'm
> checking for to make sure the system actually went down cleanly.
>
> I'm not sure if this is expected behavior in RT land, or if we've got some
> sort of bug. It sort of smells like we're losing the last printk() line...
Is it just defconfig + kvm_guest.config + PREEMPT_RT on "-cpu rv64
-machine virt" or is there more to it?
Sebastian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-10-10 12:43 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06 10:59 [PATCH 0/3] Allow to enable PREEMPT_RT Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 1/3] x86: " Sebastian Andrzej Siewior
2024-09-06 10:59 ` [PATCH 2/3] arm64: " Sebastian Andrzej Siewior
2024-09-06 11:30 ` Will Deacon
2024-09-06 14:13 ` Steven Rostedt
2024-09-06 10:59 ` [PATCH 3/3] riscv: " Sebastian Andrzej Siewior
2024-09-06 15:13 ` Nam Cao
2024-09-06 18:48 ` Palmer Dabbelt
2024-09-17 10:44 ` Sebastian Andrzej Siewior
2024-10-09 16:47 ` Palmer Dabbelt
2024-10-09 16:44 ` Palmer Dabbelt
2024-10-09 17:41 ` Nam Cao
2024-10-10 8:54 ` John Ogness
2024-10-10 12:21 ` Sebastian Andrzej Siewior
2024-09-10 2:39 ` [PATCH 0/3] " Mingcong Bai
2024-09-12 7:14 ` Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).