From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE3D7C47089 for ; Wed, 26 May 2021 16:07:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 964B8613B5 for ; Wed, 26 May 2021 16:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235489AbhEZQJP (ORCPT ); Wed, 26 May 2021 12:09:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:60182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235159AbhEZQJM (ORCPT ); Wed, 26 May 2021 12:09:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E5806613D4; Wed, 26 May 2021 16:07:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622045261; bh=j6Odz9vOMSnIs4wWXntwTwZIr6CshcRW2BHOShPDJPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rUgCR+uaaXALcZoWRgnnPpHPi975FoacDvb1MOnemnXtnzIJw6OoodjAJogz+f5Hr LCGMkt0nePk8Xg4xhmvlzLQuPhuTKQM9nKSUn5tk1XvRbfM20V9tFNWQiS30yKmN0v Qs0sM8xsdz0Y697b2/XcH+a/MuIqb7pDKNgNU3Oa9SKJREzdifQfQLrFV6bmUKXh8h 4UaVu3v1+B+ii8daplbddOL8mGcXICalVn17kYd0tbISr2zvid2Oerh51XYFu6mPk/ zB3UehjCy0WLcUY63OG/VbtG5QJ6eQx+iauqd6obdjMUBNnBVEkrK7MK1kIVxFhHM+ /VhhB7JDtKP8g== Date: Wed, 26 May 2021 17:07:31 +0100 From: Will Deacon To: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Quentin Perret , Tejun Heo , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , Dietmar Eggemann , Daniel Bristot de Oliveira , kernel-team@android.com, Li Zefan Subject: Re: [PATCH v7 08/22] cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1 Message-ID: <20210526160730.GC19691@willie-the-truck> References: <20210525151432.16875-1-will@kernel.org> <20210525151432.16875-9-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 05:02:20PM +0200, Peter Zijlstra wrote: > On Tue, May 25, 2021 at 04:14:18PM +0100, Will Deacon wrote: > > void cpuset_cpus_allowed_fallback(struct task_struct *tsk) > > { > > + const struct cpumask *cs_mask; > > + const struct cpumask *possible_mask = task_cpu_possible_mask(tsk); > > + > > rcu_read_lock(); > > + cs_mask = task_cs(tsk)->cpus_allowed; > > + > > + if (!is_in_v2_mode() || !cpumask_subset(cs_mask, possible_mask)) > > + goto unlock; /* select_fallback_rq will try harder */ > > + > > + do_set_cpus_allowed(tsk, cs_mask); > > +unlock: > > if (is_in_v2_mode() && cpumask_subset(cs_mask, possible_mask)) > do_set_cpus_allowed(tsk, cs_mask); > > perhaps? Absolutely. Will