Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3541314ybi; Tue, 2 Jul 2019 09:24:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdaeGkfirLeGcxWl6OStZrpAUazJEs6ux0WGEsOEHHe4/nzroC8ZcVB0e4ZwtIj0WT/p9K X-Received: by 2002:a63:5202:: with SMTP id g2mr31429458pgb.386.1562084644173; Tue, 02 Jul 2019 09:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562084644; cv=none; d=google.com; s=arc-20160816; b=uTwsxxQaik4qwvx2Cy94nwJ9c/zDpLi+4ayGW1PYBYqfgLUVwe22ENPMxFXC+4NksP SCeKtR/tNCyY57moFEi6rZJ1t45Urwxzm7wLk1ZBqWOYFGK+Gq8csNrq4JlDdTSB9VpO fDhoBh/sJv0ugtGXZEUBPyocumA+p/jMPYCqhbQ4ZgTe5/cCGXMQOdfmP6KNCZP7n8uX u0LHpO4xtqWQAg6exObsYqlkusdh1t1AlV5EEixhiwczFxLLF0Lj8qAnJctSOpXVwOoC q9EMjpr2XASMXQNuANTNiNqnOJ5mRdYrZbsmM0qWNrqHz70l79OwQtFoBDh/C/dkU45h POcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6zAYyPY36YK1JZb3r2s9SglZU9BCEOlK2aec31cVYo8=; b=owI38m6gv1w5bnCkCP0gGvvezFQTZdSQa1RGLIBJETLl2aPxQw/RH+H8hk+hZ8fFJi Q6CCDrLH9vLhlqR/qQxcQkNZwV3ZagSp3BkzuiH2lcRN8M3Eu8oB5KxDr+Ue7gTGqhjp aIMDn/ZqDMljsavFP2r3HJypXZ2WUVeu3aB0D1nQDBY73sb+0ROGUy9VjcZJJiAL1dMR D3pwO/uLExRchiNLgoffdIfJUiuOe23qaLvM71QIGX0ZmWyC8fFjP0hVP/yS/X5Sshtu /meHzyEQNDRBHcvbq+VR1Enjfw/RflkBTi+ANlTmW3pdTfTcfUxHe0+wozp2NtkTsGVO J9Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=GnkeN3Po; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11si12623181pgq.498.2019.07.02.09.23.47; Tue, 02 Jul 2019 09:24:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=GnkeN3Po; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726303AbfGBQXZ (ORCPT + 99 others); Tue, 2 Jul 2019 12:23:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34980 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbfGBQXZ (ORCPT ); Tue, 2 Jul 2019 12:23:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6zAYyPY36YK1JZb3r2s9SglZU9BCEOlK2aec31cVYo8=; b=GnkeN3PosBhEhc7kFZfZzd8KV 1NgRhEcI5+vctfoX/Kcb0nxKTBOMygJxNMgR3LkSNF1a/wyfvl3R1+4wsLjBIyYbyJ0/PfXfNSn+8 SqpLoVhYPm75g1ZK28ZcpOV/2Q+MsMUZLk9R5k9xuXwAQzFAznXSzoJUclNz1+v4zcngk9UUouIsJ jdUPLf0jrMmtk/bTgBpJvBFg/d0Akamp+Z26km6BKTaxXtYT55L2W/GkFUroAX1xrdaCLH85H+Ks1 Crld7XscodEqA5pwa1avhQbfWydRvt0rl+AP32D4BNSXtp0fgY2Fs6L+Z5TY5JColhC17Y5IzI0t6 dlFWVfQMw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hiLYo-0006r3-5Q; Tue, 02 Jul 2019 16:23:14 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 447F3203C694A; Tue, 2 Jul 2019 18:23:12 +0200 (CEST) Date: Tue, 2 Jul 2019 18:23:12 +0200 From: Peter Zijlstra To: subhra mazumdar Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, prakash.sangappa@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, tim.c.chen@linux.intel.com, mgorman@techsingularity.net Subject: Re: [RFC PATCH 1/3] sched: Introduce new interface for scheduler soft affinity Message-ID: <20190702162312.GY3436@hirez.programming.kicks-ass.net> References: <20190626224718.21973-1-subhra.mazumdar@oracle.com> <20190626224718.21973-2-subhra.mazumdar@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626224718.21973-2-subhra.mazumdar@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 03:47:16PM -0700, subhra mazumdar wrote: > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 1183741..b863fa8 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -652,6 +652,8 @@ struct task_struct { > unsigned int policy; > int nr_cpus_allowed; > cpumask_t cpus_allowed; You're patching dead code, that no longer exists. > + cpumask_t cpus_preferred; > + bool affinity_unequal; Urgh, no. cpumask_t is an abomination and having one of them is already unfortunate, having two is really not sane, esp. since for 99% of the tasks they'll be exactly the same. Why not add cpus_ptr_soft or something like that, and have it point at cpus_mask by default, and when it needs to not be the same, allocate a cpumask for it. That also gets rid of that unequal thing.