Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1661895pxj; Wed, 19 May 2021 10:54:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+ph+9VpPNURbS+tOi/3W1VSrHq3o1Bd0DahussrfK9QgtqO1RPXym1cOMzfwkZioQqVjD X-Received: by 2002:a17:906:3e44:: with SMTP id t4mr324942eji.99.1621446857167; Wed, 19 May 2021 10:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621446857; cv=none; d=google.com; s=arc-20160816; b=CGSkEGga4GReC8GgdnviASnglfq2wb6BvSe7+SO4lu6O/k+Zqylc2noH1t2KNSHTB3 a4KBEZOwF/nI2Y01NU2qzewxNZMh+khQIAk9+reccBo8DTA4Qb6dh9Bmlmep/H86BcuV 7gIvlGb4dn+T/9OLwaeB13RuP8/j7gYHK8aFcHKfHdK4Jca8rmwvONB5woUflpk425MR W1BelzBWtR+8bZ/BoFiViUc2MJrI0mOIggQjWIrrnsUcUi7cdzp6cZcU3pzW1hgQhkDJ T4DJlrj6swSZ9LecTpLeG9XL0ggJfgaPBKnnZzfn6w7trGSUW4sEye2kmIkwJ1tCIIkr DqCg== 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=lw//WQHU1n8Lr/SxhTfcfyc8tvk7S4lAFPEm1TkdCHc=; b=BhZQUqu35+aLjt24Vo/WqZWtFG90SRBsmgOtQ/IR7nAaSCSQtHcXGiAl20qZ42iZeg r1LzKk7D8A/Ama/KYMxxv2RKaTMtHplhoE0u6wWyG43na0Gx36rqKm1D1/pKT43FC3LC BcGiEZ/NM3/mPfCFLUYZDDakpwcW/xG9azUUZVXjjSCWP5OSjJ+L13Rn9NbseLKp9e69 Nx5einb0arBqL66StMzgZ2jFDIvBA3jHgGb1iyYDhst7qxhI/RDBGEXPr1qmqZUEFXlq pdYzGPofVVVcQzfN6SyYyYcqEjcrjRTqDtiYCPv9KVrh+TS0xmUBvINd5KHcLtFWqPFj iIjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jX9kX3Vo; 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 y16si647055edu.586.2021.05.19.10.53.52; Wed, 19 May 2021 10:54:17 -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=jX9kX3Vo; 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 S241228AbhERKth (ORCPT + 99 others); Tue, 18 May 2021 06:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241590AbhERKtc (ORCPT ); Tue, 18 May 2021 06:49:32 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A479C061573 for ; Tue, 18 May 2021 03:48:12 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id o6-20020a05600c4fc6b029015ec06d5269so1223565wmq.0 for ; Tue, 18 May 2021 03:48:12 -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=lw//WQHU1n8Lr/SxhTfcfyc8tvk7S4lAFPEm1TkdCHc=; b=jX9kX3Vod+I5rJUyU3cakHfzGdz5a5bQTSWVHWoUF68aLrBioufVUMrdLrwYA7KVgN eKLuTdcWsE8cCeK881ntTFN7BxBmqSs8GrQ/4HsJs4QkmOMvCgz57xB8py6JNHZ4q55u Syqwk3o+fLHz7otqXclL6PhUe3qxkOwcm1ATA400g++22qFMB7cbUis1J8LekpDIOc2R dfbFFYZgyi3zDX4ERYVsMsF2OIDcKpVMwV2LRogtiLE/CZxdfD+0uLOzGk5EfdJeji// k8PWHbpBHjh8fgP//HMPG5rhN5IUcWeHyw6BUcgC4gLyrIOuwXBTuUUZwfVBxsmVaVIQ Te1A== 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=lw//WQHU1n8Lr/SxhTfcfyc8tvk7S4lAFPEm1TkdCHc=; b=PNFYgfY5ulIIzcNmHMcyE7w6OCTT+s+U50q9RZJkpzXOrUrvTAoOGDx/5GbVstDg29 pZDYYgS34qxXcIRvQASnp1sk1xRKuiUJNc7JqcUjiR8XjdwQUBrcEsHR+uXVlZfCM5/r 3A4nm7KsxXkd9i0w0xgkWIdXuhQu4dCEx6X2V/9nkyBVn6mUVcdwXJI2Zhgx174KOeN1 XUPf4+XPsQltGiIi9O6sDBVkjd1vWMowFi5u/3DoXvp5AhTLrGiYPj6amji7opphCbQF P28oMOCg4bjjIKMhM+rFJO0XLguRv4e2EF5zZ4Ssab/yOMAE/3d7SsxJJkOQPHSjMLI7 jACw== X-Gm-Message-State: AOAM5311bcPBCv0XUjtZtnodLdIzenDL9VhOM72OI1ehycRfpH38elBJ J0X0uZCEakwWWjHeAH+9WvkBPXifQeZxWQ== X-Received: by 2002:a1c:b646:: with SMTP id g67mr207192wmf.117.1621334890798; Tue, 18 May 2021 03:48:10 -0700 (PDT) Received: from google.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id h14sm2930154wmb.1.2021.05.18.03.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 03:48:10 -0700 (PDT) Date: Tue, 18 May 2021 10:48:07 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210518102833.GA7770@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? We might still see random failures in the wild if admission control is left enabled on those devices but then I think these could qualify as a device misconfiguration, not as a kernel bug. Thoughts? Thanks, Quentin