linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	David Howells <dhowells@redhat.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: Problem with WARN_ON in mutex_trylock() and rxrpc
Date: Tue, 10 Dec 2019 22:53:56 +0100	[thread overview]
Message-ID: <20191210215356.GC11457@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20191210203225.2kvykwn35gnethjn@linutronix.de>

On Tue, Dec 10, 2019 at 09:32:25PM +0100, Sebastian Andrzej Siewior wrote:
> On 2019-12-10 20:25:38 [+0100], Peter Zijlstra wrote:
> > AFAICT the only assumption it relies on are:
> > 
> >  - that the softirq will cleanly preempt a task. That is, the task
> >    context must not change under the softirq execution.
> > 
> >  - that the softirq runs non-preemptible.
> > 
> > Now, both these properties are rather fundamental to how our softirqs
> > work. And can, therefore, be relied upon, irrespective of the mutex
> > implementation.
> 
> softirq is preemptible on -RT (I think you know that already but just in
> case).

Indeed, but there it also runs in task context and then it all works
naturally. The !preempt thing is required for when it runs on top of a
task; then it functions as a priority ceiling like construct.

      reply	other threads:[~2019-12-10 21:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 12:02 Problem with WARN_ON in mutex_trylock() and rxrpc David Howells
2019-12-05 13:22 ` Peter Zijlstra
2019-12-06 12:32   ` Peter Zijlstra
2019-12-10 18:33   ` Thomas Gleixner
2019-12-10 19:25     ` Peter Zijlstra
2019-12-10 20:32       ` Sebastian Andrzej Siewior
2019-12-10 21:53         ` Peter Zijlstra [this message]

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=20191210215356.GC11457@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=dhowells@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).