[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1504082232060.3845@nanos>
Date: Wed, 8 Apr 2015 22:37:36 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Chris Metcalf <cmetcalf@...hip.com>
cc: Frederic Weisbecker <fweisbec@...il.com>,
Don Zickus <dzickus@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrew Jones <drjones@...hat.com>,
chai wen <chaiw.fnst@...fujitsu.com>,
Ulrich Obergfell <uobergfe@...hat.com>,
Fabian Frederick <fabf@...net.be>,
Aaron Tomlin <atomlin@...hat.com>,
Ben Zhang <benzh@...omium.org>,
Christoph Lameter <cl@...ux.com>,
Gilad Ben-Yossef <gilad@...yossef.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
linux-doc@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v6 1/2] smpboot: allow excluding cpus from the smpboot
threads
On Wed, 8 Apr 2015, cmetcalf@...hip.com wrote:
> @@ -173,6 +173,9 @@ __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
> if (tsk)
> return 0;
>
> + if (ht->valid_cpu && !ht->valid_cpu(cpu))
> + return 0;
> +
> td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu));
> if (!td)
> return -ENOMEM;
> @@ -221,9 +224,11 @@ static void smpboot_unpark_thread(struct smp_hotplug_thread *ht, unsigned int cp
> {
> struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
>
> - if (ht->pre_unpark)
> - ht->pre_unpark(cpu);
> - kthread_unpark(tsk);
> + if (tsk) {
> + if (ht->pre_unpark)
> + ht->pre_unpark(cpu);
> + kthread_unpark(tsk);
> + }
This is a very watchdog centric implementation. The watchdog actually
can afford to unregister/register the per cpu threads when the mask
changes, but other facilities might not.
So I'd like to see the threads still created and have the valid cpu
check in the unpark function. That way you can just park/unpark a
particular per cpu thread when the mask changes and you are not forced
to teardown/reenable the whole facility.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists