From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756450AbdDFK6o (ORCPT ); Thu, 6 Apr 2017 06:58:44 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:36547 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbdDFK6f (ORCPT ); Thu, 6 Apr 2017 06:58:35 -0400 Date: Thu, 6 Apr 2017 12:58:27 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: Sebastian Andrzej Siewior , Ingo Molnar , linux-kernel@vger.kernel.org, Mike Galbraith , Ingo Molnar , "Rafael J . Wysocki" Subject: Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU mask In-Reply-To: <20170406094635.iwkaewsbiud35q6b@hirez.programming.kicks-ass.net> Message-ID: References: <20170404184202.20376-1-bigeasy@linutronix.de> <20170405073943.GA17266@gmail.com> <20170405083753.7eszej2njds4ovdb@linutronix.de> <20170406061622.GA19979@gmail.com> <20170406073832.e7bu4ldpfuq44ui6@linutronix.de> <20170406080139.GA22069@gmail.com> <20170406092542.emc3lmqu2ywt3opy@linutronix.de> <20170406094635.iwkaewsbiud35q6b@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Apr 2017, Peter Zijlstra wrote: > On Thu, Apr 06, 2017 at 11:25:42AM +0200, Sebastian Andrzej Siewior wrote: > > > I.e. just have a counter and these two APIs: > > > > > > static inline void migrate_disable(void) > > > { > > > current->migration_disabled++; > > plus > > if (current->migration_disabled == 1) > > get_online_cpus() > > You want that other hotplug fast hack crap you have in rt, no? As I said in the other mail, we certainly want to make get_online_cpus() fast independently of RT. That's on our todo list anyway. > Because mainline will not get anything other than prempt_disable() for > migrate_disable(). I'm not yet convinced of that. There is enough stuff which pointlessly disables preemption and works around the restrictions caused by that or plays games with cpus_allowed just to stay on a particular cpu. I know you don't like it because it imposes restrictions on schedulability, but disabling preemption for a long time or playing cpus_allowed games has the same and worse effects. Thanks, tglx