Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1242970pxj; Fri, 21 May 2021 09:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLw40sHPSFKjPd7tJG6RdRTNZSo4r9swEbjO4LvTxlmn4657cxECFxdZsh+6NyOQcbSnH9 X-Received: by 2002:a17:906:1699:: with SMTP id s25mr10991985ejd.238.1621614686850; Fri, 21 May 2021 09:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621614686; cv=none; d=google.com; s=arc-20160816; b=M+/XNyShTGmBoDB0qNOyB19Mt3gSeLH3BO/Jn8Beywj0r2x52YH1+a54vX9FdD2DR6 sO9K8oB0oIKFZUuY+7gl94MKyAm6yedM/qr6dNOtXqbevim53T07r0wowoK0goGsug9W 4dYvjih/V0/EKvfPyUsU+G6k3z7zUa1UpsE/15ZyBL1uxm5NARq2hhGZZ6GmXjsXk3Ya rs+wc1WzeKuRGiIcIX0W5/T02Vj3Px3To2/PdvUK1H7L7cFC9LXMmGi80/8pOQzLKWGB k/TzJ1Do9f/iGJnSO7NvbXe8PT0OyhxHtFJylomzrC1f/qxotl9ypDXMI4vWABBWnA8N 6llQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EZT/oYzGIPjD0Ec1GHDPYz1E0gxA3xbQdNpGYayvCzQ=; b=0ZiXuWYIqS6TXVT0ArCHbNrIzNoU5QVcZwKqMshpwBzZ5IW7xG3B7+6SaCf2ZksDD2 rWN/XB4/ieGtwVTB6uXOHNuWLYbTAO8am3/UrAFrFAlDpUYFb6dFEesLon2gN/pPQzlM 3osy2N5CoQGiGttv5ZzuaICRWiLZ1Ui8QAaPEECQixTYQovNHWHt0d5XLmqsz5OBBDxd wQ+5jmVIY8/pdp5e/oWAEWxDHm7Be/yxW7K7BfZl8CphFtvW/VqUQ7iAwTehuiWeqUML uHlJ5CX0n6gy5eEPcCry/vF61xxZWMr7gKfMsEFYzzdlNb8qFhljDtUZxM20fG73mWL0 zI1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pXsFzpYQ; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si376546eje.254.2021.05.21.09.31.01; Fri, 21 May 2021 09:31:26 -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=@kernel.org header.s=k20201202 header.b=pXsFzpYQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234557AbhETSEv (ORCPT + 99 others); Thu, 20 May 2021 14:04:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:54902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbhETSEq (ORCPT ); Thu, 20 May 2021 14:04:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2210360FF1; Thu, 20 May 2021 18:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621533805; bh=qBshlKu2zd7WKE8/gF2eNvUhAIN7rsAOhrY25OU7S/0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pXsFzpYQH2wzpNYeAwSJlXYpYiHKtKc+CdDvA4bSzh/IBqfPEkK9c8ErOviUmMNob nhHnGmlpuHoyOG0HP0UGRxMO435sjFN5rnFTJryVuOdwXyzSFc7pohl6V7/BWvg4l1 8Jc5Ay5roGEd+cZA2hQ/unaY39j5wQBuTtBAZpEY6fiaCbny+y4v6jotinasOo00lU 85z63cYie5xvNH+VYAmj4nX8K83rN5cvwKAx8ZspukzuFyvO3swRFO64uvZle5Dupv tpB1S5HHW0gM72DHn2gzZPRdG0wXoblF8rFG6/yF39V67hzD0BiJs5ExCxVgNsC2a1 wYh45KMfEhhjA== Date: Thu, 20 May 2021 19:03:18 +0100 From: Will Deacon To: Dietmar Eggemann 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 Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE Message-ID: <20210520180318.GB10523@willie-the-truck> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8bc24850-3a14-5dd2-fbc2-bf745616949f@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 [1] https://lore.kernel.org/lkml/20210520180138.GA10523@willie-the-truck/T/#u