Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp940071pxj; Fri, 21 May 2021 02:44:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx0elvwHwH+sBuUn5m4GTr3VcvljCEf6JNzESzXQbZZ68PJ3EWru8EXxvjrTH0iO1PXPJh X-Received: by 2002:a17:906:32c3:: with SMTP id k3mr9155128ejk.95.1621590290558; Fri, 21 May 2021 02:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621590290; cv=none; d=google.com; s=arc-20160816; b=pWkGXwPmXznHE8KtKT6BhrrXasfjBQiOSIcJw65byYNyRb+WCHLkNCS8lvP7LPmzhX 1gW2wa+EDb3fqIJQVxEMxQEp42vmN/fkI8J1jOtcR5qK85Q1W5OzPAAyIgrcEjPWoS1A xR1rUhmMtSFydccPEAiOXTQrrbvME8zHpCqifcDcdiUGo2bCqV5BDA9M3bw0ce6R6oC1 MYXjbAhqaXq8IAyXX08qbDPYObw8ppKM1pWknb/p9MgLsBDC6Isze9SLSwgyktgdPgBS uiWZwDt3MV6uKqZkkAaqHnMQugJxYpD5GumBuDhqeclzLCMnDRI+xRgJ3WpA5S7ffViO 9Eag== 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=NN95LuSG9lt6UBs1OZNbmtIU5UiQ0VNWpg97nfPRDng=; b=G+trGH74UIhRNR9VWQRoL4dq+X+AXtxpNJXZSZI3y73Ou83ZKqSbdzjp+UOC+w28DA g/8MGD7zaDtzOIsXIdy8dD0l6OtEOHIbT15rBRzDjc1EKhZPeOqMeo0+FtB4uux2+mg0 V6dtCmirIHiR7nwO9uIT2EIiUX4wJxynhwKGY0hpHt2+r/oIJdB8asLcIb4jDOdEoggB CDqQkdXpm6FE+cQsXnYkHaPL51ev+928OvHXFmknn9H7fxnRSmbGocnOHAht5LjacxB6 I3oyd6KpB4jODu2QR8CwpncP7PQxmYFrJt6bYfN7a6qjVFOMu6Ra1/TPsK/EjdaiLvEC AZ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+JknRU4; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca23si3460825edb.521.2021.05.21.02.44.27; Fri, 21 May 2021 02:44:50 -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=@redhat.com header.s=mimecast20190719 header.b=h+JknRU4; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbhEUF1W (ORCPT + 99 others); Fri, 21 May 2021 01:27:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44606 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhEUF1V (ORCPT ); Fri, 21 May 2021 01:27:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621574758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NN95LuSG9lt6UBs1OZNbmtIU5UiQ0VNWpg97nfPRDng=; b=h+JknRU4aufXddGScpDwIyQnvGDZ9v1Ot8A89liXULljcZH4DG18atx7vqZ5FYwEJcqXhv QhY/ejudtqsXmRtPSaBsFxJaozurUCjkmLpr3sujq0qJIEqK3M5boR+460IYSze936fAtO okx8+2oq2JPgKf7u4NBgHYM0FdAkFIo= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-gN4j7SbzNqKll50gL61seQ-1; Fri, 21 May 2021 01:25:56 -0400 X-MC-Unique: gN4j7SbzNqKll50gL61seQ-1 Received: by mail-ed1-f70.google.com with SMTP id w22-20020a05640234d6b029038d04376b6aso10663999edc.21 for ; Thu, 20 May 2021 22:25:56 -0700 (PDT) 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=NN95LuSG9lt6UBs1OZNbmtIU5UiQ0VNWpg97nfPRDng=; b=tQeDHRUvx4CThXEWeLVd7ciRlJ2ochFvlwqG4zuKz2rHMd6Jt1emIbgCuWWr0ogG2j UaojYJqXrj0BK7YMh144/lINejt8K8n/JfzaxYJL80cMB4s9u+ong+rzM9+aNhn8XQ41 s9YpTiajQ4eRRM6uzvRdbP4GueJkoffk7Dou6Nf7MANattI1u+MEMwNs56wlPmhRcLxM Vz7EgNJuc3Iek702Fh4KYnpqAgI6CgraH7XBjzP9Xm72Kgbu0fzX9Us4V0OOYh8NXBC8 /jwacsWToQr7Eo8ES2/11neR1ryuFzxmbw+kQzecM8TR5aOLbfam+z+x0Tgkoh4S4S9j pqeA== X-Gm-Message-State: AOAM532VfUKobtAwlX/qzIaAE4kpoYeMByDUF71jukF61WHl7X64yRmw LlMSz2T2dlcxNXPkAN3y6yi5jIsV+Svu+NMnFk49S6mznIXSYbX92trSimxqo2y2YegbNAVvjOl s9xcbzwjscK3ti7I3s4aAWE0E X-Received: by 2002:a05:6402:5201:: with SMTP id s1mr9159622edd.86.1621574754960; Thu, 20 May 2021 22:25:54 -0700 (PDT) X-Received: by 2002:a05:6402:5201:: with SMTP id s1mr9159602edd.86.1621574754772; Thu, 20 May 2021 22:25:54 -0700 (PDT) Received: from localhost.localdomain ([151.29.18.58]) by smtp.gmail.com with ESMTPSA id c3sm3217847edn.16.2021.05.20.22.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 22:25:54 -0700 (PDT) Date: Fri, 21 May 2021 07:25:51 +0200 From: Juri Lelli To: Will Deacon Cc: Daniel Bristot de Oliveira , Quentin Perret , 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: References: <20210518102833.GA7770@willie-the-truck> <20210518105951.GC7770@willie-the-truck> <20210520101640.GA10065@willie-the-truck> <20210520180138.GA10523@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210520180138.GA10523@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/05/21 19:01, Will Deacon wrote: > 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. Completely understand your perplexity. But how can the kernel still give guarantees to "pure" 64-bit applications if there are 32-bit applications around that essentially broke admission control when they were restricted to a subset of cores? > 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, for hotplug we currently have a check that would make hotplug operations fail if removing a CPU would mean not enough bandwidth to run the currently admitted set of DEADLINE tasks. > 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. OK, this is interesting and I guess a very valid alternative. That would force users to create exclusive domains for 32-bit tasks, right? > 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? Partly! :) Thanks a lot for the discussion so far. Juri