All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@google.com>
To: Mark Brown <broonie@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH 5/5] spi: Reduce kthread priority
Date: Thu, 1 Aug 2019 08:44:01 -0700	[thread overview]
Message-ID: <CAD=FV=UsYF1R6+XRfFFFm6PfmkTsEOfxxgCw2JxCnpyu1kGVLQ@mail.gmail.com> (raw)
In-Reply-To: <20190801123503.GC5488@sirena.org.uk>

Hi,

On Thu, Aug 1, 2019 at 5:35 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Aug 01, 2019 at 02:17:18PM +0200, Peter Zijlstra wrote:
>
> > I'm thinking that isn't true 99% of the time, except of course when that
> > bandsaw emergency break is attached through SPI, but in that case the
> > admin can very well chrt the prio of this thread.
>
> The SPI thread isn't usually RT, it's only made RT if something in the
> system asks for it - the reason the ChromeOS people got CCed in is that
> some of their embedded controllers are very fragile and need super tight
> timing on some of the interactions over their control interface so
> they're one of the users here.  Of course everyone is then going to
> claim that their usage is the most critical usage in the system, and
> they may well even be right, but I do tend to agree that just any old RT
> priority is probably a sensible default since for most cases there will
> be few if any other RT tasks anyway.

For the Chrome OS case I believe that "MAX_RT_PRIO / 2" should be just
fine.  In fact in an earlier version of my work to make CrOS EC work
better at <https://crrev.com/c/1603464> I had said "We'll arbitrarily
pick a priority of "MAX_RT_PRIO / 4 - 1", AKA 24.  This seems to work
fine in practice."  I only switched to "MAX_RT_PRIO - 1" to match the
SPI code.

Mostly we just need to be a bit higher than things that request the
highest non-realtime priority, notably DM Crypt and loopback which
both schedule a bunch of work on the high priority system workqueue.
Those two things in particular seem to want high priority for
performance reasons but not for correctness reasons.  As mentioned
earlier our EC will actually fail transfers if there is too much
delay.

Thus:

Reviewed-by: Douglas Anderson <dianders@chromium.org>

  reply	other threads:[~2019-08-01 15:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 11:13 [PATCH 0/5] Fix FIFO-99 abuse Peter Zijlstra
2019-08-01 11:13 ` [PATCH 1/5] sched/pci: Reduce psimon FIFO priority Peter Zijlstra
2019-08-01 17:49   ` Johannes Weiner
2019-08-01 18:31     ` Suren Baghdasaryan
2019-08-01 21:03       ` Suren Baghdasaryan
2019-08-01 21:02     ` Peter Zijlstra
2019-08-01 11:13 ` [PATCH 2/5] rcu/tree: Fix SCHED_FIFO params Peter Zijlstra
2019-08-01 13:51   ` Paul E. McKenney
2019-08-01 14:43     ` Peter Zijlstra
2019-08-01 15:33       ` Paul E. McKenney
2019-08-01 11:13 ` [PATCH 3/5] crypto: Reduce default RT priority Peter Zijlstra
2019-08-09  6:19   ` Herbert Xu
2019-08-01 11:13 ` [PATCH 4/5] media/ivtv: Reduce default FIFO priority Peter Zijlstra
2019-08-01 12:24   ` Andy Walls
2019-08-01 12:38     ` Peter Zijlstra
2019-08-02  8:58       ` Peter Zijlstra
2019-08-07  9:26         ` Hans Verkuil
2019-08-01 11:13 ` [PATCH 5/5] spi: Reduce kthread priority Peter Zijlstra
2019-08-01 11:26   ` Mark Brown
2019-08-01 12:07     ` Peter Zijlstra
2019-08-01 11:27   ` Geert Uytterhoeven
2019-08-01 12:12     ` Peter Zijlstra
2019-08-01 12:16       ` Geert Uytterhoeven
2019-08-01 11:27   ` Enric Balletbo i Serra
2019-08-01 12:17     ` Peter Zijlstra
2019-08-01 12:35       ` Mark Brown
2019-08-01 15:44         ` Doug Anderson [this message]
2019-08-02 11:22   ` Applied "spi: Reduce kthread priority" to the spi tree Mark Brown
2019-08-02 11:22     ` Mark Brown
2019-08-01 13:17 ` [PATCH 0/5] Fix FIFO-99 abuse Qais Yousef
2019-08-02  9:32   ` Peter Zijlstra
2019-08-02  9:50     ` Thomas Gleixner
2019-08-02 10:26     ` Qais Yousef
2019-08-02 12:41       ` Peter Zijlstra
2019-08-02 14:08         ` Qais Yousef
2019-08-02 14:33           ` Peter Zijlstra
2019-08-02 15:21             ` Qais Yousef

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='CAD=FV=UsYF1R6+XRfFFFm6PfmkTsEOfxxgCw2JxCnpyu1kGVLQ@mail.gmail.com' \
    --to=dianders@google.com \
    --cc=bleung@chromium.org \
    --cc=broonie@kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.