From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, mingo@kernel.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, ankur.a.arora@oracle.com, efault@gmx.de,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Jisheng Zhang <jszhang@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/3] riscv: add PREEMPT_LAZY support
Date: Wed, 9 Oct 2024 15:03:07 +0200 [thread overview]
Message-ID: <20241009130307.GN17263@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241009105709.887510-4-bigeasy@linutronix.de>
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...
next prev parent reply other threads:[~2024-10-09 13:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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-16 9:17 ` Shrikanth Hegde
2024-10-09 10:50 ` [PATCH 3/3] riscv: add PREEMPT_LAZY support Sebastian Andrzej Siewior
2024-10-09 13:03 ` Peter Zijlstra [this message]
2024-10-09 13:05 ` Sebastian Andrzej Siewior
2024-10-17 21:49 ` Palmer Dabbelt
2024-10-10 12:25 ` [PATCH v2 " Sebastian Andrzej Siewior
2024-12-11 22:32 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241009130307.GN17263@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ankur.a.arora@oracle.com \
--cc=aou@eecs.berkeley.edu \
--cc=bigeasy@linutronix.de \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=jszhang@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox