public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	John Ogness <john.ogness@linutronix.de>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v4 2/2] lib/vsprintf: Initialize vsprintf's pointer hash once the random core is ready.
Date: Thu, 29 Sep 2022 10:52:02 +0200	[thread overview]
Message-ID: <YzVcsvw3wv0FVOZO@alley> (raw)
In-Reply-To: <CAHmME9qzBRDfUh1vN6qW6BFuFz_qcuaEOR13Ojx2CzC_+CHxUw@mail.gmail.com>

On Wed 2022-09-28 11:21:05, Jason A. Donenfeld wrote:
> On 9/28/22, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> >
> >> I could replace "system_unbound_wq" with "system_wq" when
> >> pushing. Is anybody against it, please?
> >
> > so schedule_delayed_work() then?

yup.

> > I don't mind at all. I used that one just because serialisation is not
> > needed and neither is the CPU important.
> 
> Indeed, given that this very much is unbound, I think Sebastian's
> original patch makes most sense.

Yes, the work does not need any specific CPU. The thing is that the
normal system_wq is the preferred one. Any other workqueues should
be used only when there is a particular reason for it.

The unbound_wq should be used only when:

    + the work needs a lot of CPU time.

    + there are waves on related (sleeping) work items that might be
      triggered from different CPUs.

In our case, the work is only one and short. The preferred
system_wq is perfectly fine.

Best Regards,
Petr

PS: It is not obvious. Tejun told me this when I converted a kthread
    into the workqueue API. Also I spent quite some time understanding
    the workqueue code recently.

  reply	other threads:[~2022-09-29  8:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 10:49 [PATCH 0/2 v4] Init the hashed pointer from a worker Sebastian Andrzej Siewior
2022-09-27 10:49 ` [PATCH v4 1/2] lib/vsprintf: Remove static_branch_likely() from __ptr_to_hashval() Sebastian Andrzej Siewior
2022-09-27 14:49   ` Petr Mladek
2022-09-30 10:27   ` Sergey Senozhatsky
2022-09-27 10:49 ` [PATCH v4 2/2] lib/vsprintf: Initialize vsprintf's pointer hash once the random core is ready Sebastian Andrzej Siewior
2022-09-27 11:20   ` Jason A. Donenfeld
2022-09-27 16:40   ` Petr Mladek
2022-09-28  9:11     ` Sebastian Andrzej Siewior
2022-09-28  9:21       ` Jason A. Donenfeld
2022-09-29  8:52         ` Petr Mladek [this message]
2022-09-30 10:31     ` Sergey Senozhatsky
2022-09-29 12:43 ` [PATCH 0/2 v4] Init the hashed pointer from a worker Petr Mladek

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=YzVcsvw3wv0FVOZO@alley \
    --to=pmladek@suse.com \
    --cc=Jason@zx2c4.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tytso@mit.edu \
    /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