From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8897C433B4 for ; Fri, 21 May 2021 05:28:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27F72613B4 for ; Fri, 21 May 2021 05:28:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27F72613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CX1eMUn3LUgoOOSdbGmBIRRRST8hhbttfZ1QjNNv+vo=; b=I5p7kxb8mg4UApolPWSOEp15GZ 3iKV72VJe2qLgtogDPiTdyeU+VVMSQkvi8MANBk75D+dFB/0J1PH6Ijfa2GsQmueGn+cmzsg/LPLh NV8qqLzLa6m3n8mwztOZ7Z4RkNnEsPOztYQcwcD16FIcJa9VvTLv4X3FFBoOn20pmdF7SnOv0VU1A uA6u15os4ms8Glcgi8Vjz6HrtATbtphA5W6qj6jTH6gIpsPJv5tDMbOmaiem1SlOyi7cIiLTwoaNj wOMEqHS6DNcmJO4Qo94HwCRaXU6CcBBrZ5ByiziiM1jH8ZxyLOPkZd7LVOsVrVD1V3yUU7Id1W2ME d4uUB0qA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljxfi-003qbb-1m; Fri, 21 May 2021 05:26:06 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljxfe-003qbM-8T for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 05:26:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:In-Reply-To:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NN95LuSG9lt6UBs1OZNbmtIU5UiQ0VNWpg97nfPRDng=; b=AMwgZfkmX1hIL0ODyIglnXq9jl gjtucTx8UXNqufGOC9Vm7ceGERJ7AXOeYPqMNL8TFSzf8ogRmaG1hszTFc2Z5mBFw09dEBCPUGW7v uOMBk+TyvIskMkpr+qQmaGkXBsYbPjHbS9U+n5RQqAsJaT317hm+7mwrCcp8MvtiYBOzvfZwetlDz 8UhRMgBvXUEcZq8Z07ueXZ5131avsX6Es0WXV/vKzPhrFS/OgaMCtiorOwNXX9eVSVtUTWvuOrtIf AR1UIrxJ8wSQMVTBs+z3TGHWi8NMG0tqI85ZBMl1hWnfmnABvLFzZaBL/5Zev5GDg0/sNS+0MgT4U LDfE04Gg==; Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljxfb-00GpHH-8c for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 05:26:00 +0000 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-fuYBd-gYM7yBZ4H9FJBXYw-1; Fri, 21 May 2021 01:25:56 -0400 X-MC-Unique: fuYBd-gYM7yBZ4H9FJBXYw-1 Received: by mail-ed1-f70.google.com with SMTP id c15-20020a05640227cfb029038d710bf29cso4703053ede.16 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=S3xPOSRpvRDpKtjL0V9VTYkr2mb4rdSG3wtS6TNm4nW714mTQf9N/rHzKgXE3ofYGw wDWEKaz1m/BXp5TB3P+g3HwBE7cJQK2URydd6rAnvGqLHrO5XfTkFVa9FaXuCMNjwSLM M3Wa426sUMvsuikTW/XLKtt6wwEX5ySZLqcSYDMHjQDtH79o2K8kbcKcPANBjvmHWBFZ KxCHl97aIGj95EfkBK4NCRLr/B3hTkoC6PnIJZ7K0sVe2EINuhEZ1ASzA4F6Z6oWYqRU 5VI9EN15Z9vrFchQDkpEJl7B9FvgES9DSbydLyN0jTL5yle+OolkSC6j387uSG5Vknrq Mgdw== X-Gm-Message-State: AOAM5303t8rTTWXPEfzRi3E0RTXKouFrSheB1fOASbOST7TiaNxAkBqQ Z3tUzbAL1D3eq4DGEb64J4hcofdkqEX/Sra+kJGmYZ4NRcuLprOw5+Ep7kvAx8J/2xaSk3t8g8G /OptrzdIy2tfOyan55dr6pRUlJVKWtyR6GT8= X-Received: by 2002:a05:6402:5201:: with SMTP id s1mr9159631edd.86.1621574754962; Thu, 20 May 2021 22:25:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDj2qLE+eU39++y33z008QMpxv+OzxdP+Z0YeDDYLpbTGKarkq8rqlJ9w1DYybMGwzhh4fWQ== 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 In-Reply-To: <20210520180138.GA10523@willie-the-truck> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=juri.lelli@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_222559_574635_265EF1F9 X-CRM114-Status: GOOD ( 35.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel