linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"tj@kernel.org" <tj@kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复: [PATCH] kthread_worker: Add flush delayed work func
Date: Fri, 13 Nov 2020 11:24:27 +0100	[thread overview]
Message-ID: <20201113102427.GI20201@alley> (raw)
In-Reply-To: <BYAPR11MB263258BCE554A9EFD2F3A8A7FFE60@BYAPR11MB2632.namprd11.prod.outlook.com>

On Fri 2020-11-13 08:59:37, Zhang, Qiang wrote:
> 
> 
> ________________________________________
> 发件人: Andrew Morton <akpm@linux-foundation.org>
> 发送时间: 2020年11月13日 8:01
> 收件人: Zhang, Qiang
> 抄送: pmladek@suse.com; tj@kernel.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org
> 主题: Re: [PATCH] kthread_worker: Add flush delayed work func
> 
> [Please note this e-mail is from an EXTERNAL e-mail address]
> 
> On Wed, 11 Nov 2020 17:13:55 +0800 qiang.zhang@windriver.com wrote:
> 
> > Add 'kthread_flush_delayed_work' func, the principle of
> > this func is wait for a dwork to finish executing the
> > last queueing.
> >
> >We'd like to see some code which actually uses this new function
> >please.  Either in this patch or as one or more followup patches.
> >
> >btw, we call it "function", not "func".  But neither is really needed -
> >just use () to identify a function.  ie:
> 
> >: Add kthread_flush_delayed_work().  The principle of this is to wait for
> >: a dwork to finish executing the last queueing.
> 
> I don't see it being used in the kernel code so far, and I'm not sure if it's going to be used in subsequent scenarios (it like flush_delayed_work in workqueue )or whether it's currently using "kthread_work" some code needs it.

I agree with Andrew. It does not make sense to add/maintain new API
when it is not going to be used.

The kthread_worker API is used only when the kthread needs some special
scheduling policy or priority. There always will be only few users
in compare with the workqueues API. It is possible that this function
will never be necessary.

Best Regards,
Petr

  reply	other threads:[~2020-11-13 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  9:13 [PATCH] kthread_worker: Add flush delayed work func qiang.zhang
2020-11-13  0:01 ` Andrew Morton
2020-11-13  8:59   ` 回复: " Zhang, Qiang
2020-11-13 10:24     ` Petr Mladek [this message]
2020-11-16 16:23 ` Christoph Hellwig

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=20201113102427.GI20201@alley \
    --to=pmladek@suse.com \
    --cc=Qiang.Zhang@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tj@kernel.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 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).