lkml.org 
[lkml]   [2021]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1] Add info log when user enables NOHZ in commandline but NOHZ is not possible
Date
Ani,

On Sun, Jun 27 2021 at 12:58, Ani Sinha wrote:

same comment vs. Subject, 'this patch' and 'we'

> @@ -930,6 +930,7 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
> {
> #ifdef CONFIG_NO_HZ_FULL
> int cpu = smp_processor_id();
> + static bool no_tick_warned;
>
> if (!tick_nohz_full_cpu(cpu))
> return;
> @@ -937,10 +938,24 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
> if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE)
> return;
>
> - if (can_stop_full_tick(cpu, ts))
> + if (can_stop_full_tick(cpu, ts)) {
> tick_nohz_stop_sched_tick(ts, cpu);
> - else if (ts->tick_stopped)
> - tick_nohz_restart_sched_tick(ts, ktime_get());
> + if (no_tick_warned) {
> + pr_info("NO_HZ_FULL is now enabled in the system.\n");
> + no_tick_warned = false;
> + }
> + } else {
> + /*
> + * Don't allow the user to think they can get
> + * full NO_HZ with this machine.
> + */
> + if (!no_tick_warned && tick_nohz_full_running) {
> + pr_info("NO_HZ_FULL has been disabled in the system.");
> + no_tick_warned = true;
> + }

So this is going to emit this message everytime the NOHZ state of a CPU
changes, which is an easy to trigger dmesg flooding from unpriviledged
user space.

Also the message is misleading because this is a per CPU condition and
not a system wide condition.

Thanks,

tglx

\
 
 \ /
  Last update: 2021-07-07 12:17    [W:0.062 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site