lkml.org 
[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] watchdog: add watchdog_cpumask sysctl to assist nohz
On 04/02/2015 02:06 PM, Peter Zijlstra wrote:
> On Thu, Apr 02, 2015 at 01:39:28PM -0400, cmetcalf@ezchip.com wrote:
>> @@ -431,6 +434,10 @@ static void watchdog_enable(unsigned int cpu)
>> hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
>> hrtimer->function = watchdog_timer_fn;
>>
>> + /* Exit if the cpu is not allowed for watchdog. */
>> + if (!cpumask_test_cpu(cpu, watchdog_mask))
>> + do_exit(0);
>> +
> Ick, that doesn't look right for smpboot threads.

I didn't see a better way to make this happen without adding
a bunch of infrastructure to the smpboot thread mechanism
to use a cpumask other than for_each_online_cpu(). The exit
seems benign in my testing, but I agree it's not the cleanest
way to express what we're trying to do here.

Perhaps something like an optional cpumask_t pointer in
struct smp_hotplug_thread, which if present specifies the
cpus to run on, and otherwise we stick with cpu_online_mask?

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com



\
 
 \ /
  Last update: 2015-04-02 20:41    [W:1.938 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site