Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1935895ybb; Thu, 9 Apr 2020 11:45:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJFX6PU35u/zAuEGvSFGRsp1bHcK9E5uDPMdQmyLY1dpAgBh5lv3N4a8c2xeNMJuiXreQsR X-Received: by 2002:ac8:c84:: with SMTP id n4mr867799qti.24.1586457929148; Thu, 09 Apr 2020 11:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586457929; cv=none; d=google.com; s=arc-20160816; b=EZEYsdhg3R9KsskyrACuDak+QPYTo4YGod7GzPRGNOEQR9mpAsiJO+iN13Pgfosv5E HTmwUSfxSewtCCuxuSCxlciQKaacTVubd2kJvhDp2D6WUUgVEWS4kAn+qCjZa67NsaKu QpCRqsdinn7F9OzPVvmLb9PB7vCRO5VkLRkskE7kOH7m/gkEJIIUSncD708ldTv85+pz /wuucaowi0H0+VZKSI3DbFKErNP3ePj+4lk61YrV2KFMWpixM/OYjE8TWWnZlb3KA8QZ bzWXhQ9Xk/6Pj51fzIVwkNwTGMYcZ8znNHyk1sRhNU9f8XgqpneWJ1ERCPbjF+mo/paE uf2w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=c5Tf441xyN6YDkX/92GU8+OHsDvOiNSOkHNnpKKespg=; b=wXOgoeagn1RiIu2oe+PZh0P+JsL97x8kaS4sYXi59nnz/6EF61Ak+DVCu1gO+Ldq8s /FVroYdFSUbmJf7Ad4X9W6hp/UOmtqvZJIxdjMqUPYAovG01V+E27HfjeNEjoIjYrjuA vBd1Z0J7jLQbIoB9KJp3TSleKDlpaOXFTJGYg23mqlCo/XZ94XSaOXnmbqr/2glbnLva ZI1SEjSQ5v51sLxSltk/ElLM5K8vUfzwJ0DGn9kt+AB/LyPLwLhAc84pkBVybMBiifNu ZeYr+ESueXbQRcTaV1tacZeKMVfK7Oafc3PDvmyaAjQOADlF/GfnSv3SgHkqT3wvewv1 JXWA== 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 r2si5803607qte.140.2020.04.09.11.45.13; Thu, 09 Apr 2020 11:45:29 -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 S1726637AbgDISnT (ORCPT + 99 others); Thu, 9 Apr 2020 14:43:19 -0400 Received: from foss.arm.com ([217.140.110.172]:53376 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbgDISnT (ORCPT ); Thu, 9 Apr 2020 14:43:19 -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 1E2FA31B; Thu, 9 Apr 2020 11:43:19 -0700 (PDT) Received: from [192.168.1.19] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 05D293F73D; Thu, 9 Apr 2020 11:43:15 -0700 (PDT) Subject: Re: [PATCH 4/4] sched/deadline: Implement fallback mechanism for !fit case To: Qais Yousef , luca abeni Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Daniel Bristot de Oliveira , Wei Wang , Quentin Perret , Alessio Balsini , Pavan Kondeti , Patrick Bellasi , Morten Rasmussen , Valentin Schneider , linux-kernel@vger.kernel.org References: <20200408095012.3819-1-dietmar.eggemann@arm.com> <20200408095012.3819-5-dietmar.eggemann@arm.com> <20200409102557.h4humnsa5dlwvlym@e107158-lin.cambridge.arm.com> <20200409150010.468951df@sweethome> <20200409145359.y276yeikn7dp6jmx@e107158-lin.cambridge.arm.com> From: Dietmar Eggemann Message-ID: Date: Thu, 9 Apr 2020 20:43:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200409145359.y276yeikn7dp6jmx@e107158-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.04.20 16:55, Qais Yousef wrote: > Hi Luca > > On 04/09/20 15:00, luca abeni wrote: [...] >> There is already a tunable for the SCHED_DEADLINE admission test >> (/proc/sys/kernel/sched_rt_{runtime,period}_us, if I understand well >> what you are suggesting). The problem is that it is not easy to find a >> value for this tunable that guarantees the hard respect of all >> deadlines. > > I don't think it's similar to what I was referring to. But my knowledge about > DL could have failed me to fully appreciate what you're saying. > > This tunable for RT prevents a single task from using 100% CPU time. I think > DL uses it in a similar manner. > > What I meant by overcommiting, is allowing more DL tasks than the system can > guarantee to meet their deadlines. > > For example, in the context of capacity awareness, if you have 2 big cores, but > 4 DL tasks request a bandwidth that can only be satisfied by the big cores, > then 2 of them will miss their deadlines (almost) consistently, IIUC. __dl_overflow() now uses X = cap_scale(dl_b->bw, rd_capacity(cpu)) instead of X = cpus in dl_b->bw * X < dl_b->total_bw - old_bw + new_bw; As an example, Arm64 Hikey64 with 4 LITTLE and 4 big CPUs uses now (4x462 + 4x1024)/1024 = 5944/1024 ~ 5,80 instead of 8 CPUs. On mainline, the rt-app tests: "tasks" : { "thread0" : { "policy" : "SCHED_DEADLINE", "instance" : 8, "timer" : {"ref" : "unique0", "period" : 16000, "mode" : "absolute" }, "run" : 10000, "dl-runtime" :11000, "dl-period" : 16000, "dl-deadline" : 16000 } } is admitted on this board whereas with the patchset some of the tasks are rejected: [rt-app] [7] sched_setattr returned -1 sched_setattr: failed to set deadline attributes: Device or resource busy --- IMHO, one of the 3 places where DL Admission Control hooks into is: __sched_setscheduler -> sched_dl_overflow() ->__dl_overflow() [...]