Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp580041ybz; Wed, 15 Apr 2020 14:27:51 -0700 (PDT) X-Google-Smtp-Source: APiQypI8B6WkUxdfVpa0UTv2EA8cN8qWuhMV3x4l21NTRwMeo4zZgEK4yndTjjHzFkkv0LOVryaq X-Received: by 2002:a17:906:1c56:: with SMTP id l22mr6974968ejg.304.1586986071734; Wed, 15 Apr 2020 14:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986071; cv=none; d=google.com; s=arc-20160816; b=LAQpQOLI00rR72yRi88J7PGAWY5dxT46WkE1hjXQ2DKtT3CbNKpeTvB6qnVn4CMINH dKEJqoqRzGrCqDU1GIUctZE3y8/AfS3rZgrQlqdq5uabj5Uw5KjHz6H+x5WblfE6dllP rBDtFzHSVYiBVwlbIGvCxkrq32vo+J8sO90bSVuvXjqK/n7P/3sydSZPLGoJvEUF0jTy 1uJcRMgWiiHRCNV1ADhlpj92zImIpgPz3/NgyK3LZz6Km4lOBABeHWVBQEvLdoHDTJ7m O/Zn//VK+lub+GiVSZa6pOqe3+7M38g9nVosuk6Am649jkvR/hXYMhKSsanOZReK5Duy R48Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=q2G7WLP2Z9rcnxEofkAH45X53L+m9rCkpkjYTp8oecY=; b=cp+/Y5Qv1rQCQ+0/BwMxRVTvzYey5Mg8oAHnw+FKbxhS1Gsz4YzeziDBob/4oeWym2 XruBy/Tul/e+Om+mI148WPLlejY4VN1eebKYJYwqMRzrarM5LMDyT5DYRKoKqf4kT/08 xoSQFkXEqw101uVWl6cdopOVNG44TZfqkz19HwjZg35WtGzLFPyTglGeVptH2ao2GKwQ /D/hwDa6CfGbCtxHxk81MwqWFYtue9TYtMMmG54F+6AdRor8+LVtXmdMdflVa8zKfcAo 7WM/HApDv2+AkiGeDDbrg7+KkN7Ju5hwwnFrQ/oAiBiXguBDYppFCPxoZPELtbQP4kCv UYNw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si7468443ejr.264.2020.04.15.14.27.27; Wed, 15 Apr 2020 14:27:51 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439175AbgDNLaq (ORCPT + 99 others); Tue, 14 Apr 2020 07:30:46 -0400 Received: from foss.arm.com ([217.140.110.172]:53398 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbgDNL3G (ORCPT ); Tue, 14 Apr 2020 07:29:06 -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 1035D1FB; Tue, 14 Apr 2020 04:29:06 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14D553F6C4; Tue, 14 Apr 2020 04:29:03 -0700 (PDT) Date: Tue, 14 Apr 2020 12:29:01 +0100 From: Qais Yousef To: Dietmar Eggemann Cc: luca abeni , 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 Subject: Re: [PATCH 4/4] sched/deadline: Implement fallback mechanism for !fit case Message-ID: <20200414112901.3fhdoefgbxwv2bu4@e107158-lin.cambridge.arm.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/20 20:43, Dietmar Eggemann wrote: > 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() > > [...] Thanks Dietmar! I should have looked at the code with more intent. -- Qais Yousef