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=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 5F0B3C2B9F7 for ; Tue, 25 May 2021 02:09:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AAB256141D for ; Tue, 25 May 2021 02:09:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAB256141D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.20210309; 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=i3ovg2XIqDSSa9L1mbOztu8M3gv9dtbP1lDlgI54h6M=; b=PubKTyXPnOui7V L9H/XEIyLbnPIoS4kmZiFDSBXCSdrtOpckxZuhy/BVIZt/RUxudBq64k+AN4ex+HjAeMDIKNxxi4C Y1grUY5HyHUfZE00OwPvqHpOUfV5C4euW66QA6GubtAvZyY9gmUvqR7h9/3DaYzpYGmhr20NgvB8B vep+s0xx+C7aT2mZWpTBpb9YUlBTpNmT+dy47NA4xQpYtgh06vWWDrx/vCUT5ace3ffxCyOrRdv+B sg4FGT/Yuckfhyc0FkMBbOnGwYHBK15i9dGXCOgSxDcgWy8JStYQrTTVsKgKtc0V//U7nxu5bTT4k VootO7blLBia2BQ3Perg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llMU9-002r5r-PN; Tue, 25 May 2021 02:07:59 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1llHTl-001rL4-Hy for linux-arm-kernel@lists.infradead.org; Mon, 24 May 2021 20:47:15 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 053B961405; Mon, 24 May 2021 20:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621889233; bh=UgjQUQLFaMWyKj6Zcvq2RbMKVtls6JxUFa1a/1pBQ0g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HmJw8NGKyGMgFxlc0lX9EYXvjA5+XvjYQ2D4Zu+nqkxRHcDppn8oRJgDQ3PDFz7OO yykoE128gO8ILMXjJb0gFQKGqTLClSfdJ+//io7qhCydw6Lk96ueXWs3giEmFS8AzZ 4Vc/RQtNUGFdEMKUVB/mLUNMhU8JphsWgmNJU8nt8+4KKkazRQUeCYQGRTwEiZ966B sbhQqxhQln/+12J0jqml3wRpjinRDCnO1ZUDewyv2ooaXqyZSGPZ1fN4ZXAJcK/xc1 t6uKIF68FC6c5PW7syyfdjPLwtKBS0n1ZwF3XC89EbPrw7w/7x7qs+IUBQ+kI6z0Y3 VxKFQmJYLg8aA== Date: Mon, 24 May 2021 21:47:06 +0100 From: Will Deacon To: Daniel Bristot de Oliveira Cc: Juri Lelli , 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: <20210524204706.GE15545@willie-the-truck> References: <20210520101640.GA10065@willie-the-truck> <20210520180138.GA10523@willie-the-truck> <20210521103724.GA11680@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_134713_687152_81711075 X-CRM114-Status: GOOD ( 31.35 ) 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 Fri, May 21, 2021 at 03:00:42PM +0200, Daniel Bristot de Oliveira wrote: > On 5/21/21 12:37 PM, Will Deacon wrote: > > Interesting, thanks. Thinking about this some more, it strikes me that with > > these silly asymmetric systems there could be an interesting additional > > problem with hotplug and deadline tasks. Imagine the following sequence of > > events: > > > > 1. All online CPUs are 32-bit-capable > > 2. sched_setattr() admits a 32-bit deadline task > > 3. A 64-bit-only CPU is onlined > > At the point 3, the global scheduler assumption is broken. For instance, in a > system with four CPUs and five ready 32-bit-capable tasks, when the fifth CPU as > added, the working conserving rule is violated because the five highest priority > thread are not running (only four are) :-(. > > So, at this point, for us to keep to the current behavior, the addition should > be.. blocked? :-(( > > > 4. Some of the 32-bit-capable CPUs are offlined > > Assuming that point 3 does not exist (i.e., all CPUs are 32-bit-capable). At > this point, we will have an increase in the pressure on the 32-bit-capable CPUs. > > This can also create bad effects for 64-bit tasks, as the "contended" 32-bit > tasks will still be "queued" in a future time where they were supposed to be > done (leaving time for the 64-bit tasks). That's a really interesting point that I hadn't previously considered. It means that the effects of 32-bit tasks with forced affinity are far reaching when it comes to deadline tasks. > > I wonder if we can get into a situation where we think we have enough > > bandwidth available, but in reality the 32-bit task is in trouble because > > it can't make use of the 64-bit-only CPU. > > I would have to think more, but there might be a case where this contended > 32-bit tasks could cause deadline misses for the 64-bit too. > > > If so, then it seems to me that admission control is really just > > "best-effort" for 32-bit deadline tasks on these systems because it's based > > on a snapshot in time of the available resources. > > The admission test as is now is "best-effort" in the sense that it allows a > workload higher than it could handle (it is necessary, but not sufficient AC). > But it should not be considered "best-effort" because of violations in the > working conserving property as a result of arbitrary affinities among tasks. > Overall, we have been trying to close any "exception left" to this later case. > > I know, it is a complex situation, I am just trying to illustrate our concerns, > because, in the near future we might have a scheduler that handles arbitrary > affinity correctly. But that might require us to stick to an AC. The AC is > something precious for us. I've implemented AC on execve() of a 32-bit program so we'll fail that system call with -ENOEXEC if the root domain contains 64-bit-only CPUs. As expected, the failure mode is awful because it seems as though the ELF binary is then treated like a shell script by userspace and passed to /bin/sh: $ sudo chrt -d -T 5000000 -P 16666666 0 ./hello32 ./hello32: 1: Syntax error: word unexpected (expecting ")") Anyway, I'll include this in v7. Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel