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: Wed, 21 Feb 2024 19:00:55 +0800
From: Xuewen Yan <xuewen.yan94@...il.com>
To: Tejun Heo <tj@...nel.org>
Cc: Xuewen Yan <xuewen.yan@...soc.com>, jiangshanlai@...il.com, corbet@....net, 
	paulmck@...nel.org, rdunlap@...radead.org, peterz@...radead.org, 
	yanjiewtw@...il.com, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, 
	ke.wang@...soc.com
Subject: Re: [PATCH] workqueue: Control the frequency of intensive warning
 through cmdline

Hi Tejun

On Wed, Feb 21, 2024 at 1:44 PM Tejun Heo <tj@...nel.org> wrote:
>
> Hello,
>
> On Wed, Feb 21, 2024 at 10:01:17AM +0800, Xuewen Yan wrote:
> >                 cnt = atomic64_inc_return_relaxed(&ent->cnt);
> > -               if (cnt >= 4 && is_power_of_2(cnt))
> > +               if (cnt == wq_cpu_intensive_warning_nth ||
> > +                   (cnt > wq_cpu_intensive_warning_nth && is_power_of_2(cnt)))
>
> If we do this the nth name doesn't really make sense. Maybe something like
> wq_cpu_intensive_warning_thresh is better? Also, something like the
> following might be more predictable. Let's say
> wq_cpu_intensive_warning_thresh of 0 disables the warnings and it's
> initialized to 4 by default.
>
>         if (cnt >= wq_cpu_intensive_warning_thresh &&
>             is_power_of_2(cnt + 1 - wq_cpu_intensive_warning_thresh))
>

This way looks simpler, but it could not disable the warnings, but I
think this is okay, because even if the threshold is set to 0, the
warning will only be printed when 1, 3, 7, 15....

I will send patch-v2 later as you suggested:)

Thanks.
BR

--
xuewen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ