mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: 0day robot <lkp@intel.com>, LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH] workqueue: Use private WQ for schedule_on_each_cpu() API
Date: Wed, 23 Feb 2022 11:33:02 -1000	[thread overview]
Message-ID: <YhaoDiJ8MUOhRmp6@slm.duckdns.org> (raw)
In-Reply-To: <16a33a65-3c67-ef66-ccc8-9c4fffb0ae5a@I-love.SAKURA.ne.jp>

On Wed, Feb 23, 2022 at 09:57:27AM +0900, Tetsuo Handa wrote:
> On 2022/02/23 2:29, Tejun Heo wrote:
> > On Mon, Feb 21, 2022 at 07:38:09PM +0900, Tetsuo Handa wrote:
> >> Since schedule_on_each_cpu() calls schedule_work_on() and flush_work(),
> >> we should avoid using system_wq in order to avoid unexpected locking
> >> dependency.
> > 
> > I don't get it. schedule_on_each_cpu() is flushing each work item and thus
> > shouldn't need its own flushing domain. What's this change for?
> 
> A kernel test robot tested "[PATCH v2] workqueue: Warn flush attempt using
> system-wide workqueues" on 5.16.0-06523-g29bd199e4e73 and hit a lockdep
> warning ( https://lkml.kernel.org/r/20220221083358.GC835@xsang-OptiPlex-9020 ).
> 
> Although the circular locking dependency itself needs to be handled by
> lockless console printing support, we won't be able to apply
> "[PATCH v2] workqueue: Warn flush attempt using system-wide workqueues"
> if schedule_on_each_cpu() continues using system-wide workqueues.

The patch seems pretty wrong. What's problematic is system workqueue flushes
(which flushes the entire workqueue), not work item flushes.

Thanks.

-- 
tejun

  reply	other threads:[~2022-02-23 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21  8:33 [workqueue] 29bd199e4e: WARNING:possible_circular_locking_dependency_detected kernel test robot
2022-02-21 10:38 ` [PATCH] workqueue: Use private WQ for schedule_on_each_cpu() API Tetsuo Handa
2022-02-22 17:29   ` Tejun Heo
2022-02-23  0:57     ` Tetsuo Handa
2022-02-23 21:33       ` Tejun Heo [this message]
2022-02-23 22:26         ` Tetsuo Handa
2022-02-23 22:29           ` Tejun Heo
2022-02-28 14:03             ` [PATCH v3] workqueue: Warn flushing of kernel-global workqueues Tetsuo Handa
2022-02-28 18:42               ` Tejun Heo
2022-03-17 22:25                 ` Tetsuo Handa

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=YhaoDiJ8MUOhRmp6@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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

all inboxes | Powered by JetHome®