* [PATCH 0/3] Lazy preemption leftovers
@ 2024-10-09 10:50 Sebastian Andrzej Siewior
2024-10-09 10:50 ` [PATCH 1/3] tracing: Replace TRACE_FLAG_IRQS_NOSUPPORT with its config option Sebastian Andrzej Siewior
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-10-09 10:50 UTC (permalink / raw)
To: linux-trace-kernel, linux-kernel
Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot,
dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers
This is a followup to PeterZ'
https://lore.kernel.org/20241007074609.447006177@infradead.org
in PREEMPT_RT we had initially "LAZY preempt" this then morphed into
PREEMPT_AUTO and is becoming "Lazy preemption".
These are the tracing bits from that time that were used up to
PREEMPT_AUTO. With RT's RiscV support, they also contributed
PREEMPT_AUTO support which I just updated to current edition.
I used to have ARM* and POWERPC*, too support for the "LAZY preempt" but
this relied on assembly support and I dropped this during the switch to
PREEMPT_AUTO.
Sebastian
^ permalink raw reply [flat|nested] 24+ messages in thread* [PATCH 1/3] tracing: Replace TRACE_FLAG_IRQS_NOSUPPORT with its config option. 2024-10-09 10:50 [PATCH 0/3] Lazy preemption leftovers Sebastian Andrzej Siewior @ 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 10:50 UTC (permalink / raw) To: linux-trace-kernel, linux-kernel Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Sebastian Andrzej Siewior The TRACE_FLAG_IRQS_NOSUPPORT flag is used by tracing_gen_ctx.*() to signal that CONFIG_TRACE_IRQFLAGS_SUPPORT is not enabled and tracing IRQ flags is not supported. This could be replaced by using the 0 as flags and then deducting that there is no IRQFLAGS_SUPPORT based on the config option. The downside is that without CONFIG_TRACE_IRQFLAGS_SUPPORT we can not distinguish between no-IRQ passed flags and callers which passed 0. On the upside we have room for one additional flags which could be used for LAZY_PREEMPTION. Remove TRACE_FLAG_IRQS_NOSUPPORT and set it flags are 0 and CONFIG_TRACE_IRQFLAGS_SUPPORT is not set. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/trace_events.h | 7 +++---- kernel/trace/trace_output.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 42bedcddd5113..d5c0fcf20f024 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -184,8 +184,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, - TRACE_FLAG_IRQS_NOSUPPORT = 0x02, - TRACE_FLAG_NEED_RESCHED = 0x04, + TRACE_FLAG_NEED_RESCHED = 0x02, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_PREEMPT_RESCHED = 0x20, @@ -211,11 +210,11 @@ static inline unsigned int tracing_gen_ctx(void) static inline unsigned int tracing_gen_ctx_flags(unsigned long irqflags) { - return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT); + return tracing_gen_ctx_irq_test(0); } static inline unsigned int tracing_gen_ctx(void) { - return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT); + return tracing_gen_ctx_irq_test(0); } #endif diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 868f2f912f280..829daa0764dd9 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -460,7 +460,7 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) (entry->flags & TRACE_FLAG_IRQS_OFF && bh_off) ? 'D' : (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : bh_off ? 'b' : - (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : + !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : '.'; switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | -- 2.45.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 10:50 [PATCH 0/3] Lazy preemption leftovers Sebastian Andrzej Siewior 2024-10-09 10:50 ` [PATCH 1/3] tracing: Replace TRACE_FLAG_IRQS_NOSUPPORT with its config option Sebastian Andrzej Siewior @ 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2024-10-09 14:25 ` Steven Rostedt ` (3 more replies) 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2 siblings, 4 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 10:50 UTC (permalink / raw) To: linux-trace-kernel, linux-kernel Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Sebastian Andrzej Siewior The scheduler added NEED_RESCHED_LAZY scheduling. Record this state as part of trace flags and expose it in the need_resched field. Record and expose NEED_RESCHED_LAZY. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/trace_events.h | 1 + kernel/trace/trace.c | 2 ++ kernel/trace/trace_output.c | 14 +++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index d5c0fcf20f024..4cae6f2581379 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -185,6 +185,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, TRACE_FLAG_NEED_RESCHED = 0x02, + TRACE_FLAG_NEED_RESCHED_LAZY = 0x04, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_PREEMPT_RESCHED = 0x20, diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 1c69ca1f10886..29d7703751aa9 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) trace_flags |= TRACE_FLAG_NEED_RESCHED; if (test_preempt_need_resched()) trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; + if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; } diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 829daa0764dd9..23ca2155306b1 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -463,17 +463,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : '.'; - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED)) { + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'B'; + break; case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'N'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'L'; + break; + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'b'; + break; case TRACE_FLAG_NEED_RESCHED: need_resched = 'n'; break; case TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'p'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'l'; + break; default: need_resched = '.'; break; -- 2.45.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior @ 2024-10-09 14:25 ` Steven Rostedt 2024-10-09 17:30 ` Ankur Arora ` (2 subsequent siblings) 3 siblings, 0 replies; 24+ messages in thread From: Steven Rostedt @ 2024-10-09 14:25 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers On Wed, 9 Oct 2024 12:50:56 +0200 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > The scheduler added NEED_RESCHED_LAZY scheduling. Record this state as > part of trace flags and expose it in the need_resched field. > > Record and expose NEED_RESCHED_LAZY. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> -- Steve > --- > include/linux/trace_events.h | 1 + > kernel/trace/trace.c | 2 ++ > kernel/trace/trace_output.c | 14 +++++++++++++- > 3 files changed, 16 insertions(+), 1 deletion(-) ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior 2024-10-09 14:25 ` Steven Rostedt @ 2024-10-09 17:30 ` Ankur Arora 2024-10-09 17:33 ` Steven Rostedt 2024-10-12 18:30 ` kernel test robot 2024-10-16 9:17 ` Shrikanth Hegde 3 siblings, 1 reply; 24+ messages in thread From: Ankur Arora @ 2024-10-09 17:30 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers Sebastian Andrzej Siewior <bigeasy@linutronix.de> writes: > The scheduler added NEED_RESCHED_LAZY scheduling. Record this state as > part of trace flags and expose it in the need_resched field. > > Record and expose NEED_RESCHED_LAZY. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > include/linux/trace_events.h | 1 + > kernel/trace/trace.c | 2 ++ > kernel/trace/trace_output.c | 14 +++++++++++++- > 3 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h > index d5c0fcf20f024..4cae6f2581379 100644 > --- a/include/linux/trace_events.h > +++ b/include/linux/trace_events.h > @@ -185,6 +185,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); > enum trace_flag_type { > TRACE_FLAG_IRQS_OFF = 0x01, > TRACE_FLAG_NEED_RESCHED = 0x02, > + TRACE_FLAG_NEED_RESCHED_LAZY = 0x04, > TRACE_FLAG_HARDIRQ = 0x08, > TRACE_FLAG_SOFTIRQ = 0x10, > TRACE_FLAG_PREEMPT_RESCHED = 0x20, > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 1c69ca1f10886..29d7703751aa9 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) > trace_flags |= TRACE_FLAG_NEED_RESCHED; > if (test_preempt_need_resched()) > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > + if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) TIF_NEED_RESCHED_LAZY falls back to TIF_NEED_RESCHED without CONFIG_ARCH_HAS_PREEMPT_LAZY. So, you might need to add an explicit check for that as well. With that, Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com> Ankur > + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; > return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | > (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; > } > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c > index 829daa0764dd9..23ca2155306b1 100644 > --- a/kernel/trace/trace_output.c > +++ b/kernel/trace/trace_output.c > @@ -463,17 +463,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) > !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : > '.'; > > - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | > + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | > TRACE_FLAG_PREEMPT_RESCHED)) { > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > + need_resched = 'B'; > + break; > case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: > need_resched = 'N'; > break; > + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > + need_resched = 'L'; > + break; > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: > + need_resched = 'b'; > + break; > case TRACE_FLAG_NEED_RESCHED: > need_resched = 'n'; > break; > case TRACE_FLAG_PREEMPT_RESCHED: > need_resched = 'p'; > break; > + case TRACE_FLAG_NEED_RESCHED_LAZY: > + need_resched = 'l'; > + break; > default: > need_resched = '.'; > break; -- ankur ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 17:30 ` Ankur Arora @ 2024-10-09 17:33 ` Steven Rostedt 2024-10-09 18:49 ` Ankur Arora 0 siblings, 1 reply; 24+ messages in thread From: Steven Rostedt @ 2024-10-09 17:33 UTC (permalink / raw) To: Ankur Arora Cc: Sebastian Andrzej Siewior, linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, efault, Masami Hiramatsu, Mathieu Desnoyers On Wed, 09 Oct 2024 10:30:28 -0700 Ankur Arora <ankur.a.arora@oracle.com> wrote: > > +++ b/kernel/trace/trace.c > > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) > > trace_flags |= TRACE_FLAG_NEED_RESCHED; > > if (test_preempt_need_resched()) > > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > > + if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) > > TIF_NEED_RESCHED_LAZY falls back to TIF_NEED_RESCHED without > CONFIG_ARCH_HAS_PREEMPT_LAZY. So, you might need to add an explicit > check for that as well. > > With that, > Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com> > > Ankur > So this should be: if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && tif_test_bit(TIF_NEED_RESCHED_LAZY)) ? -- Steve > > + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; > > return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | > > (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; > > } > > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c > > index 829daa0764dd9..23ca2155306b1 100644 > > --- a/kernel/trace/trace_output.c > > +++ b/kernel/trace/trace_output.c > > @@ -463,17 +463,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) > > !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : > > '.'; > > > > - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | > > + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | > > TRACE_FLAG_PREEMPT_RESCHED)) { > > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > > + need_resched = 'B'; > > + break; > > case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: > > need_resched = 'N'; > > break; > > + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > > + need_resched = 'L'; > > + break; > > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: > > + need_resched = 'b'; > > + break; > > case TRACE_FLAG_NEED_RESCHED: > > need_resched = 'n'; > > break; > > case TRACE_FLAG_PREEMPT_RESCHED: > > need_resched = 'p'; > > break; > > + case TRACE_FLAG_NEED_RESCHED_LAZY: > > + need_resched = 'l'; > > + break; > > default: > > need_resched = '.'; > > break; ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 17:33 ` Steven Rostedt @ 2024-10-09 18:49 ` Ankur Arora 2024-10-10 10:56 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 24+ messages in thread From: Ankur Arora @ 2024-10-09 18:49 UTC (permalink / raw) To: Steven Rostedt Cc: Ankur Arora, Sebastian Andrzej Siewior, linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, efault, Masami Hiramatsu, Mathieu Desnoyers Steven Rostedt <rostedt@goodmis.org> writes: > On Wed, 09 Oct 2024 10:30:28 -0700 > Ankur Arora <ankur.a.arora@oracle.com> wrote: > >> > +++ b/kernel/trace/trace.c >> > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) >> > trace_flags |= TRACE_FLAG_NEED_RESCHED; >> > if (test_preempt_need_resched()) >> > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; >> > + if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) >> >> TIF_NEED_RESCHED_LAZY falls back to TIF_NEED_RESCHED without >> CONFIG_ARCH_HAS_PREEMPT_LAZY. So, you might need to add an explicit >> check for that as well. >> >> With that, >> Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com> >> >> Ankur >> > > So this should be: > > if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && > tif_test_bit(TIF_NEED_RESCHED_LAZY)) > > ? Yeah, exactly that. -- ankur ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 18:49 ` Ankur Arora @ 2024-10-10 10:56 ` Sebastian Andrzej Siewior 2024-10-10 14:52 ` Steven Rostedt 0 siblings, 1 reply; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-10 10:56 UTC (permalink / raw) To: Ankur Arora Cc: Steven Rostedt, linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, efault, Masami Hiramatsu, Mathieu Desnoyers On 2024-10-09 11:49:41 [-0700], Ankur Arora wrote: > > So this should be: > > > > if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && > > tif_test_bit(TIF_NEED_RESCHED_LAZY)) > > > > ? > > Yeah, exactly that. Okay, this makes sense, this is what I ended up with: diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index d5c0fcf20f024..4cae6f2581379 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -185,6 +185,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, TRACE_FLAG_NEED_RESCHED = 0x02, + TRACE_FLAG_NEED_RESCHED_LAZY = 0x04, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_PREEMPT_RESCHED = 0x20, diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 1c69ca1f10886..fb839d00aad12 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) trace_flags |= TRACE_FLAG_NEED_RESCHED; if (test_preempt_need_resched()) trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; + if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && tif_test_bit(TIF_NEED_RESCHED_LAZY)) + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; } diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 829daa0764dd9..23ca2155306b1 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -463,17 +463,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : '.'; - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED)) { + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'B'; + break; case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'N'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'L'; + break; + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'b'; + break; case TRACE_FLAG_NEED_RESCHED: need_resched = 'n'; break; case TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'p'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'l'; + break; default: need_resched = '.'; break; -- 2.45.2 Sebastian ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-10 10:56 ` Sebastian Andrzej Siewior @ 2024-10-10 14:52 ` Steven Rostedt 2024-10-10 14:55 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 24+ messages in thread From: Steven Rostedt @ 2024-10-10 14:52 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Ankur Arora, linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, efault, Masami Hiramatsu, Mathieu Desnoyers On Thu, 10 Oct 2024 12:56:11 +0200 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > +++ b/kernel/trace/trace.c > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) > trace_flags |= TRACE_FLAG_NEED_RESCHED; > if (test_preempt_need_resched()) > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > + if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && tif_test_bit(TIF_NEED_RESCHED_LAZY)) > + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; > return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | > (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; > } This is the only update you made from your previous version right? If so, my reviewed-by stands. -- Steve ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-10 14:52 ` Steven Rostedt @ 2024-10-10 14:55 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-10 14:55 UTC (permalink / raw) To: Steven Rostedt Cc: Ankur Arora, linux-trace-kernel, linux-kernel, Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, bsegall, mgorman, vschneid, efault, Masami Hiramatsu, Mathieu Desnoyers On 2024-10-10 10:52:14 [-0400], Steven Rostedt wrote: > On Thu, 10 Oct 2024 12:56:11 +0200 > Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > > > +++ b/kernel/trace/trace.c > > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) > > trace_flags |= TRACE_FLAG_NEED_RESCHED; > > if (test_preempt_need_resched()) > > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > > + if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) && tif_test_bit(TIF_NEED_RESCHED_LAZY)) > > + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; > > return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | > > (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; > > } > > This is the only update you made from your previous version right? Yes. > If so, my reviewed-by stands. Let me add your's and Ankur's. > -- Steve Sebastian ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior 2024-10-09 14:25 ` Steven Rostedt 2024-10-09 17:30 ` Ankur Arora @ 2024-10-12 18:30 ` kernel test robot 2024-10-16 9:17 ` Shrikanth Hegde 3 siblings, 0 replies; 24+ messages in thread From: kernel test robot @ 2024-10-12 18:30 UTC (permalink / raw) To: Sebastian Andrzej Siewior; +Cc: llvm, oe-kbuild-all Hi Sebastian, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on rostedt-trace/for-next v6.12-rc2 next-20241011] [cannot apply to rostedt-trace/for-next-urgent] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sebastian-Andrzej-Siewior/tracing-Replace-TRACE_FLAG_IRQS_NOSUPPORT-with-its-config-option/20241011-002703 base: linus/master patch link: https://lore.kernel.org/r/20241009105709.887510-3-bigeasy%40linutronix.de patch subject: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. config: arm64-randconfig-002-20241012 (https://download.01.org/0day-ci/archive/20241013/202410130231.L7iGIO8b-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241013/202410130231.L7iGIO8b-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410130231.L7iGIO8b-lkp@intel.com/ All errors (new ones prefixed by >>): >> kernel/trace/trace.c:2547:6: error: call to undeclared function 'tif_test_bit'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) ^ kernel/trace/trace.c:2547:19: error: use of undeclared identifier 'TIF_NEED_RESCHED_LAZY' if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) ^ 2 errors generated. vim +/tif_test_bit +2547 kernel/trace/trace.c 2526 2527 unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) 2528 { 2529 unsigned int trace_flags = irqs_status; 2530 unsigned int pc; 2531 2532 pc = preempt_count(); 2533 2534 if (pc & NMI_MASK) 2535 trace_flags |= TRACE_FLAG_NMI; 2536 if (pc & HARDIRQ_MASK) 2537 trace_flags |= TRACE_FLAG_HARDIRQ; 2538 if (in_serving_softirq()) 2539 trace_flags |= TRACE_FLAG_SOFTIRQ; 2540 if (softirq_count() >> (SOFTIRQ_SHIFT + 1)) 2541 trace_flags |= TRACE_FLAG_BH_OFF; 2542 2543 if (tif_need_resched()) 2544 trace_flags |= TRACE_FLAG_NEED_RESCHED; 2545 if (test_preempt_need_resched()) 2546 trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > 2547 if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) 2548 trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; 2549 return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | 2550 (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; 2551 } 2552 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY. 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior ` (2 preceding siblings ...) 2024-10-12 18:30 ` kernel test robot @ 2024-10-16 9:17 ` Shrikanth Hegde 3 siblings, 0 replies; 24+ messages in thread From: Shrikanth Hegde @ 2024-10-16 9:17 UTC (permalink / raw) To: Sebastian Andrzej Siewior, linux-trace-kernel, linux-kernel Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers On 10/9/24 16:20, Sebastian Andrzej Siewior wrote: > The scheduler added NEED_RESCHED_LAZY scheduling. Record this state as > part of trace flags and expose it in the need_resched field. > > Record and expose NEED_RESCHED_LAZY. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > include/linux/trace_events.h | 1 + > kernel/trace/trace.c | 2 ++ > kernel/trace/trace_output.c | 14 +++++++++++++- > 3 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h > index d5c0fcf20f024..4cae6f2581379 100644 > --- a/include/linux/trace_events.h > +++ b/include/linux/trace_events.h > @@ -185,6 +185,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); > enum trace_flag_type { > TRACE_FLAG_IRQS_OFF = 0x01, > TRACE_FLAG_NEED_RESCHED = 0x02, > + TRACE_FLAG_NEED_RESCHED_LAZY = 0x04, > TRACE_FLAG_HARDIRQ = 0x08, > TRACE_FLAG_SOFTIRQ = 0x10, > TRACE_FLAG_PREEMPT_RESCHED = 0x20, > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 1c69ca1f10886..29d7703751aa9 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) > trace_flags |= TRACE_FLAG_NEED_RESCHED; > if (test_preempt_need_resched()) > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; > + if (tif_test_bit(TIF_NEED_RESCHED_LAZY)) > + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; > return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | > (min_t(unsigned int, migration_disable_value(), 0xf)) << 4; > } > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c > index 829daa0764dd9..23ca2155306b1 100644 > --- a/kernel/trace/trace_output.c > +++ b/kernel/trace/trace_output.c > @@ -463,17 +463,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) > !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : > '.'; > > - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | > + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | > TRACE_FLAG_PREEMPT_RESCHED)) { > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > + need_resched = 'B'; > + break; > case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: > need_resched = 'N'; > break; > + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: > + need_resched = 'L'; > + break; > + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: > + need_resched = 'b'; > + break; > case TRACE_FLAG_NEED_RESCHED: > need_resched = 'n'; > break; > case TRACE_FLAG_PREEMPT_RESCHED: > need_resched = 'p'; > break; > + case TRACE_FLAG_NEED_RESCHED_LAZY: > + need_resched = 'l'; > + break; > default: > need_resched = '.'; > break; Could you please update in Documentation/trace/ftrace.rst as well? ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] riscv: add PREEMPT_LAZY support 2024-10-09 10:50 [PATCH 0/3] Lazy preemption leftovers Sebastian Andrzej Siewior @ 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 10:50 UTC (permalink / raw) To: linux-trace-kernel, linux-kernel Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, Sebastian Andrzej Siewior From: Jisheng Zhang <jszhang@kernel.org> riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple as adding TIF_NEED_RESCHED_LAZY related definitions and enabling ARCH_HAS_PREEMPT_LAZY. [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/thread_info.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 62545946ecf43..3516c58480612 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -39,6 +39,7 @@ config RISCV select ARCH_HAS_MMIOWB select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_PMEM_API + select ARCH_HAS_PREEMPT_LAZY select ARCH_HAS_PREPARE_SYNC_CORE_CMD select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU select ARCH_HAS_PTE_SPECIAL diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 9c10fb180f438..8b5a5ddea4293 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ @@ -117,6 +118,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define TIF_32BIT 11 /* compat-mode 32bit process */ #define TIF_RISCV_V_DEFER_RESTORE 12 /* restore Vector before returing to user */ +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) -- 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] 24+ messages in thread
* [PATCH 3/3] riscv: add PREEMPT_LAZY support @ 2024-10-09 10:50 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 10:50 UTC (permalink / raw) To: linux-trace-kernel, linux-kernel Cc: Peter Zijlstra, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, Sebastian Andrzej Siewior From: Jisheng Zhang <jszhang@kernel.org> riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple as adding TIF_NEED_RESCHED_LAZY related definitions and enabling ARCH_HAS_PREEMPT_LAZY. [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/thread_info.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 62545946ecf43..3516c58480612 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -39,6 +39,7 @@ config RISCV select ARCH_HAS_MMIOWB select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_PMEM_API + select ARCH_HAS_PREEMPT_LAZY select ARCH_HAS_PREPARE_SYNC_CORE_CMD select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU select ARCH_HAS_PTE_SPECIAL diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 9c10fb180f438..8b5a5ddea4293 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ @@ -117,6 +118,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define TIF_32BIT 11 /* compat-mode 32bit process */ #define TIF_RISCV_V_DEFER_RESTORE 12 /* restore Vector before returing to user */ +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) -- 2.45.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support 2024-10-09 10:50 ` Sebastian Andrzej Siewior @ 2024-10-09 13:03 ` Peter Zijlstra -1 siblings, 0 replies; 24+ messages in thread From: Peter Zijlstra @ 2024-10-09 13:03 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv On Wed, Oct 09, 2024 at 12:50:57PM +0200, Sebastian Andrzej Siewior wrote: > From: Jisheng Zhang <jszhang@kernel.org> > > riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple > as adding TIF_NEED_RESCHED_LAZY related definitions and enabling > ARCH_HAS_PREEMPT_LAZY. > > [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] > > Cc: Paul Walmsley <paul.walmsley@sifive.com> > Cc: Palmer Dabbelt <palmer@dabbelt.com> > Cc: Albert Ou <aou@eecs.berkeley.edu> > Cc: linux-riscv@lists.infradead.org > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > arch/riscv/Kconfig | 1 + > arch/riscv/include/asm/thread_info.h | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 62545946ecf43..3516c58480612 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -39,6 +39,7 @@ config RISCV > select ARCH_HAS_MMIOWB > select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE > select ARCH_HAS_PMEM_API > + select ARCH_HAS_PREEMPT_LAZY > select ARCH_HAS_PREPARE_SYNC_CORE_CMD > select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU > select ARCH_HAS_PTE_SPECIAL > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h > index 9c10fb180f438..8b5a5ddea4293 100644 > --- a/arch/riscv/include/asm/thread_info.h > +++ b/arch/riscv/include/asm/thread_info.h > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); > * - pending work-to-be-done flags are in lowest half-word > * - other flags in upper half-word(s) > */ > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ > #define TIF_SIGPENDING 2 /* signal pending */ > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ So for x86 I shuffled the flags around to have the two NEED_RESCHED ones side-by-side. Not strictly required ofcourse, but... _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support @ 2024-10-09 13:03 ` Peter Zijlstra 0 siblings, 0 replies; 24+ messages in thread From: Peter Zijlstra @ 2024-10-09 13:03 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv On Wed, Oct 09, 2024 at 12:50:57PM +0200, Sebastian Andrzej Siewior wrote: > From: Jisheng Zhang <jszhang@kernel.org> > > riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple > as adding TIF_NEED_RESCHED_LAZY related definitions and enabling > ARCH_HAS_PREEMPT_LAZY. > > [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] > > Cc: Paul Walmsley <paul.walmsley@sifive.com> > Cc: Palmer Dabbelt <palmer@dabbelt.com> > Cc: Albert Ou <aou@eecs.berkeley.edu> > Cc: linux-riscv@lists.infradead.org > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > arch/riscv/Kconfig | 1 + > arch/riscv/include/asm/thread_info.h | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 62545946ecf43..3516c58480612 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -39,6 +39,7 @@ config RISCV > select ARCH_HAS_MMIOWB > select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE > select ARCH_HAS_PMEM_API > + select ARCH_HAS_PREEMPT_LAZY > select ARCH_HAS_PREPARE_SYNC_CORE_CMD > select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU > select ARCH_HAS_PTE_SPECIAL > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h > index 9c10fb180f438..8b5a5ddea4293 100644 > --- a/arch/riscv/include/asm/thread_info.h > +++ b/arch/riscv/include/asm/thread_info.h > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); > * - pending work-to-be-done flags are in lowest half-word > * - other flags in upper half-word(s) > */ > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ > #define TIF_SIGPENDING 2 /* signal pending */ > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ So for x86 I shuffled the flags around to have the two NEED_RESCHED ones side-by-side. Not strictly required ofcourse, but... ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support 2024-10-09 13:03 ` Peter Zijlstra @ 2024-10-09 13:05 ` Sebastian Andrzej Siewior -1 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 13:05 UTC (permalink / raw) To: Peter Zijlstra Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv On 2024-10-09 15:03:07 [+0200], Peter Zijlstra wrote: > > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h > > index 9c10fb180f438..8b5a5ddea4293 100644 > > --- a/arch/riscv/include/asm/thread_info.h > > +++ b/arch/riscv/include/asm/thread_info.h > > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); > > * - pending work-to-be-done flags are in lowest half-word > > * - other flags in upper half-word(s) > > */ > > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ > > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ > > #define TIF_SIGPENDING 2 /* signal pending */ > > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ > > So for x86 I shuffled the flags around to have the two NEED_RESCHED ones > side-by-side. Not strictly required ofcourse, but... I can shuffle them. I don't think the riscv camp will complain (saying this for them to actual complain if so). Sebastian _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support @ 2024-10-09 13:05 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-09 13:05 UTC (permalink / raw) To: Peter Zijlstra Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv On 2024-10-09 15:03:07 [+0200], Peter Zijlstra wrote: > > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h > > index 9c10fb180f438..8b5a5ddea4293 100644 > > --- a/arch/riscv/include/asm/thread_info.h > > +++ b/arch/riscv/include/asm/thread_info.h > > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); > > * - pending work-to-be-done flags are in lowest half-word > > * - other flags in upper half-word(s) > > */ > > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ > > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ > > #define TIF_SIGPENDING 2 /* signal pending */ > > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ > > So for x86 I shuffled the flags around to have the two NEED_RESCHED ones > side-by-side. Not strictly required ofcourse, but... I can shuffle them. I don't think the riscv camp will complain (saying this for them to actual complain if so). Sebastian ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support 2024-10-09 13:05 ` Sebastian Andrzej Siewior @ 2024-10-17 21:49 ` Palmer Dabbelt -1 siblings, 0 replies; 24+ messages in thread From: Palmer Dabbelt @ 2024-10-17 21:49 UTC (permalink / raw) To: bigeasy Cc: peterz, linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, mhiramat, mathieu.desnoyers, jszhang, Paul Walmsley, aou, linux-riscv On Wed, 09 Oct 2024 06:05:30 PDT (-0700), bigeasy@linutronix.de wrote: > On 2024-10-09 15:03:07 [+0200], Peter Zijlstra wrote: >> > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h >> > index 9c10fb180f438..8b5a5ddea4293 100644 >> > --- a/arch/riscv/include/asm/thread_info.h >> > +++ b/arch/riscv/include/asm/thread_info.h >> > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); >> > * - pending work-to-be-done flags are in lowest half-word >> > * - other flags in upper half-word(s) >> > */ >> > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ >> > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ >> > #define TIF_SIGPENDING 2 /* signal pending */ >> > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ >> >> So for x86 I shuffled the flags around to have the two NEED_RESCHED ones >> side-by-side. Not strictly required ofcourse, but... > > I can shuffle them. I don't think the riscv camp will complain (saying > this for them to actual complain if so). Acked-by: Palmer Dabbelt <palmer@rivosinc.com> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support @ 2024-10-17 21:49 ` Palmer Dabbelt 0 siblings, 0 replies; 24+ messages in thread From: Palmer Dabbelt @ 2024-10-17 21:49 UTC (permalink / raw) To: bigeasy Cc: peterz, linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, mhiramat, mathieu.desnoyers, jszhang, Paul Walmsley, aou, linux-riscv On Wed, 09 Oct 2024 06:05:30 PDT (-0700), bigeasy@linutronix.de wrote: > On 2024-10-09 15:03:07 [+0200], Peter Zijlstra wrote: >> > diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h >> > index 9c10fb180f438..8b5a5ddea4293 100644 >> > --- a/arch/riscv/include/asm/thread_info.h >> > +++ b/arch/riscv/include/asm/thread_info.h >> > @@ -107,6 +107,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); >> > * - pending work-to-be-done flags are in lowest half-word >> > * - other flags in upper half-word(s) >> > */ >> > +#define TIF_NEED_RESCHED_LAZY 0 /* Lazy rescheduling needed */ >> > #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ >> > #define TIF_SIGPENDING 2 /* signal pending */ >> > #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ >> >> So for x86 I shuffled the flags around to have the two NEED_RESCHED ones >> side-by-side. Not strictly required ofcourse, but... > > I can shuffle them. I don't think the riscv camp will complain (saying > this for them to actual complain if so). Acked-by: Palmer Dabbelt <palmer@rivosinc.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2 3/3] riscv: add PREEMPT_LAZY support 2024-10-09 13:03 ` Peter Zijlstra @ 2024-10-10 12:25 ` Sebastian Andrzej Siewior -1 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-10 12:25 UTC (permalink / raw) To: Peter Zijlstra Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv From: Jisheng Zhang <jszhang@kernel.org> riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple as adding TIF_NEED_RESCHED_LAZY related definitions and enabling ARCH_HAS_PREEMPT_LAZY. [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- v1…v2: - shuffle TIF bits around to make RESCHED next to RESCHED_LAZY. Compiles & boots. arch/riscv/Kconfig | 1 + arch/riscv/include/asm/thread_info.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 62545946ecf43..3516c58480612 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -39,6 +39,7 @@ config RISCV select ARCH_HAS_MMIOWB select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_PMEM_API + select ARCH_HAS_PREEMPT_LAZY select ARCH_HAS_PREPARE_SYNC_CORE_CMD select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU select ARCH_HAS_PTE_SPECIAL diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 9c10fb180f438..f5916a70879a8 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -107,9 +107,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ -#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ -#define TIF_SIGPENDING 2 /* signal pending */ -#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ +#define TIF_NEED_RESCHED 0 /* rescheduling necessary */ +#define TIF_NEED_RESCHED_LAZY 1 /* Lazy rescheduling needed */ +#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ +#define TIF_SIGPENDING 3 /* signal pending */ #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ #define TIF_NOTIFY_SIGNAL 9 /* signal notifications exist */ @@ -117,9 +118,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define TIF_32BIT 11 /* compat-mode 32bit process */ #define TIF_RISCV_V_DEFER_RESTORE 12 /* restore Vector before returing to user */ +#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) -#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) #define _TIF_UPROBE (1 << TIF_UPROBE) #define _TIF_RISCV_V_DEFER_RESTORE (1 << TIF_RISCV_V_DEFER_RESTORE) -- 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] 24+ messages in thread
* [PATCH v2 3/3] riscv: add PREEMPT_LAZY support @ 2024-10-10 12:25 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 24+ messages in thread From: Sebastian Andrzej Siewior @ 2024-10-10 12:25 UTC (permalink / raw) To: Peter Zijlstra Cc: linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, Masami Hiramatsu, Mathieu Desnoyers, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv From: Jisheng Zhang <jszhang@kernel.org> riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple as adding TIF_NEED_RESCHED_LAZY related definitions and enabling ARCH_HAS_PREEMPT_LAZY. [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- v1…v2: - shuffle TIF bits around to make RESCHED next to RESCHED_LAZY. Compiles & boots. arch/riscv/Kconfig | 1 + arch/riscv/include/asm/thread_info.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 62545946ecf43..3516c58480612 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -39,6 +39,7 @@ config RISCV select ARCH_HAS_MMIOWB select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_PMEM_API + select ARCH_HAS_PREEMPT_LAZY select ARCH_HAS_PREPARE_SYNC_CORE_CMD select ARCH_HAS_PTE_DEVMAP if 64BIT && MMU select ARCH_HAS_PTE_SPECIAL diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 9c10fb180f438..f5916a70879a8 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -107,9 +107,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ -#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ -#define TIF_SIGPENDING 2 /* signal pending */ -#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ +#define TIF_NEED_RESCHED 0 /* rescheduling necessary */ +#define TIF_NEED_RESCHED_LAZY 1 /* Lazy rescheduling needed */ +#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ +#define TIF_SIGPENDING 3 /* signal pending */ #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ #define TIF_NOTIFY_SIGNAL 9 /* signal notifications exist */ @@ -117,9 +118,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define TIF_32BIT 11 /* compat-mode 32bit process */ #define TIF_RISCV_V_DEFER_RESTORE 12 /* restore Vector before returing to user */ +#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) -#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) #define _TIF_UPROBE (1 << TIF_UPROBE) #define _TIF_RISCV_V_DEFER_RESTORE (1 << TIF_RISCV_V_DEFER_RESTORE) -- 2.45.2 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v2 3/3] riscv: add PREEMPT_LAZY support 2024-10-10 12:25 ` Sebastian Andrzej Siewior @ 2024-12-11 22:32 ` patchwork-bot+linux-riscv -1 siblings, 0 replies; 24+ messages in thread From: patchwork-bot+linux-riscv @ 2024-12-11 22:32 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-riscv, peterz, linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, mhiramat, mathieu.desnoyers, jszhang, paul.walmsley, palmer, aou Hello: This patch was applied to riscv/linux.git (fixes) by Peter Zijlstra <peterz@infradead.org>: On Thu, 10 Oct 2024 14:25:45 +0200 you wrote: > From: Jisheng Zhang <jszhang@kernel.org> > > riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple > as adding TIF_NEED_RESCHED_LAZY related definitions and enabling > ARCH_HAS_PREEMPT_LAZY. > > [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] > > [...] Here is the summary with links: - [v2,3/3] riscv: add PREEMPT_LAZY support https://git.kernel.org/riscv/c/22aaec357c1f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 3/3] riscv: add PREEMPT_LAZY support @ 2024-12-11 22:32 ` patchwork-bot+linux-riscv 0 siblings, 0 replies; 24+ messages in thread From: patchwork-bot+linux-riscv @ 2024-12-11 22:32 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-riscv, peterz, linux-trace-kernel, linux-kernel, tglx, mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, ankur.a.arora, efault, mhiramat, mathieu.desnoyers, jszhang, paul.walmsley, palmer, aou Hello: This patch was applied to riscv/linux.git (fixes) by Peter Zijlstra <peterz@infradead.org>: On Thu, 10 Oct 2024 14:25:45 +0200 you wrote: > From: Jisheng Zhang <jszhang@kernel.org> > > riscv has switched to GENERIC_ENTRY, so adding PREEMPT_LAZY is as simple > as adding TIF_NEED_RESCHED_LAZY related definitions and enabling > ARCH_HAS_PREEMPT_LAZY. > > [bigeasy: Replace old PREEMPT_AUTO bits with new PREEMPT_LAZY ] > > [...] Here is the summary with links: - [v2,3/3] riscv: add PREEMPT_LAZY support https://git.kernel.org/riscv/c/22aaec357c1f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2024-12-11 22:33 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-09 10:50 [PATCH 0/3] Lazy preemption leftovers Sebastian Andrzej Siewior 2024-10-09 10:50 ` [PATCH 1/3] tracing: Replace TRACE_FLAG_IRQS_NOSUPPORT with its config option Sebastian Andrzej Siewior 2024-10-09 10:50 ` [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY Sebastian Andrzej Siewior 2024-10-09 14:25 ` Steven Rostedt 2024-10-09 17:30 ` Ankur Arora 2024-10-09 17:33 ` Steven Rostedt 2024-10-09 18:49 ` Ankur Arora 2024-10-10 10:56 ` Sebastian Andrzej Siewior 2024-10-10 14:52 ` Steven Rostedt 2024-10-10 14:55 ` Sebastian Andrzej Siewior 2024-10-12 18:30 ` kernel test robot 2024-10-16 9:17 ` Shrikanth Hegde 2024-10-09 10:50 ` [PATCH 3/3] riscv: add PREEMPT_LAZY support Sebastian Andrzej Siewior 2024-10-09 10:50 ` Sebastian Andrzej Siewior 2024-10-09 13:03 ` Peter Zijlstra 2024-10-09 13:03 ` Peter Zijlstra 2024-10-09 13:05 ` Sebastian Andrzej Siewior 2024-10-09 13:05 ` Sebastian Andrzej Siewior 2024-10-17 21:49 ` Palmer Dabbelt 2024-10-17 21:49 ` Palmer Dabbelt 2024-10-10 12:25 ` [PATCH v2 " Sebastian Andrzej Siewior 2024-10-10 12:25 ` Sebastian Andrzej Siewior 2024-12-11 22:32 ` patchwork-bot+linux-riscv 2024-12-11 22:32 ` patchwork-bot+linux-riscv
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.