Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5415712pxv; Wed, 7 Jul 2021 03:17:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7zliW+fC1HPqF4fVdHtjpBZoOjdYKyMjERiVwrS7qW7LpXgtZ5EF/6R1sH5Rw3T7hJ7qJ X-Received: by 2002:a17:907:868b:: with SMTP id qa11mr23515657ejc.338.1625653060728; Wed, 07 Jul 2021 03:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625653060; cv=none; d=google.com; s=arc-20160816; b=UjwSAMIfgqDp5lIQjXRl3PH5oPgeLrWXV7JZhZqioqfoot2+vZcUX/osCOBFTyMG7U Rtt2PD3hNvUffXPprNc3oWLC/9ETnCVKjfASJOBSl91LBh7v2Eu8j9wlABaJqKztE5+q EavhA5p6Q0l7g/BbDpTWsoM/Rzah1qfXJR3CSv497zX2DTm0U+ugyW0r7/YNwV5Y/nle sjw3Um7QLJPfK4aNq9KQl/RLHvUlm8HTQuoyfXPbT7SGm93wnTaRNI8oHxrOhhCdrYOE st8FHKBoJ3bOtXvtzQhN7YWyMCYSEUGS/ra5L2EPsQCQWUVEy7KRFVYv+i/AuAHDBB4+ 5h+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=yI5gUfx6XT+UMHg1mPkzTcXOlYkcjXyjWq3ym/V5c7Q=; b=akTasvtwX5zSFfytVaJEXzQKGZyh1E4jJZo8uVuHmYPhG6U3gNTRtxgBvsclwCXJuW 7m6RMPdSTG+ybwsYiuREcnOKR1VfF3WCKt9kJYmfy3Ol6wSJYqsNDw0rLliziR20LSoA vRtshPZfQu8yk2kJhXeSpKosG0H9aeKrMsDj3WnP+TSF6bCaETUsaDnQyzzrFxWE6QnT JMizEqCICI567E6LsGVTMArmpV+DwaEEZOxbzoUZxkT0uxAJ2A9HgHJu6dVREW41hofW 1OQIaz4ikchtx67x7B1nKHv5pcbh2lnIERakNrd5uIFoGPFftO8FwEQEo5sBLEQ9u0NQ KFvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Op1D2K+I; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=dUDBVcyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si16841366edw.145.2021.07.07.03.17.17; Wed, 07 Jul 2021 03:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Op1D2K+I; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=dUDBVcyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbhGGKTA (ORCPT + 99 others); Wed, 7 Jul 2021 06:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbhGGKTA (ORCPT ); Wed, 7 Jul 2021 06:19:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA55C061574 for ; Wed, 7 Jul 2021 03:16:20 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1625652975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yI5gUfx6XT+UMHg1mPkzTcXOlYkcjXyjWq3ym/V5c7Q=; b=Op1D2K+IaC/UG/R85rlWC5uqa41yvoR1oiqi4dC2E0ZAmvmg8iid42iDFYIFVhENYGEbaU hLgeZzi9f1pNyDv/lOuAw9dGmZ/roAElXQZ5VY6yBf0jI5SV/XSxHLbFF7IRzwGklNNZsL oPWeSWYX+FcSXvYAdw/YpULhYB1IWPexpoJX9Qx/1x4cjUATLnFhk6pGBjueQ3DfAxl6Qz 2PO6VCVXce2tgODKUcxiXdu1708c7j+RDYWW8DilQ2cqswespk8a1H2ccrWDtJYcbunuWW ePuotkWq44gNvB9iEdlPoijERKboHIjXobFer69MAJzZS8NCxBsJgFTy8g5bBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1625652975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yI5gUfx6XT+UMHg1mPkzTcXOlYkcjXyjWq3ym/V5c7Q=; b=dUDBVcyfKGYQKdORiBKlWQ83Z1RgEIm1W9TdMaFG1/NZsejqSw3oLp3Iklxt02BuyGTzIf 6UehoU/xBA41ePDQ== To: Ani Sinha , linux-kernel@vger.kernel.org Cc: anirban.sinha@nokia.com, Ani Sinha , Frederic Weisbecker , Ingo Molnar Subject: Re: [PATCH v1] Add info log when user enables NOHZ in commandline but NOHZ is not possible In-Reply-To: <20210627072833.2199463-1-ani@anisinha.ca> References: <20210627072833.2199463-1-ani@anisinha.ca> Date: Wed, 07 Jul 2021 12:16:15 +0200 Message-ID: <87zguypgy8.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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