public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Sewior <bigeasy@linutronix.de>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Peter Ziljstra <peterz@infradead.org>,
	Andrii Nakryiko <andrii@kernel.org>, bpf <bpf@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: uprobe splat in PREEMP_RT
Date: Wed, 2 Apr 2025 12:54:44 +0200	[thread overview]
Message-ID: <20250402105444.tW8UU7vO@linutronix.de> (raw)
In-Reply-To: <20250402091044.GB22091@redhat.com>

On 2025-04-02 11:10:45 [+0200], Oleg Nesterov wrote:
> Add Peter.
> 
> I never understood why __seqprop_preemptible() returns false.
> Stupid question, perhaps
> 
> 	--- x/include/linux/seqlock.h
> 	+++ x/include/linux/seqlock.h
> 	@@ -213,12 +213,11 @@ static inline unsigned __seqprop_sequenc
> 	 
> 	 static inline bool __seqprop_preemptible(const seqcount_t *s)
> 	 {
> 	-	return false;
> 	+	return true;
> 	 }
> 	 
> 	 static inline void __seqprop_assert(const seqcount_t *s)
> 	 {
> 	-	lockdep_assert_preemption_disabled();
> 	 }
> 	 
> 	 #define __SEQ_RT	IS_ENABLED(CONFIG_PREEMPT_RT)
> 
> makes more sense?
> 
> Then we can remove the no longer necessary preempt_disable()'s
> before write_seqcount_begin() in other users of seqcount_t.

This depends on locktype that is coupled with the seqcount.
If the lock disables preemption and relies on it then it must be somehow
enforced on PREEMPT_RT or rely on the lock+unlock mechnanism to avoid
deadlocks. Also it needs to be ensured that you don't have two writer
since preemption is allowed.

> Oleg.

Sebastian

  reply	other threads:[~2025-04-02 10:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 21:04 uprobe splat in PREEMP_RT Alexei Starovoitov
2025-04-01 21:22 ` Steven Rostedt
2025-04-01 22:01   ` Andrii Nakryiko
2025-04-02 10:33     ` Oleg Nesterov
2025-04-02 10:57       ` Sebastian Sewior
2025-04-02 11:23         ` Oleg Nesterov
2025-04-02 12:13           ` Sebastian Sewior
2025-04-02 12:18             ` Oleg Nesterov
2025-04-02 12:24               ` Sebastian Sewior
2025-04-02 14:12                 ` Oleg Nesterov
2025-04-03  7:37                   ` Sebastian Sewior
2025-04-03 12:27                     ` Oleg Nesterov
2025-04-03 16:04                       ` Andrii Nakryiko
2025-04-02 16:15       ` Andrii Nakryiko
2025-04-02 16:57         ` Oleg Nesterov
2025-04-02 12:21     ` Sebastian Sewior
2025-04-02  9:10 ` Oleg Nesterov
2025-04-02 10:54   ` Sebastian Sewior [this message]
2025-04-02 11:20     ` Oleg Nesterov
2025-04-02 11:31       ` Oleg Nesterov
2025-04-02 12:06         ` Sebastian Sewior
2025-04-02 12:12           ` Oleg Nesterov
2025-04-02 12:16             ` Sebastian Sewior
2025-04-02 13:56               ` Oleg Nesterov
2025-04-02 14:23                 ` Oleg Nesterov
2025-04-03  9:08                   ` Sebastian Sewior
2025-04-03 12:11                     ` Oleg Nesterov
2025-04-03 12:43                       ` Oleg Nesterov

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=20250402105444.tW8UU7vO@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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