From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913AbbDHN3H (ORCPT ); Wed, 8 Apr 2015 09:29:07 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:35303 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753321AbbDHN3D (ORCPT ); Wed, 8 Apr 2015 09:29:03 -0400 Date: Wed, 8 Apr 2015 15:28:57 +0200 From: Frederic Weisbecker To: cmetcalf@ezchip.com Cc: Don Zickus , Ingo Molnar , Andrew Morton , Andrew Jones , chai wen , Ulrich Obergfell , Fabian Frederick , Aaron Tomlin , Ben Zhang , Christoph Lameter , Gilad Ben-Yossef , Steven Rostedt , linux-kernel@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH v5 1/2] smpboot: allow excluding cpus from the smpboot threads Message-ID: <20150408132856.GA13227@lerouge> References: <1258649504.12464273.1428252407339.JavaMail.zimbra@redhat.com> <1428349556-21873-1-git-send-email-cmetcalf@ezchip.com> <1428349556-21873-2-git-send-email-cmetcalf@ezchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428349556-21873-2-git-send-email-cmetcalf@ezchip.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 06, 2015 at 03:45:55PM -0400, cmetcalf@ezchip.com wrote: > From: Chris Metcalf > > This change allows some cores to be excluded from running the > smp_hotplug_thread tasks. The motivating example for this is > the watchdog threads, which by default we don't want to run > on any enabled nohz_full cores. > > Signed-off-by: Chris Metcalf > --- > include/linux/smpboot.h | 2 ++ > kernel/smpboot.c | 11 ++++++++--- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h > index d600afb21926..de2f64a98108 100644 > --- a/include/linux/smpboot.h > +++ b/include/linux/smpboot.h > @@ -27,6 +27,7 @@ struct smpboot_thread_data; > * @pre_unpark: Optional unpark function, called before the thread is > * unparked (cpu online). This is not guaranteed to be > * called on the target cpu of the thread. Careful! > + * @exclude_mask: Optional cpumask, specifying cores to exclude. > * @selfparking: Thread is not parked by the park function. > * @thread_comm: The base name of the thread > */ > @@ -41,6 +42,7 @@ struct smp_hotplug_thread { > void (*park)(unsigned int cpu); > void (*unpark)(unsigned int cpu); > void (*pre_unpark)(unsigned int cpu); > + cpumask_t *exclude_mask; The usual pattern for cpumasks is to use them as affinity values instead of non-affinity values. Thanks.