All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <jstultz@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, "Wei Wang" <wvw@google.com>,
	"Midas Chien" <midaschieh@google.com>,
	"Chunhui Li (李春辉)" <chunhui.li@mediatek.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Anton Vorontsov" <anton@enomsg.org>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	"Tony Luck" <tony.luck@intel.com>,
	kernel-team@android.com
Subject: Re: [PATCH v2] pstore: Revert pmsg_lock back to a normal mutex
Date: Mon, 6 Mar 2023 10:27:34 -0800	[thread overview]
Message-ID: <CANDhNCp3OZv8KvBMLAAYj-qN+36AdVs7Ow8kPBP6h5KGxw9KGw@mail.gmail.com> (raw)
In-Reply-To: <20230305113632.26de0a4d@gandalf.local.home>

On Sun, Mar 5, 2023 at 8:36 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Sat,  4 Mar 2023 03:10:29 +0000
> John Stultz <jstultz@google.com> wrote:
>
> > This reverts commit 76d62f24db07f22ccf9bc18ca793c27d4ebef721.
> >
> > So while priority inversion on the pmsg_lock is an occasional
> > problem that an rt_mutex would help with, in uses where logging
> > is writing to pmsg heavily from multiple threads, the pmsg_lock
> > can be heavily contended.
> >
> > Normal mutexes can do adaptive spinning, which keeps the
> > contention overhead fairly low maybe adding on the order of 10s
> > of us delay waiting, but the slowpath w/ rt_mutexes makes the
> > blocked tasks sleep & wake. This makes matters worse when there
> > is heavy contentention, as it just allows additional threads to
> > run and line up to try to take the lock.
>
> That is incorrect. rt_mutexes have pretty much the same adaptive spinning
> as normal mutexes. So that is *not* the reason for the difference in
> performance, and should not be stated so in this change log.

Good point. Apologies, I was trying to describe the *behavior* being
seen in the traces by switching between mutex and rt_mtuex, but I do
see how it reads as a description of the capabilities of the
primitive.

thanks
-john

      parent reply	other threads:[~2023-03-06 18:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  6:27 [PATCH] pstore: Revert pmsg_lock back to a normal mutex John Stultz
2023-03-02 13:24 ` Steven Rostedt
2023-03-02 19:39   ` John Stultz
2023-03-02 20:21     ` Steven Rostedt
2023-03-02 21:32       ` Steven Rostedt
2023-03-02 21:36         ` Steven Rostedt
2023-03-02 21:56           ` Steven Rostedt
2023-03-03  1:01             ` Steven Rostedt
2023-03-03 18:11               ` Joel Fernandes
2023-03-03 18:37                 ` Steven Rostedt
2023-03-03 19:25                   ` Joel Fernandes
2023-03-03 19:38                     ` Steven Rostedt
2023-03-03 20:36                       ` Qais Yousef
2023-03-04  3:21                         ` Joel Fernandes
2023-03-06 19:19                           ` Qais Yousef
2023-03-04  3:01                       ` Joel Fernandes
2023-03-04  3:23                         ` Joel Fernandes
2023-03-07 14:08                 ` Peter Zijlstra
2023-03-07 20:19                   ` Joel Fernandes
2023-03-06 18:30               ` John Stultz
2023-03-08  1:31               ` Steven Rostedt
2023-03-08 20:04                 ` John Stultz
2023-03-08 20:41                   ` Steven Rostedt
2023-03-02 22:41       ` David Laight
2023-03-02 22:53         ` Steven Rostedt
2023-03-04  3:10 ` [PATCH v2] " John Stultz
2023-03-05 16:36   ` Steven Rostedt
2023-03-06  1:03     ` Hillf Danton
2023-03-06 15:28       ` Steven Rostedt
2023-03-07  0:31         ` Hillf Danton
2023-03-07  1:58           ` Steven Rostedt
2023-03-06 18:27     ` John Stultz [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=CANDhNCp3OZv8KvBMLAAYj-qN+36AdVs7Ow8kPBP6h5KGxw9KGw@mail.gmail.com \
    --to=jstultz@google.com \
    --cc=anton@enomsg.org \
    --cc=chunhui.li@mediatek.com \
    --cc=gpiccoli@igalia.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=midaschieh@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tony.luck@intel.com \
    --cc=wvw@google.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 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.