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.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 4DC7BC433B4 for ; Thu, 20 May 2021 16:03:55 +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 AADAE61163 for ; Thu, 20 May 2021 16:03:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AADAE61163 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:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pwRzgssznSBEVRGzQngDO+LGi505Aq9uz8f1HYe5Jnk=; b=gEIWaWOg4YDYBSrT+OI3vMYzDq UFu22qdiTupn5BxEojWmncyqNBH5vTQxg16KYrDUJGfkQB4D0V/3ujD3LSWkJN/hXcp+fC08Ood1N GuoZgnAm6/HEbvmbLKm2pFJ6K+HZtixnGnfGKMjvZhFvwxivHIdTnREfMNuTOzMyDQF+BXJ05aqyB Lb4upV/sHjTBeOsiIZZm6VWy0LsUkg44gYyw1Myd8TCLw729rEU0IMI0+1ol/+bHnZiv62HqwxB/s heYwFubX2vsqVTRMtBFAkiNF+HWLZaqrhPKU5HqCqVF0kAImuuVvrNZ/MDKKQobcub8ypGmGUQ9tE clOyarBg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljl7o-001q5O-Af; Thu, 20 May 2021 16:02:16 +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 1ljl6E-001pUp-Oh for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 16:00:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=8JiB2x9xqhth6XifEh3aGlH81y4eaL+aj39sK1+85dc=; b=zyfJeB6H0ZbsXi/6JBlM/ux1to xxM6VNvfKreAeojN5+AQgAwpWJse3IDhRFRyMTgS695fNgrxbl7tDI9w/+xhNGXtRNHtxyLWKu0bl yIf8bWQKokIHVA9ZvygVKPBz1jo3ObiKmfCik4r9nma+EXVL+1/+e/cFaDC4sRGqVRcE0nx6jJGDI vW+LVocbw7qygqE9kySp0pwSHiW9xiqq9Apc0yTuEOGtI7Ag2Y/25qdjlOyjMMmF57snwnqYsfKK5 9c+9iA9ZdbopGaCalvzP4xyI26SLpwgFejzjd1YxvKRhy7BYd9KezRlekwlK6zEz+owVxU0y+h+Le eAOFWgJg==; 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 1ljl6C-00GUTi-38 for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 16:00:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621526434; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8JiB2x9xqhth6XifEh3aGlH81y4eaL+aj39sK1+85dc=; b=K6FQAMesZt/Gjfqsq6EvfjMY4ETPA0sld6iid1saRzWju7Tgl62HjjHZerNlMsQz2bMI3v wnBDfNOm7RfWdD654jolHdV2lKx3VnrbVmZ3gPGWOPqy7Qu/xIfpZ+BsYGP2BeDFYFW5/z zpmB4DGpB+pWH3p+wzU/T+1YDCHdpes= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-iM3gkxRBNNGhvVBi_VZgEg-1; Thu, 20 May 2021 12:00:33 -0400 X-MC-Unique: iM3gkxRBNNGhvVBi_VZgEg-1 Received: by mail-ed1-f72.google.com with SMTP id b8-20020a05640202c8b029038f1782a77eso1283723edx.15 for ; Thu, 20 May 2021 09:00:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8JiB2x9xqhth6XifEh3aGlH81y4eaL+aj39sK1+85dc=; b=QyQ4QNOGbOLdi8RgEHICNWy5TTocHA+YfwrkNEJpU8jMcNxaDvDtRuxrF9Dv+zAVpu N2Zn10gKTP8G1Jw+dHXSwmTJhaMbqHiJh/d6aVWXsKZ04p4gt+ooKq+ukjjX+cidupDi pwEnKWDO2fm+KIS3nOwdnMVR4iKG7jYwu9vBCAhQ1RZUObaWWWSpbIKjfBpnwSWTRY7E zdmT7Wo9rxmsDjoPtaTLv4+NJU7ZkyvgL1qR9YUBTwR0mvAGGmEf+CsuIET/F+SPZJZZ pWBhFix8cWeSxnfgeH9mDd7eA6wkcwwOm0FoXIIXTd9RPTqxzfYV5pR9kHKPzOH28d3A Saww== X-Gm-Message-State: AOAM532kzxesf6339uOMWU6r3Yo1wsNW75wXfQF3/u43TOZ6vuYSSESo epHSmWjQQoC9PWMkCnpRy03IceoZplXcmslwDN5X1TeNlhFwWOnXtTz9/MFBRTVnuR9Jvl6bEEk hd3wLJguYic8UvpPSe5ZHu5Hu3WkWKGJCvBo= X-Received: by 2002:a05:6402:2207:: with SMTP id cq7mr5641173edb.216.1621526431805; Thu, 20 May 2021 09:00:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0JY5dsBRU3sGFN1ur/1DvGeSSS+X93hOqr06JEg0lZLSN3U1xv12CQqdMNCc3MG232aCkZA== X-Received: by 2002:a05:6402:2207:: with SMTP id cq7mr5641148edb.216.1621526431629; Thu, 20 May 2021 09:00:31 -0700 (PDT) Received: from x1.bristot.me (host-87-19-51-73.retail.telecomitalia.it. [87.19.51.73]) by smtp.gmail.com with ESMTPSA id z17sm1586158ejc.69.2021.05.20.09.00.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 May 2021 09:00:31 -0700 (PDT) Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE To: Dietmar Eggemann , Quentin Perret , Will Deacon Cc: 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: <20210518094725.7701-1-will@kernel.org> <20210518094725.7701-14-will@kernel.org> <20210518102833.GA7770@willie-the-truck> <20210518105951.GC7770@willie-the-truck> <20210520101640.GA10065@willie-the-truck> <0dbdfe1e-dede-d33d-ca89-768a1fa3c907@arm.com> From: Daniel Bristot de Oliveira Message-ID: Date: Thu, 20 May 2021 18:00:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <0dbdfe1e-dede-d33d-ca89-768a1fa3c907@arm.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bristot@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_090036_246377_28B7AA21 X-CRM114-Status: GOOD ( 22.16 ) 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 5/20/21 5:06 PM, Dietmar Eggemann wrote: > On 20/05/2021 14:38, 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). >> >> -- Daniel > > (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? -- Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel