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=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BB677C47094 for ; Thu, 10 Jun 2021 10:22:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D4E0613C0 for ; Thu, 10 Jun 2021 10:22:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D4E0613C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YaqpnQQ1dP+WGfYg//hhIwv058OYC80vOz+CjDAwvow=; b=WRArVdztWsF7HR hIeyw0K5WrBJjREFiL8xLzoPvHqDUTTocWzBapu3/VuqkC8UNK2/iGNP8NI+Qb/hIDCGhX5Uangg2 RbM1vTDEeRnHinwa5xCMKoVTbd2lbFwHvXVAx3tAr3Jckf6APX4EVQHZ5QV098kAaTJrGihFAbPAj xUQ4fZp9YdcRZCIZM1ZnJ0XQxySMhpz0M/Hg81vP79FEiZeihAZfZc1bEVpYfVPdV9nEJ35xUbysd Lxl9Yom0RwqGs90dM/6kadPoZuLvisdpxyqqs95gu+59CfvjSsSbns64ApAOSakS3j7UFftOxWLNm tFpuAL3VLyoVbhuOqAbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrHnV-000Pm7-57; Thu, 10 Jun 2021 10:20:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrHnR-000PlU-2k for linux-arm-kernel@lists.infradead.org; Thu, 10 Jun 2021 10:20:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AAF67D6E; Thu, 10 Jun 2021 03:20:16 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0A2933F694; Thu, 10 Jun 2021 03:20:13 -0700 (PDT) From: Valentin Schneider To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , 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 v8 06/19] cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1 In-Reply-To: <20210607172042.GB7650@willie-the-truck> References: <20210602164719.31777-1-will@kernel.org> <20210602164719.31777-7-will@kernel.org> <877dj9ees8.mognet@arm.com> <20210607172042.GB7650@willie-the-truck> Date: Thu, 10 Jun 2021 11:20:09 +0100 Message-ID: <87fsxqc97q.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210610_032021_192810_9883DB98 X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/06/21 18:20, Will Deacon wrote: > On Fri, Jun 04, 2021 at 06:11:03PM +0100, Valentin Schneider wrote: >> On 02/06/21 17:47, Will Deacon wrote: >> > @@ -3322,9 +3322,13 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) >> > >> > 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(); >> > - do_set_cpus_allowed(tsk, is_in_v2_mode() ? >> > - task_cs(tsk)->cpus_allowed : cpu_possible_mask); >> > + cs_mask = task_cs(tsk)->cpus_allowed; >> > + if (is_in_v2_mode() && cpumask_subset(cs_mask, possible_mask)) >> > + do_set_cpus_allowed(tsk, cs_mask); >> >> Since the task will still go through the is_cpu_allowed() loop in >> select_fallback_rq() after this, is the subset check actually required >> here? > > Yes, I think it's needed. do_set_cpus_allowed() doesn't do any checking > against the task_cpu_possible_mask, so if we returned to > select_fallback_rq() with a mask containing a mixture of 32-bit-capable and > 64-bit-only CPUs then we'd end up setting an affinity mask for a 32-bit > task which contains 64-bit-only cores. > Once again, you're right :-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel