lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Nov 2020 11:24:27 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     "Zhang, Qiang" <Qiang.Zhang@...driver.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        "tj@...nel.org" <tj@...nel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 回复: [PATCH] kthread_worker: Add
 flush delayed work func

On Fri 2020-11-13 08:59:37, Zhang, Qiang wrote:
> 
> 
> ________________________________________
> 发件人: Andrew Morton <akpm@...ux-foundation.org>
> 发送时间: 2020年11月13日 8:01
> 收件人: Zhang, Qiang
> 抄送: pmladek@...e.com; tj@...nel.org; linux-mm@...ck.org; linux-kernel@...r.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@...driver.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ