Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1194516pxu; Fri, 27 Nov 2020 01:52:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4cc1lodIbQfP+Q9hsQh2FNoOgym3y2WBRYq77VZBN/yJT29oMuSwxtELx9Rjvl7AjMG9V X-Received: by 2002:a17:906:dc4:: with SMTP id p4mr6776875eji.56.1606470724148; Fri, 27 Nov 2020 01:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606470724; cv=none; d=google.com; s=arc-20160816; b=fR1HNeBVeT02w6nFF15PqTvfdkHD2vfMwcFOqpSGVvnIjsptDT+DYPSeNorPdQgON+ Tz4FQQMY0ppqJzeqdLS8gVONG9i8DNxRu7r7s+T1iOk4uWMyxvq1UGvR2kkkBPbDK+Rq kwYK/sZKvdiUNdsZCKVxkXrN1aplVLUJH76JnvQ63/IJNlsMcXWOlErg42Y/wXD2OoRG l1bLzhyqMGi1wodrRug7mX5PRAKNHAFk/tocZk8jCtqzTSv0fnbZWMMS7yqMDHgCI1SB wVQaRSggt98pwUvpaq0QYUIW6DkAWPYSlmnnY/VY136yuI14GZQw4tKjFWkRD09sPRv9 4bww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SpT5mux3bkiG98XNqiWb/4fRNdxP5kYN/sKhC7Wqp5Y=; b=dE21sUCozRj3Ebxm7DxcBkTkr3Y431ZGd5GEzFxnIE9n/edPyi5L+cklLwB463gtfB yfmbjUw1CDVnWHoJM9PomjYyIkj6Bn6E6m4ydvn6bujT9StUO4oYnRqWurT+2zVwCID6 mUnStSYo2vp6uTHQYOjGpUiMfdygx6WATopAnkSZUtHbyKEBLXgAJFyHSzJCnrNDNiLT KIEwfcn/R/A8tzfYyJm0yct+jJ5uE1KiYK2J83cckb4AYQBzpu6Fu1rGhojB668ftvln 5N6UnjdD4WExeQ36CP7geu/kipGlCxxugd/3WwUJo9A8qRJw13AXSFIpscSpE+H0Wnky pdsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ShlgV2ih; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m17si4581680ejb.268.2020.11.27.01.51.39; Fri, 27 Nov 2020 01:52:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ShlgV2ih; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728863AbgK0Jtr (ORCPT + 99 others); Fri, 27 Nov 2020 04:49:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728114AbgK0Jtq (ORCPT ); Fri, 27 Nov 2020 04:49:46 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3CDAC0613D4 for ; Fri, 27 Nov 2020 01:49:45 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id i2so4902050wrs.4 for ; Fri, 27 Nov 2020 01:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SpT5mux3bkiG98XNqiWb/4fRNdxP5kYN/sKhC7Wqp5Y=; b=ShlgV2ihO15dKzZF7Q5JSurKvH/8b7WBrfBL3rXm98DSM65G0173YTWVI9zUisZ9z+ s+srz7LcMlSJQVJgzweKt8t2Hh7GK5ff2Dkk3yXXtU3U0OgiBdlN5H601dPQZBpgoLRJ +ehhVD1z9uyWz9+aNcNOk8JE7SFYC+bNaorZR4oRE0oYR/0Ti/9s5/kaiiYrNDnzDF8w UkvfSFi4ASF4ELof6dCRRyPAa0AUptDfA+snYkAsPbzosOCQN13+EJNJFneHlrXy6t1+ VLiALeOUTEJK2w1CAVJeZdDshRolAhPrfpgyb69Z+LDQ7m4VbZlHCQ1RIykRu+UluUac TpBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SpT5mux3bkiG98XNqiWb/4fRNdxP5kYN/sKhC7Wqp5Y=; b=M/uQOFXxr9GeeiosajS5y9Bxp6Z2f64OSUeQ1Yzjn3Il39kM/7nYGF7MR2zOXZREQW mBczPYXA2G/8GisVZmCGOq+1pKbC1b4dq+lKmGgz6KoXmG/GbVLPmVhgNWqXjoD8z21c +ZWQC8dHR9/Z6OFoxtLIRRVTmFOv7ImESfqruDrS9sm+JM5YvbH3lm4B3PiXLHoAZmL2 6vdwXv+5adx+7yJNK9NE3cny5DM+UHDG6dav/PHa3E2YVKghl33f0zDIRzQUEEu+zlI/ wKCxE+ZLf9/1TpUPOa+EuSZ0HYkVdqmZpITgAfjefxNU4/yGAzkvbFeGq8WPhu2EtZ6M ztUQ== X-Gm-Message-State: AOAM531oRZxtzNZYmZBBxwo/Pu2Z12o3vZviKf8iy7Xh87LH667aV5Uh x9U4GBFmctzD/ZncSfxgv9Iyaw== X-Received: by 2002:adf:e449:: with SMTP id t9mr9451492wrm.257.1606470584483; Fri, 27 Nov 2020 01:49:44 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id g131sm13545886wma.35.2020.11.27.01.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 01:49:43 -0800 (PST) Date: Fri, 27 Nov 2020 09:49:40 +0000 From: Quentin Perret 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 , Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , kernel-team@android.com Subject: Re: [PATCH v4 07/14] sched: Introduce restrict_cpus_allowed_ptr() to limit task CPU affinity Message-ID: <20201127094940.GA906877@google.com> References: <20201124155039.13804-1-will@kernel.org> <20201124155039.13804-8-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201124155039.13804-8-will@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 24 Nov 2020 at 15:50:32 (+0000), Will Deacon wrote: > Asymmetric systems may not offer the same level of userspace ISA support > across all CPUs, meaning that some applications cannot be executed by > some CPUs. As a concrete example, upcoming arm64 big.LITTLE designs do > not feature support for 32-bit applications on both clusters. > > Although userspace can carefully manage the affinity masks for such > tasks, one place where it is particularly problematic is execve() > because the CPU on which the execve() is occurring may be incompatible > with the new application image. In such a situation, it is desirable to > restrict the affinity mask of the task and ensure that the new image is > entered on a compatible CPU. From userspace's point of view, this looks > the same as if the incompatible CPUs have been hotplugged off in its > affinity mask. > > In preparation for restricting the affinity mask for compat tasks on > arm64 systems without uniform support for 32-bit applications, introduce > a restrict_cpus_allowed_ptr(), which allows the current affinity mask > for a task to be shrunk to the intersection of a parameter mask. > > Signed-off-by: Will Deacon Reviewed-by: Quentin Perret Thanks, Quentin