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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CE704C56201 for ; Thu, 19 Nov 2020 16:11:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 54EDD22256 for ; Thu, 19 Nov 2020 16:11:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LDCZXOPQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AI2lVVKr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54EDD22256 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wfbCQvLWBwonKpm6TJpWLGMFVTmi4XX9BDZSl0ik5ng=; b=LDCZXOPQNnP+6CEJJLAsF8+oq LEFAQgqS8mB4ikEGD/ooSUHHCN8B6g8omqiza6NfzcQDHvkEGSyO9tzH/Nd0mmCNNf4wuRccz05CX KCCxaQTHYfuLlgVfSjOy9Xa5owcZlBw1LaxUurLwzEfJnXF6jgn0wyEvP5SpaPizRzLifj3FRcQLn 3PL2Y1JWSlC6u91DaHbgU2NWealyR3WhERNl0TTxZJfbasbS84Q8AtWuuC4ULHAK+chUK80h97Zsy UHXPquDZRM7wwHEkJwu2kOYyocYJGN29hDFZReuelEbEXruW4hkb2q7NLzDoHtGZbuNfMNoJiLXRW YQpyo4mAQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfmVP-00019j-Qg; Thu, 19 Nov 2020 16:09:55 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfmVN-00019H-Ey for linux-arm-kernel@merlin.infradead.org; Thu, 19 Nov 2020 16:09:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=gT+aycviSHZiSVl6jswLbLNrg/uiSiMYLbgQMN7rMto=; b=AI2lVVKrmsVKgsicoDpaTb0HIr OzOqlDqCZxXvpG7NHAX7weDFKlljBL6wnqCy//WM6TW/yMtdFKChH4FCSRKwES7Ff2+D5OmmmNjfY oUvepoJexunxdO7bbuqOVJhgpQpQ4vcQx8LiDhHixGr1ExZ3Lgsu2g8JAJGEhaHtkpH5xrGxzZE14 F/1gLv41pIiaiJpC69307E1sUnlFAdn8GscUktxjPy7nxrVQQ9kv4OipQAdoRugjFHmkfhseCvNPk SiHL1EpaFewLIJKCSdmywkJsRJUNmzPm42Q4EL9+w2qrefjfnVGh9BSe5w/4d2heVKdBt6EAvtvKS cicepZ8g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfmVI-0006ei-9y; Thu, 19 Nov 2020 16:09:48 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 228793019CE; Thu, 19 Nov 2020 17:09:45 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 01C5F200E0A45; Thu, 19 Nov 2020 17:09:44 +0100 (CET) Date: Thu, 19 Nov 2020 17:09:44 +0100 From: Peter Zijlstra To: Will Deacon Subject: Re: [PATCH v3 07/14] sched: Introduce restrict_cpus_allowed_ptr() to limit task CPU affinity Message-ID: <20201119160944.GP3121392@hirez.programming.kicks-ass.net> References: <20201113093720.21106-1-will@kernel.org> <20201113093720.21106-8-will@kernel.org> <20201119131319.GE4331@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201119131319.GE4331@willie-the-truck> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Juri Lelli , kernel-team@android.com, Vincent Guittot , Ingo Molnar , Greg Kroah-Hartman , Catalin Marinas , Quentin Perret , Qais Yousef , linux-kernel@vger.kernel.org, Morten Rasmussen , Johannes Weiner , Li Zefan , Marc Zyngier , Tejun Heo , Suren Baghdasaryan , Valentin Schneider , linux-arm-kernel@lists.infradead.org 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 Thu, Nov 19, 2020 at 01:13:20PM +0000, Will Deacon wrote: > Sure, but I was talking about what userspace sees, and I don't think it ever > sees CPUs that have been hotplugged off, right? That is, sched_getaffinity() > masks its result with the active_mask. # for i in /sys/devices/system/cpu/cpu*/online; do echo -n $i ":"; cat $i; done /sys/devices/system/cpu/cpu1/online :0 /sys/devices/system/cpu/cpu2/online :1 /sys/devices/system/cpu/cpu3/online :1 /sys/devices/system/cpu/cpu4/online :1 /sys/devices/system/cpu/cpu5/online :1 /sys/devices/system/cpu/cpu6/online :1 /sys/devices/system/cpu/cpu7/online :1 # grep Cpus_allowed /proc/self/status Cpus_allowed: ff Cpus_allowed_list: 0-7 :-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel