Re: [PATCH v3] watchdog: add watchdog_cpumask sysctl to assist nohz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 02, 2015 at 02:16:09PM -0400, Chris Metcalf wrote:
> On 04/02/2015 02:06 PM, Peter Zijlstra wrote:
> >On Thu, Apr 02, 2015 at 01:39:28PM -0400, cmetcalf@xxxxxxxxxx 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?

What's wrong with just leaving the thread be but making sure it'll never
actually do anything?
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux