lkml.org 
[lkml]   [2017]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:sched/core] sched/isolation, watchdog: Use housekeeping_cpumask() instead of ad-hoc version
    Commit-ID:  13316b31fdaaa45f06793eb7992588359ba6ab9f
    Gitweb: https://git.kernel.org/tip/13316b31fdaaa45f06793eb7992588359ba6ab9f
    Author: Frederic Weisbecker <frederic@kernel.org>
    AuthorDate: Fri, 27 Oct 2017 04:42:29 +0200
    Committer: Ingo Molnar <mingo@kernel.org>
    CommitDate: Fri, 27 Oct 2017 09:55:25 +0200

    sched/isolation, watchdog: Use housekeeping_cpumask() instead of ad-hoc version

    While trying to disable the watchog on nohz_full CPUs, the watchdog
    implements an ad-hoc version of housekeeping_cpumask(). Lets replace
    those re-invented lines.

    Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
    Acked-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Chris Metcalf <cmetcalf@mellanox.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Luiz Capitulino <lcapitulino@redhat.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Wanpeng Li <kernellwp@gmail.com>
    Link: http://lkml.kernel.org/r/1509072159-31808-3-git-send-email-frederic@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    ---
    kernel/watchdog.c | 11 +++--------
    1 file changed, 3 insertions(+), 8 deletions(-)

    diff --git a/kernel/watchdog.c b/kernel/watchdog.c
    index 3c44dba..562652c 100644
    --- a/kernel/watchdog.c
    +++ b/kernel/watchdog.c
    @@ -774,15 +774,10 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write,

    void __init lockup_detector_init(void)
    {
    -#ifdef CONFIG_NO_HZ_FULL
    - if (tick_nohz_full_enabled()) {
    + if (tick_nohz_full_enabled())
    pr_info("Disabling watchdog on nohz_full cores by default\n");
    - cpumask_copy(&watchdog_cpumask, housekeeping_mask);
    - } else
    - cpumask_copy(&watchdog_cpumask, cpu_possible_mask);
    -#else
    - cpumask_copy(&watchdog_cpumask, cpu_possible_mask);
    -#endif
    +
    + cpumask_copy(&watchdog_cpumask, housekeeping_cpumask());

    if (!watchdog_nmi_probe())
    nmi_watchdog_available = true;
    \
     
     \ /
      Last update: 2017-10-28 20:17    [W:8.278 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site