public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: Re: [PATCH] random: use raw spinlocks for use on RT
Date: Wed, 31 Aug 2022 12:27:12 -0400	[thread overview]
Message-ID: <Yw+L4JT1yuXnbIbI@zx2c4.com> (raw)
In-Reply-To: <Yw5dqweo0bQDvPkP@linutronix.de>

On Tue, Aug 30, 2022 at 08:57:47PM +0200, Sebastian Andrzej Siewior wrote:
> On 2022-08-30 11:24:33 [-0400], Jason A. Donenfeld wrote:
> > Hi Sebastian,
> Hi Jason,
> 
> > On Tue, Aug 30, 2022 at 12:13:44PM +0200, Sebastian Andrzej Siewior wrote:
> > > The first patch did so yes. The second simply retried in two secs and
> > > this shouldn't be problematic.
> > 
> > This seemed pretty bad too, because now you potentially miss up to 2
> > seconds of messages AND it adds more complexity.
> 
> It is early at boot and it could be reduced to one if it helps. I
> remember you had a suggestion where we would lose always the first print
> out on RT you said it is okay since you can't rely on that…

I mean, the mechanism now is simple and doesn't fail. What you're
suggesting is more complex and fails sometimes. So,

> > I'm fine with changing things up to accommodate RT, but not when the
> > result is so obviously worse than before.
> 
> I don't think it is worse. This is your opinion and I did not hear any
> other feedback so far.

so, I think it's beyond a matter of opinion and is actually objectively
worse.

And it's not like I even care particularly much about vnsprintf; as I
said before, none of this really matters _that_ much. But I *do* very
much object to dirtying up random bits of code and making things
actually worse in the name of RT, especially when there are other
solutions being considered. Namely:

> > In my tests I can't see any latency difference with using raw spinlocks
> > in random.c. Maybe I'm doing things wrong? But I'm not seeing anything
> > change...
> 
> You need to look at the maximum latency that may happen. Also the other
> thing is that there is no need to add raw_spinlock_t locking if it can
> be avoided.

I really am having trouble fashioning a test that shows a higher maximum
latency. All the RNG critical sections are really short in the end. So I
dunno... seems like not a big deal to me. If you're seeing different
numbers, can you post them and how you came up with them? If I can
reproduce it, maybe it's possible for me to do something about that
latency. But so far I'm not seeing any latency spike...

Jason

      reply	other threads:[~2022-08-31 16:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 14:25 [PATCH] random: use raw spinlocks for use on RT Jason A. Donenfeld
2022-08-01 14:34 ` Sebastian Andrzej Siewior
2022-08-01 14:41   ` Jason A. Donenfeld
2022-08-11  0:17   ` Jason A. Donenfeld
2022-08-11  7:15     ` Sebastian Andrzej Siewior
2022-08-11 14:20       ` Jason A. Donenfeld
2022-08-15 10:26         ` David Laight
2022-08-16 14:02         ` Jason A. Donenfeld
2022-08-29 19:45         ` Sebastian Andrzej Siewior
2022-08-29 19:56           ` Jason A. Donenfeld
2022-08-30 10:13             ` Sebastian Andrzej Siewior
2022-08-30 15:24               ` Jason A. Donenfeld
2022-08-30 18:57                 ` Sebastian Andrzej Siewior
2022-08-31 16:27                   ` Jason A. Donenfeld [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=Yw+L4JT1yuXnbIbI@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.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