From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754388AbdBHMfM (ORCPT ); Wed, 8 Feb 2017 07:35:12 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:57570 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbdBHMfG (ORCPT ); Wed, 8 Feb 2017 07:35:06 -0500 Date: Wed, 8 Feb 2017 12:40:16 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Ingo Molnar , Mike Galbraith , Ingo Molnar , Sebastian Andrzej Siewior , LKML Subject: Re: tip: demise of tsk_cpus_allowed() and tsk_nr_cpus_allowed() Message-ID: <20170208114016.GX6500@twins.programming.kicks-ass.net> References: <1486355037.10462.17.camel@gmx.de> <20170206103156.GA18908@gmail.com> <1486383511.10462.43.camel@gmx.de> <20170206122928.GB9404@gmail.com> <20170206133242.GK6515@twins.programming.kicks-ass.net> <20170206222313.GA6061@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 08, 2017 at 11:20:19AM +0100, Thomas Gleixner wrote: > On Mon, 6 Feb 2017, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > > > > cpumasks are a pain, the above avoids allocating more of them. > > Indeed. > > > Yeah, so this could then be done by pointerifying ->cpus_allowed - more robust > > than the wrappery, > > You mean: > > struct task_struct { > cpumask_t cpus_allowed; > cpumask_t *effective_cpus_allowed; > }; > > and make the scheduler use effective_cpus_allowed instead of cpus_allowed? > Or what do you have in mind? That scheme is weird for nr_cpus_allowed. Not to mention that the pointer to the integer is larger than the integer itself. I really prefer the current wrappers, they're trivial and consistent with one another.