Linux filesystem development
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ran Hongyun <ranhongyun1@huawei.com>
Cc: <florian.bezdeka@siemens.com>, <axboe@kernel.dk>,
	<bigeasy@linutronix.de>, <brauner@kernel.org>,
	<chengzhihao1@huawei.com>, <clrkwllms@kernel.org>,
	<frederic@kernel.org>, <jack@suse.cz>, <jdamato@fastly.com>,
	<john.ogness@linutronix.de>, <kprateek.nayak@amd.com>,
	<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-rt-devel@lists.linux.dev>,
	<linux-rt-users@vger.kernel.org>, <mkarsten@uwaterloo.ca>,
	<namcao@linutronix.de>, <stable@vger.kernel.org>,
	<torvalds@linux-foundation.org>, <viro@zeniv.linux.org.uk>,
	<vschneid@redhat.com>, <wozizhi@huawei.com>, <xry111@xry111.site>,
	<yangerkun@huawei.com>, <yi.zhang@huawei.com>
Subject: Re: [QUESTION] Are these issues PREEMPT_RT-specific?
Date: Wed, 9 Sep 2026 08:49:06 -0400	[thread overview]
Message-ID: <20260909084906.75ebe0ea@gandalf.local.home> (raw)
In-Reply-To: <20260909030506.344667-1-ranhongyun1@huawei.com>

On Wed, 9 Sep 2026 11:05:05 +0800
Ran Hongyun <ranhongyun1@huawei.com> wrote:

> Florian,
> 
> Thank you for your reply.
> 
> Now I understand that the issues are particularly critical on PREEMPT_RT. 
> However, I’m still not entirely clear about the "performance or throughput
> drop" you mentioned for !RT systems. Since !RT kernels are
> non-preemptible, unbounded priority inversion and stalls should not occur.

That is incorrect. !RT kernels have been preemptible for decades. There are
different levels:

  SERVER - non preemptible (but no distributions use that)
  VOLUNTARY - Has preemptible points in the kernel (might_sleep()) - most distros used this
  FULL - Preempts everywhere that doesn't turn off preemption
  RT - Turns spin locks into mutexes and preempts there too

Regardless of that, unbound priority inversion can happen even in SERVER
mode. All it takes is three tasks sharing a mutex. Only RT implements
priority inheritance (for all locks but reader locks) in the kernel which
would prevent unbounded priority inversion with normal locks.

> Are there any other factors that could still cause such a performance or
> throughput drop?
> 
> In other words, if I am running a !RT system, what benefit can I actually
> expect from switching from rwlock to spinlock?

Lack of priority inheritance is true for both RT and !RT in rwlocks. Hence
that does affect both of them.

-- Steve

  reply	other threads:[~2026-09-09 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 12:46 [PATCH v4 0/1] eventpoll: Fix priority inversion problem Nam Cao
2025-07-15 12:46 ` [PATCH v4 1/1] eventpoll: Replace rwlock with spinlock Nam Cao
2025-07-15 12:58   ` Nam Cao
2025-07-15 16:42   ` Linus Torvalds
2025-07-16  7:41     ` Nam Cao
2025-07-16  8:34   ` K Prateek Nayak
2025-08-26  8:43   ` Nam Cao
2025-09-03  8:40     ` Sebastian Andrzej Siewior
2025-09-05 13:52       ` Christian Brauner
2026-09-04  8:10   ` [QUESTION] Are these issues PREEMq:PT_RT-specific? Ran Hongyun
2026-09-04  8:11   ` [QUESTION] Are these issues PREEMPT_RT-specific? Ran Hongyun
2026-09-04  8:52     ` Florian Bezdeka
2026-09-09  3:05       ` Ran Hongyun
2026-09-09 12:49         ` Steven Rostedt [this message]
2026-09-04  9:00     ` K Prateek Nayak
2026-09-04 13:47     ` Steven Rostedt
2025-09-05 13:52 ` [PATCH v4 0/1] eventpoll: Fix priority inversion problem Christian Brauner

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=20260909084906.75ebe0ea@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=brauner@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=clrkwllms@kernel.org \
    --cc=florian.bezdeka@siemens.com \
    --cc=frederic@kernel.org \
    --cc=jack@suse.cz \
    --cc=jdamato@fastly.com \
    --cc=john.ogness@linutronix.de \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mkarsten@uwaterloo.ca \
    --cc=namcao@linutronix.de \
    --cc=ranhongyun1@huawei.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vschneid@redhat.com \
    --cc=wozizhi@huawei.com \
    --cc=xry111@xry111.site \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.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