linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: qianli zhao <zhaoqianligood@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Qianli Zhao <zhaoqianli@xiaomi.com>, Tejun Heo <tj@kernel.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] workqueue: Warn when work flush own workqueue
Date: Tue, 25 Aug 2020 16:55:52 +0800	[thread overview]
Message-ID: <CAPx_LQEaVq_LFXdhTAkyc_EczurqkLzKcVhb6YKFw6V_0jQbvg@mail.gmail.com> (raw)
In-Reply-To: <8aef74ea-5b28-07e1-d66b-91ed9e0920e9@web.de>

Markus

Thanks for your suggestion,and sorry for my poor wording.

On Tue, Aug 25, 2020 at 4:00 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> > Flushing own workqueue or work self in work context will lead to
> > a deadlock.
>
> I imagine that the wording “or work self” can become clearer another bit.
>
>
> > Catch this incorrect usage and issue a warning when issue happened
>
> * Would you like to mark the end of such a sentence with a dot?
>
> * How do you think about to adjust the repetition of the word “issue”?

How about below changelog?

workqueue: Warn when work flush own workqueue

Flushing itself or own workqueue in work context will
lead to a deadlock.
Catch this incorrect usage and warning when issue happened.

>
>
> …
> > - update comment
> > ---
> >  kernel/workqueue.c | 10 +++++++---
>
> I suggest to replace these triple dashes by a blank line.
Ok
>
>
> …
> > @@ -2585,6 +2585,7 @@ static int rescuer_thread(void *__rescuer)
> >   * @target_work: work item being flushed (NULL for workqueue flushes)
> >   *
> >   * %current is trying to flush the whole @target_wq or @target_work on it.
> > + * If a work flushing own workqueue or itself will lead to a deadlock.
>
> I stumble on understanding challenges for the wording “work flushing”.
> Can an adjustment help in comparison to the term “work item”?

How about below comment?

* If a work item flushing own workqueue or itself will lead to a deadlock.

>
> Regards,
> Markus

  parent reply	other threads:[~2020-08-25  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25  3:06 [PATCH v2] workqueue: Warn when work flush own workqueue Qianli Zhao
     [not found] ` <8aef74ea-5b28-07e1-d66b-91ed9e0920e9@web.de>
2020-08-25  8:55   ` qianli zhao [this message]
2020-08-25 10:04     ` Dan Carpenter

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=CAPx_LQEaVq_LFXdhTAkyc_EczurqkLzKcVhb6YKFw6V_0jQbvg@mail.gmail.com \
    --to=zhaoqianligood@gmail.com \
    --cc=Markus.Elfring@web.de \
    --cc=jiangshanlai@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=zhaoqianli@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).