From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934633AbdDFLvY (ORCPT ); Thu, 6 Apr 2017 07:51:24 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38154 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933313AbdDFLvQ (ORCPT ); Thu, 6 Apr 2017 07:51:16 -0400 Date: Thu, 6 Apr 2017 13:50:58 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: Sebastian Andrzej Siewior , 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 Message-ID: <20170406115058.pntrn7mgywt7j3va@hirez.programming.kicks-ass.net> References: <20170404184202.20376-1-bigeasy@linutronix.de> <20170406093224.q3tunb6gdx5a6flr@hirez.programming.kicks-ass.net> <20170406094626.a42cq66ezgq4lohh@linutronix.de> <20170406103516.i3jyjcmee65r3wwj@hirez.programming.kicks-ass.net> <20170406105736.uw2j22igja45wi4b@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2017 at 01:03:16PM +0200, Thomas Gleixner wrote: > Fair enough, but I prefer to have the ability for a temporary restriction > of the user space visible cpus allowed mask in the core code, which can be > used for both migrate_disable() and things like that MIPS FPU stuff rather > than all those home brewn hackeries which are prone to bitrot, security > issues and subtle wreckage. cpus_allowed should be solely under sched core > control and not accessible from anything outside. So the big difference between what MIPS does and what migrate_disable() needs here is the amount of storage. For migrate_disable() we don't need a whole second cpumask bitmap. We can simply use one of the static cpumask_of() things. Given that cpumask bitmaps can be quite large, adding another one to task_struct just for $very_rare_occasion, doesn't seem like a good thing.