Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1329114imm; Wed, 6 Jun 2018 14:16:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKNNFf7QppD0zuuU8CYMqgFPAClYkT6Jq/CbAlguKiCFp8UMb9szd3UxuUGEZJwZN4HOdQo X-Received: by 2002:a62:be0a:: with SMTP id l10-v6mr3902478pff.180.1528319814713; Wed, 06 Jun 2018 14:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528319814; cv=none; d=google.com; s=arc-20160816; b=afwTLwZNOU0GMItfhZVoC6srIjloxdjcGHzVcXOa2qcZXbqKwvVHQ/HdW58UpG+XZd KgXu9CZOoOxelXWfa47XJBzAtQgykHz2DhNZrncj8kh/qJWhqUPtzrSjOS8XGCqo4Hj/ t7BKRAdLLB2tqDG6I6onn4FFO7hGnhBo1FykLUi5B9v1p1XSEDdI9fkAO7l6xRLsl1va 7cgwfHf6ZtILiIkFqs68KYXXzG6Mq60STZi+zq5Z+M76hoHVOue8Z4g5x48JpP+w/593 KRiJ2Y81U/j63OuYIyBX9Kh0FiFXmHHfrLVOooXCGUPuBLHZdl5ofgTOeibWVSTPoE6l TTFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=0DhDZZ522SYrURUJp0xPz7AGH0ogmbaLQFQB36GbEDY=; b=ug2AgaG7uyWwnIFHjezQCSjMmP6xi/36og4I9wNI4O85rQvecoSeTxbVEJU/HYDUvq vzmMaRK5N+UAz+TrdpHXuguoQ9fl3lvuCR+/f26IKU5EZ530PKP2zuLtrFOCZzZUyJcr xQxW9MaQPCgLT4vEPiIwX5HnSqMhrrNIFuWKF92KmY1aKx0FB+fXB2qKU6doM6uACA7E SrYAfqMEqM7/AC5gXyCHCSFhrbitbg8Jo+o+C3jZHB+sm56YoGIknfyECSl84RUqEBE1 LjMJR723KtWM1P2rRtRVTQustmMMfk8tNxX5vvgmOB57b4VW0UCHJcopPhQ7sQwfX09N sjUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si53286284plg.168.2018.06.06.14.16.39; Wed, 06 Jun 2018 14:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbeFFVFo (ORCPT + 99 others); Wed, 6 Jun 2018 17:05:44 -0400 Received: from mail.santannapisa.it ([193.205.80.99]:41932 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546AbeFFVFn (ORCPT ); Wed, 6 Jun 2018 17:05:43 -0400 X-Greylist: delayed 746 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Jun 2018 17:05:43 EDT Received: from [151.40.69.140] (account l.abeni@santannapisa.it HELO nowhere) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 131054505; Wed, 06 Jun 2018 23:05:42 +0200 Date: Wed, 6 Jun 2018 23:05:36 +0200 From: luca abeni To: Quentin Perret Cc: Claudio Scordino , Juri Lelli , Vincent Guittot , Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Dietmar Eggemann , Morten Rasmussen , viresh kumar , Valentin Schneider Subject: Re: [PATCH v5 00/10] track CPU utilization Message-ID: <20180606230536.2c0ae587@nowhere> In-Reply-To: <20180606132046.GC10870@e108498-lin.cambridge.arm.com> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <20180605105721.GA12193@e108498-lin.cambridge.arm.com> <20180605121153.GD16081@localhost.localdomain> <20180605130548.GB12193@e108498-lin.cambridge.arm.com> <20180605131518.GG16081@localhost.localdomain> <20180605140101.GE12193@e108498-lin.cambridge.arm.com> <20180605141317.GJ16081@localhost.localdomain> <6c2dc1aa-3e19-be14-0ed8-b29003c72e61@evidence.eu.com> <20180606132046.GC10870@e108498-lin.cambridge.arm.com> Organization: Scuola Superiore S.Anna X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, 6 Jun 2018 14:20:46 +0100 Quentin Perret wrote: [...] > > However, IMHO, these are corner cases and in the average case it is > > better to rely on running_bw and reduce the CPU frequency > > accordingly. > > My point was that accepting to go at a lower frequency than required > by this_bw is fundamentally unsafe. If you're at a low frequency when > a DL task starts, there are real situations where you won't be able > to increase the frequency immediately, which can eventually lead to > missing deadlines. Now, if this risk is known, has been discussed, > and is accepted, that's fair enough. I'm just too late for the > discussion :-) Well, our conclusion was that this issue can be addressed when designing the scheduling parameters: - If we do not consider frequency scaling, a task can respect its deadlines if the SCHED_DEADLINE runtime is larger than the task's execution time and the SCHED_DEADLINE period is smaller than the task's period (and if some kind of "global" admission test is respected) - Considering frequency scaling (and 0-time frequency switches), the SCHED_DEADLINE runtime must be larger than the task execution time at the highest frequency - If the frequency switch time is larger than 0, then the SCHED_DEADLINE runtime must be larger than the task execution time (at the highest frequency) plus the frequency switch time If this third condition is respected, I think that deadline misses can be avoided even if running_bw is used (and the CPU takes a considerable time to switch frequency). Of course, this requires an over-allocation of runtime (and the global admission test has more probabilities to fail)... Luca