Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1674339pxj; Wed, 19 May 2021 11:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVmiOteuSgztqeM7MolF6IZABBSjkiUW81WXj4x/TRTDmkMkJP6hrnDDVDu/cn4mf2TFEV X-Received: by 2002:a92:d290:: with SMTP id p16mr305477ilp.80.1621447826538; Wed, 19 May 2021 11:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447826; cv=none; d=google.com; s=arc-20160816; b=wmh/pA2O1LOFlNh0De1A608F5MKxAiA/Lm+oc6HNlLtYxTtjEc+R3UTj8fFWjteSIF uOVhdHss/WNZyAxKOms0HF4Snr78XXpun6AE3TS5Nddb5gJyQNYR/KdyPhpgssKScSHy LbHwOaQRXZC3shg79x1Yq9jhXHehDEs3X4+HfUIbo3BC9hGifQ//eOwyzmxABn2WhdZg AHPf2mOye+YKCdeuUeJEnAaJdmmzIbcbClZ7eNjy3NbLTnSBY+JZ10Ua4GGESnAZFGJh U2zGmzF1tnT34sYrw979M1ot9kN92BwJpB+xg9omOwjSFqIn2qe5bMUxIkHdQPVal3vO qtKQ== 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=Fl2hbnq4KTo11sm1rurPAiZ5nl2ffJf+gTd0frGhNMo=; b=OBYaabguQTmBuBiDe0NclaVRx9iLZWuGzbtuxZf6FcyGeAAguvVm/ku5p/zfovcVjG Z/pfKThHUSAADuvqG/BIjUDH5KWeHCd5kkfCt4p4hsly5pkSGftWDQjO955z2PBo1tV6 0o/WYpe+y2i7wqoFIRZMvXpLCx75MsTUghYP0yo7JpOr7wNAexDvj/BrLDos2TZZh1IS dx+Ge18KhERsg5L8OPJMEGJ2ljfZjFujAWGKsZ9kfNVey4q2CK7iDttrvnpka+7g1g6N aCQOOFhOgc6OTURHQ/YBglEceoCben6hJ9683Blcj+pTtDWaVDHSsHPKnvkEiiz0EAU2 5i+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=m5PLNpLU; 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 i13si424185ilm.45.2021.05.19.11.10.13; Wed, 19 May 2021 11:10:26 -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=@google.com header.s=20161025 header.b=m5PLNpLU; 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 S244571AbhERNVQ (ORCPT + 99 others); Tue, 18 May 2021 09:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243600AbhERNVN (ORCPT ); Tue, 18 May 2021 09:21:13 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58ACAC061756 for ; Tue, 18 May 2021 06:19:55 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id d11so10193425wrw.8 for ; Tue, 18 May 2021 06:19:55 -0700 (PDT) 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=Fl2hbnq4KTo11sm1rurPAiZ5nl2ffJf+gTd0frGhNMo=; b=m5PLNpLU1FyFg7I9oj9BuALAC/QcWw5Dv8rvdXmUmFEOzVPqJWjuRNhWM1uIeiKauB 5CSLYCGqNyCCv6dV/WFrfWKU8lsgWPQySSv6artDRUhvhuVYinu6tdaHXBcqdiDOXr/e 3ZO/6MmqSw4OwF1PI3r7AZFvMyXuIpnhBOSuBY5u7AutQcyvyK2aLTnabPKr2U8rSq9E ma0YawdRqqf8fN8/3O7iHBKuA43jq2QBiwjKTGCOmB71PO2ua9kX2q1+RGwIJ7NFpQ05 85/jXgJA5boxxDLSGzic4iYHMnBeG9zYXW1VcckhRDuFfCswW2pUzfgAijFGfKUB2FDi IyuA== 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=Fl2hbnq4KTo11sm1rurPAiZ5nl2ffJf+gTd0frGhNMo=; b=GQZA40QNZyA7F6r9kpM7jr3HMx4xP/vhMLxDyknvTXlKWPY61+rwP0slsfSzipbRvD +SPAK2XQGLAxWRng1eACjKvqSeWMB5IbCckvHCBSVRbk2cK6nn0AefDShyW7Op11ksqO 8m4C8ZVgfYdFHB/Ag7lnCWwYYYiMefDCnoF3ZV0GJIWsluEX/mRkGMsV4TkLh6jsYWUS xUEEgf5sJ1XA+PMLB1Uu/s5EcMqJlrSg5nbSvSLHcAspsWgUxtdQ/0dDdTlw6Dq5/kmP suQsQHXLxLEgwmBG0o4DyWYNeZFXb7F+hJB6Be+Isq40FMTqp/Sk2QaEakBi4nYisG6L QAlw== X-Gm-Message-State: AOAM532N71FjIwXZD479nnonHATkkQSfZa0Il782jvSC2AT2uPi9YjAT RN78FA+IJDiNi0nPt2hMXUp6+Q== X-Received: by 2002:a5d:4910:: with SMTP id x16mr7053213wrq.112.1621343993969; Tue, 18 May 2021 06:19:53 -0700 (PDT) Received: from google.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id x8sm21590597wrs.25.2021.05.18.06.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 06:19:53 -0700 (PDT) Date: Tue, 18 May 2021 13:19:50 +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 , Johannes Weiner , Ingo Molnar , Juri Lelli , 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: References: <20210518094725.7701-1-will@kernel.org> <20210518094725.7701-14-will@kernel.org> <20210518102833.GA7770@willie-the-truck> <20210518105951.GC7770@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210518105951.GC7770@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 18 May 2021 at 11:59:51 (+0100), Will Deacon wrote: > On Tue, May 18, 2021 at 10:48:07AM +0000, Quentin Perret wrote: > > On Tuesday 18 May 2021 at 11:28:34 (+0100), Will Deacon wrote: > > > I don't have strong opinions on this, but I _do_ want the admission via > > > sched_setattr() to be consistent with execve(). What you're suggesting > > > ticks that box, but how many applications are prepared to handle a failed > > > execve()? I suspect it will be fatal. > > > > Yep, probably. > > > > > Probably also worth pointing out that the approach here will at least > > > warn in the execve() case when the affinity is overridden for a deadline > > > task. > > > > Right so I think either way will be imperfect, so I agree with the > > above. > > > > Maybe one thing though is that, IIRC, userspace _can_ disable admission > > control if it wants to. In this case I'd have no problem with allowing > > this weird behaviour when admission control is off -- the kernel won't > > provide any guarantees. But if it's left on, then it's a different > > story. > > > > So what about we say, if admission control is off, we allow execve() and > > sched_setattr() with appropriate warnings as you suggest, but if > > admission control is on then we fail both? > > That's an interesting idea. The part that I'm not super keen about is > that it means admission control _also_ has an effect on the behaviour of > execve() Right, that's a good point. And it looks like fork() behaves the same regardless of admission control being enabled or not -- it is forbidden from DL either way. So I can't say there is a precedent :/ > so practically you'd have to have it disabled as long as you > have the possibility of 32-bit deadline tasks anywhere in the system, > which impacts 64-bit tasks which may well want admission control enabled. Indeed, this is a bit sad, but I don't know if the kernel should pretend it can guarantee to meet your deadlines and at the same time allow to do something that wrecks the underlying theory. I'd personally be happy with saying that admission control should be disabled on these dumb systems (and have that documented), at least until DL gets proper support for affinities. ISTR there was work going in that direction, but some folks in the CC list will know better. @Juri, maybe you would know if that's still planned? Thanks, Quentin