From: Greg KH <gregkh@linuxfoundation.org>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: stable@vger.kernel.org, Waiman Long <longman@redhat.com>,
Mukesh Ojha <quic_mojha@quicinc.com>,
Peter Zijlstra <peterz@infradead.org>,
mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com,
linux-kernel@vger.kernel.org,
Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Subject: Re: [PATCH v2] locking/rwsem: Disable preemption while trying for rwsem lock
Date: Tue, 2 Apr 2024 19:42:03 +0200 [thread overview]
Message-ID: <2024040242-babbling-dreamy-6336@gregkh> (raw)
In-Reply-To: <20240402173032.GC91663@darkstar.musicnaut.iki.fi>
On Tue, Apr 02, 2024 at 08:30:32PM +0300, Aaro Koskinen wrote:
> Stable team,
>
> Please cherry-pick this patch into v5.15 stable:
>
> locking/rwsem: Disable preemption while trying for rwsem lock
>
> commit 48dfb5d2560d36fb16c7d430c229d1604ea7d185
>
> It fixes the following bug present in v5.15:
>
> > > > From: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
> > > > We observe RT task is hogging CPU when trying to acquire rwsem lock
> > > > which was acquired by a kworker task but before the rwsem owner was set.
> > > >
> > > > Here is the scenario:
> > > > 1. CFS task (affined to a particular CPU) takes rwsem lock.
> > > >
> > > > 2. CFS task gets preempted by a RT task before setting owner.
> > > >
> > > > 3. RT task (FIFO) is trying to acquire the lock, but spinning until
> > > > RT throttling happens for the lock as the lock was taken by CFS task.
>
> If the RT throttling is disabled, the RT task will remain looping forever
> in the kernel. If the system is UP, it will lock up completely.
>
> The issue can be easily reproduced by running RT task and normal task which
> are affined to the same CPU core.
Does this only affect the -rt patchset, or is this an issue with a
"clean" kernel release?
thanks,
greg k-h
next prev parent reply other threads:[~2024-04-02 17:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 18:24 [PATCH v2] locking/rwsem: Disable preemption while trying for rwsem lock Mukesh Ojha
2022-09-08 18:30 ` Waiman Long
2022-09-15 14:23 ` [tip: locking/core] " tip-bot2 for Gokul krishna Krishnakumar
2024-03-05 11:04 ` [PATCH v2] " Aaro Koskinen
2024-03-05 14:55 ` Waiman Long
2024-04-02 17:30 ` Aaro Koskinen
2024-04-02 17:42 ` Greg KH [this message]
2024-04-02 18:25 ` Aaro Koskinen
2024-04-05 6:32 ` Greg KH
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=2024040242-babbling-dreamy-6336@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=aaro.koskinen@iki.fi \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quic_gokukris@quicinc.com \
--cc=quic_mojha@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=will@kernel.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 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.