Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1397237pxj; Fri, 21 May 2021 13:14:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO3o9ge7pz1Cl1yq1LrsuJnmnSZ1NqSM0X8Ux6sC8dR6kJtxsWo5OHh1bRvj79cbkEsazi X-Received: by 2002:a02:6c46:: with SMTP id w67mr6580604jab.41.1621628059558; Fri, 21 May 2021 13:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628059; cv=none; d=google.com; s=arc-20160816; b=bi+iyt13NRrjcJtVvPwE+vxzc7zh2BeGoNzpeusZ2S0BzLSNKd60SM42Uik9QwDlQi fvLpDoKt88MttwBHcYkkWauoCE9P68+8PNRGtg5sPzLMHpp+D5HpSeH5VJd8aGzVZ6kp slLd2Lw17kabkrxJDz2+eZ/TrnV5Wlkp7oZhQvpu/glxIQg1CdrqUfP/WYE/xDuy+LGQ XwTjqRLOMEEyLmr4fKtOgpFtuGtix+UoZp/YS6aIKHVPKVwayVadbaZ6PRMuAXeT3H8C PX+zR5sSpYuPj7uesgm5+zlEJ7/Ewqrqqyjocq7dRcv3J7CuRUsULNLRMJhO7vLwVghW Hm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=z6y/aFxzny4mVR2CQZuXTt2w0Lj2rskXijdpxQfaUdY=; b=rOtLwcj1cb32RtfR/Dac8qVghAFptVwpfPh66QdtBLMX6VVBqO6XMMhVelavPof3ej 1eCCr/dguz3gwiKGQ7SWUyAyuUvCYavOehNVYxsiEx5adHt6+SVkSJ8SebtcEhxWBsb2 Jvli3/BJHLKaRc0/j7cbNbewtRhUxplFU4UuM86lrnf5mJ+VrYllL5s5nKalKshIA92A FmmOnUobWPqtc5S2XWMBtp4foZ4msSZajJ7rMIEONMTyy/BDjtKv8d1mphPvRZB7uvpJ FXxP4fp4pwZy1s8YSCrQ/UTFzOSPm8ItJTinekQGTByXj0h39ybA3yDcieJqG49xri53 dYVQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si6509551iov.92.2021.05.21.13.14.06; Fri, 21 May 2021 13:14:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234674AbhEUL1o (ORCPT + 99 others); Fri, 21 May 2021 07:27:44 -0400 Received: from foss.arm.com ([217.140.110.172]:45100 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhEUL1n (ORCPT ); Fri, 21 May 2021 07:27:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 449281424; Fri, 21 May 2021 04:26:20 -0700 (PDT) Received: from [192.168.1.16] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C42573F73D; Fri, 21 May 2021 04:26:16 -0700 (PDT) Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE To: Will Deacon Cc: Daniel Bristot de Oliveira , 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 References: <20210518105951.GC7770@willie-the-truck> <20210520101640.GA10065@willie-the-truck> <0dbdfe1e-dede-d33d-ca89-768a1fa3c907@arm.com> <8bc24850-3a14-5dd2-fbc2-bf745616949f@arm.com> <20210520180318.GB10523@willie-the-truck> From: Dietmar Eggemann Message-ID: <2055b1d4-ef42-0f49-6a0c-40c8415ef945@arm.com> Date: Fri, 21 May 2021 13:26:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210520180318.GB10523@willie-the-truck> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/05/2021 20:03, Will Deacon wrote: > Hi Dietmar, > > On Thu, May 20, 2021 at 07:55:27PM +0200, Dietmar Eggemann wrote: >> On 20/05/2021 18:00, Daniel Bristot de Oliveira wrote: >>> On 5/20/21 5:06 PM, Dietmar Eggemann wrote: >>>> (1) # chrt -d -T 5000000 -P 16666666 0 ./32bit_app >>>> >>>> (2) # ./32bit_app & >>>> >>>> # chrt -d -T 5000000 -P 16666666 -p 0 pid_of(32bit_app) >>>> >>>> >>>> Wouldn't the behaviour of (1) and (2) be different w/o this patch? >>>> >>>> In (1) __sched_setscheduler() happens before execve so it operates on >>>> p->cpus_ptr equal span. >>>> >>>> In (2) span != p->cpus_ptr so DL AC will fail. >>>> >>> >>> As far as I got, the case (1) would be spitted in two steps: >>> >>> - __sched_setscheduler() will work, then >>> - execv() would fail because (span != p->cpus_ptr) >>> >>> So... at the end, both (1) and (2) would result in a failure... >>> >>> am I missing something? >> >> Not sure. Reading this thread I was under the assumption that the only >> change would be the drop of this patch. But I assume there is also this >> 'if DL AC is on then let sched_setattr() fail for this 32bit task'. >> >> IMHO, the current patch-stack w/o this patch should let (1) succeed with >> DL AC. > > That's what I'm proposing, yes, but others (including Daniel) prefer to > fail the execve(). See my other reply just now for a summary [1]. [...] Thanks, Will ... Now I understand. Or at least I think I do ;-) > [1] https://lore.kernel.org/lkml/20210520180138.GA10523@willie-the-truck/T/#u