Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp837600pxj; Thu, 20 May 2021 23:44:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbLYSdy3+2Any9g+xPDjvxH98mR5QPRqLLBvzcjmiBg8u286vTTqnymw65GuJhB9k+M492 X-Received: by 2002:a05:6402:883:: with SMTP id e3mr9352558edy.1.1621579483099; Thu, 20 May 2021 23:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621579483; cv=none; d=google.com; s=arc-20160816; b=ggDBEIYb2WI2F5dkQ0sWxClDDHt9l7Y0btUUQY9UU4Yd2c6P8IzRLdKSIeSg45p1dh /SOd/HMeoCXeZIoFC3QE9tYQc7uACcsOZ7wsmdveNPgVgvvczj4B5K3MNICcGHHYQuP5 PWxNoHdJH1RuCHNkNgxSvgiG9zfSuRVVI69G6cTAg/U5ERx52UjAJYvFGMSLCbvX6Gk7 cw7dG+ur7vM6lojt5Ax/WR4G82Qic4C178+toPov0FqfzsczgFn80bEoBgcG2KiFewmt UK3OPcqdpG6UxGaSQyOU76NDo0e4WCY/5IzSoMDGc/5N70Z7rQ43CrNzACbpF1jQMT3Z K9Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Zixfxr31G7GIcOyKuP82lhAIenHgELQjcU8bPama7EU=; b=GR74K5TxIRiqYsQAEIofq81PjbXqQorE1VfWD7bqwgM8JgtoPO83SmafAH9ik0zDuw m3vLuHu+xav/rg2kbYVxE2RcUpu8vOKjJDqsJMbgWZ+e244IhcsAwqS/gHvDabOjGMi0 lb4j5Lp3/pDz7I+VjLr8a9gyrLVqK9iVjEqdHCtDUbSuP81Jx30BQb4TRe124pIB1r6T 7jD171J5qvcoRSce8r+HbpwjaD7QkYy1h716w3FAQMXE3P+aT9w5QY9PF8oBQJqrYu+2 Ex7T+74aX9o9rECW9e+B68L5sgbyjiDUbpw8+pl0XmOT7E9ue1VD6usdRCHMfnikwACr u26Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V5pc1Px8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si4709815edp.527.2021.05.20.23.44.20; Thu, 20 May 2021 23:44:43 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=V5pc1Px8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236387AbhETSDI (ORCPT + 99 others); Thu, 20 May 2021 14:03:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:54602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235935AbhETSDH (ORCPT ); Thu, 20 May 2021 14:03:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 000336101D; Thu, 20 May 2021 18:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621533705; bh=VuH0uDCYxYFobOO1melI2DB00iQVhYlPjm02AAHgSXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V5pc1Px8rzn8IhwbdUoSYWWWejC1TgCV17xBQCMOLjXEBZEjlMswG0AI53R8TGe0X ziQotYU6LyAPJ1/oBDH7ifo7/RLwT888UuYvlm+466ewL4txm3yT2R2mlwJNNaNP+s pIr5i6APPSQqxaDzIdJ7kuJuwmlENdcwzHN95MSbJahJPoHxpL1tWt57gzvpnBCoTx 23TZChJjXt/Vd3Mg38fYBq5UFA4yBGqJ71GeAX0DV56PVHsgibamPPt7EeiCVRtrwy RlhQXPMc/n1D+1dtPwV3j0/8ST8rCHltHJaZAPVYhx288Wy54PuB8H8j/lNYuutzm1 gWiPFeRQbu0BQ== Date: Thu, 20 May 2021 19:01:39 +0100 From: Will Deacon To: Daniel Bristot de Oliveira Cc: Quentin Perret , Juri Lelli , 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 , Johannes Weiner , Ingo Molnar , Vincent Guittot , "Rafael J. Wysocki" , kernel-team@android.com Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE Message-ID: <20210520180138.GA10523@willie-the-truck> References: <20210518094725.7701-14-will@kernel.org> <20210518102833.GA7770@willie-the-truck> <20210518105951.GC7770@willie-the-truck> <20210520101640.GA10065@willie-the-truck> 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 Thu, May 20, 2021 at 02:38:55PM +0200, Daniel Bristot de Oliveira wrote: > On 5/20/21 12:33 PM, Quentin Perret wrote: > > On Thursday 20 May 2021 at 11:16:41 (+0100), Will Deacon wrote: > >> Ok, thanks for the insight. In which case, I'll go with what we discussed: > >> require admission control to be disabled for sched_setattr() but allow > >> execve() to a 32-bit task from a 64-bit deadline task with a warning (this > >> is probably similar to CPU hotplug?). > > > > Still not sure that we can let execve go through ... It will break AC > > all the same, so it should probably fail as well if AC is on IMO > > > > If the cpumask of the 32-bit task is != of the 64-bit task that is executing it, > the admission control needs to be re-executed, and it could fail. So I see this > operation equivalent to sched_setaffinity(). This will likely be true for future > schedulers that will allow arbitrary affinities (AC should run on affinity > change, and could fail). > > I would vote with Juri: "I'd go with fail hard if AC is on, let it > pass if AC is off (supposedly the user knows what to do)," (also hope nobody > complains until we add better support for affinity, and use this as a motivation > to get back on this front). I can have a go at implementing it, but I don't think it's a great solution and here's why: Failing an execve() is _very_ likely to be fatal to the application. It's also very likely that the task calling execve() doesn't know whether the program it's trying to execute is 32-bit or not. Consequently, if we go with failing execve() then all that will happen is that people will disable admission control altogether. That has a negative impact on "pure" 64-bit applications and so I think we end up with the tail wagging the dog because admission control will be disabled for everybody just because there is a handful of 32-bit programs which may get executed. I understand that it also means that RT throttling would be disabled. Allowing the execve() to continue with a warning is very similar to the case in which all the 64-bit CPUs are hot-unplugged at the point of execve(), and this is much closer to the illusion that this patch series intends to provide. So, personally speaking, I would prefer the behaviour where we refuse to admit 32-bit tasks vioa sched_set_attr() if the root domain contains 64-bit CPUs, but we _don't_ fail execve() of a 32-bit program from a 64-bit deadline task. However, you're the deadline experts so ultimately I'll implement what you prefer. I just wanted to explain why I think it's a poor interface. Have I changed anybody's mind? Will