From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445AbdBIU2q (ORCPT ); Thu, 9 Feb 2017 15:28:46 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36505 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752976AbdBIU2o (ORCPT ); Thu, 9 Feb 2017 15:28:44 -0500 Date: Thu, 9 Feb 2017 21:28:39 +0100 From: Ingo Molnar To: Thomas Gleixner Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Andrew Morton , Linus Torvalds , Mike Galbraith , Oleg Nesterov Subject: Re: [PATCH 05/10] sched/core: Remove the tsk_cpus_allowed() wrapper Message-ID: <20170209202839.GA30297@gmail.com> References: <1486578863-8903-1-git-send-email-mingo@kernel.org> <1486578863-8903-6-git-send-email-mingo@kernel.org> <20170209085346.GZ6500@twins.programming.kicks-ass.net> <20170209090808.GA6893@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > On Thu, 9 Feb 2017, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > > > On Wed, Feb 08, 2017 at 07:34:18PM +0100, Ingo Molnar wrote: > > > > > > > So the original intention of tsk_cpus_allowed() was to 'future-proof' the > > > > field - but it's pretty ineffectual at that, because half of the code uses > > > > ->cpus_allowed directly ... > > > > > > > > Also, the wrapper makes the code longer than the original expression! > > > > > > I still object to taking this out without replacement. > > > > Yeah, that would have been my next suggestion. > > > > > This leaves RT stranded. > > > > Well, no, it leaves -rt with slightly more patching work than it already has... > > > > Because note how the wrappery is _already_ incomplete to a significant degree: > > > > triton:~/tip> git grep -Ee '->cpus_allowed' | grep -vE 'tsk_|cpuset|core.c' | wc -l > > 27 > > triton:~/tip> git grep tsk_cpus_allowed | wc -l > > 43 > > > > I.e. around 40% of the places that use ->cpus_allowed in the upstream kernel are > > not properly wrapped. That fact already 'wrecks' -rt. > > Nope it does not. The places which use cpumask directly are not interfering with > the decisions which are made by the scheduler whether migration can happen or > not. All decision code pathes use the wrapper and we make sure on every update > that this is the case. Indeed! > I completely agree that your idea with the const *ptr is the better solution, > but without that replacement RT is stranded and left alone with the mop up. Ok, I'm convinced! Thanks, Ingo