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, 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 DE49CC433B4 for ; Thu, 20 May 2021 18:03:43 +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 653436100A for ; Thu, 20 May 2021 18:03:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 653436100A 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=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=SRvGOICBW5P5NgwQehNt6SJGPYjuuhZTTaamj024ptw=; b=SfpDxB7xd0IGg+qxlGVK0DWRXr jSrkt/J3lo/YxQ3twdP4I7oyRcBxU5kLX5UKy9cQcWd8oi2tULBwgUWAvuBNYkTe2e4RlcJk0vh+D OwheqcTfnkzvPobE8kYzHBdFKZdayeNNeZ9q3U9ns4SZgOY9363JVQd3tWQ2MubbvUOQamHMVmc2v in4jYUctIHk8es58aIUTDVqPWnyjPp5Xl+RoswIS8qWGfWvE8HbmGcBTnPtEPfY1MHbkIK/OCvN7V QCEov5EY6+FbFlD9oUX140uUZF3jK6SPGO2ufNkyCOsKaCX9f7aTooMgZQFPYPk3nORjnWB8/pXjT M8bjJ6Bg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljmzY-002CV4-7T; Thu, 20 May 2021 18:01:52 +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 1ljmzU-002CUp-Ty for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 18:01:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Zixfxr31G7GIcOyKuP82lhAIenHgELQjcU8bPama7EU=; b=sunTB186rhTRGf1USSiGv+8TtY rKuhPT4ZNw/wwhSdbypG+93cvhwQUUM6WQkPUVUGBtf8qbouzrVP8AUGEpVtlvpdczwcV40NgFgmn AcUIfddsB+9p7hiPZ4kd13LmVuIBc+JM6/c6RQLyvC24FiP0poWTBieHCkLBOu9GL/z31NKyHtiKD vVOE91a8ZPuhgHdndP2OKL2T0PMHtsmFk2N5lCLUunCqnGJUkdwgiL8PwhrhVhjQmlHSEeSRWWZhO r5shgwOAdMOpR6TpX4mdxk+VyG9LftzC/IGdrIE0FaHtCWv2Meh9kqzVHCVnAlKeyTArm6yL5IYZ1 ImVoluCQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljmzS-00GYpq-Bu for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 18:01:47 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 000336101D; Thu, 20 May 2021 18:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621533705; bh=VuH0uDCYxYFobOO1melI2DB00iQVhYlPjm02AAHgSXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V5pc1Px8rzn8IhwbdUoSYWWWejC1TgCV17xBQCMOLjXEBZEjlMswG0AI53R8TGe0X ziQotYU6LyAPJ1/oBDH7ifo7/RLwT888UuYvlm+466ewL4txm3yT2R2mlwJNNaNP+s pIr5i6APPSQqxaDzIdJ7kuJuwmlENdcwzHN95MSbJahJPoHxpL1tWt57gzvpnBCoTx 23TZChJjXt/Vd3Mg38fYBq5UFA4yBGqJ71GeAX0DV56PVHsgibamPPt7EeiCVRtrwy RlhQXPMc/n1D+1dtPwV3j0/8ST8rCHltHJaZAPVYhx288Wy54PuB8H8j/lNYuutzm1 gWiPFeRQbu0BQ== Date: Thu, 20 May 2021 19:01:39 +0100 From: Will Deacon To: Daniel Bristot de Oliveira Cc: Quentin Perret , Juri Lelli , 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: <20210520180138.GA10523@willie-the-truck> References: <20210518094725.7701-14-will@kernel.org> <20210518102833.GA7770@willie-the-truck> <20210518105951.GC7770@willie-the-truck> <20210520101640.GA10065@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-20210520_110146_472596_6DEFA763 X-CRM114-Status: GOOD ( 25.97 ) 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 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. 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, 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. 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? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel