Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp717226ybz; Wed, 15 Apr 2020 17:24:03 -0700 (PDT) X-Google-Smtp-Source: APiQypJCIRksV0KAy+wqXR2ekGxhw5StdTbdAhRvhkrxLBhig5z/Wl8x8Vv3EM79utuqhU5Ewh9f X-Received: by 2002:a50:9e2a:: with SMTP id z39mr28504626ede.178.1586996642934; Wed, 15 Apr 2020 17:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996642; cv=none; d=google.com; s=arc-20160816; b=yHDBdyjd9ddM13neeCFdbjIXHsnDxPVjbZwaJMaW3T5R1HoI1DZrQ3/u8c5Tfxn9Q7 6fYkWJB3++WCBJQhtgxZXTj6QVAh83dhlxO6zEIYMH0X9OvkYW8pUOi8AQkzagauLWtw Com4Pf0mWGUuaUvRVkfRF/x3lcqZkMaVeUbS7oUMPiTc/6wS1ZMkFXiZVBiDgfb/EQCB LWJ7U4TpU7VciUTIEC9AIKm9qb97dtRtODLPpfTMqbYQvHAJxbl0yzkfHHvA6tzxWcLO ItyL13PuKAjsbp+FJmDcsQgoE4MicG9gMwJN/fmLpIOagaJQCfgx0xjO/mw3Wui93EG3 z1PA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=OxO6hk37AVkMjvh4glqf7AQI80g5Y9m79XSYpFK9Ea4=; b=HEfVxlpRnq0HLxEPlaUoj8/4wdzV4fou6NBIcFe6BJ+v6cbcBCJWUOzfSL2oQmCfxS YPAMKS4h48A9NM84Okqz104T1iJwEqAzy3VZrTNr71neZFa7boLNIDb7faWqVbRp1oQt VRgs4Hq9dBTFDsr56vfEHZI2rjEKrjKTvXXyfQAwTp09XBqL8Bt3hbrZuiuu9zZnnGIa tgBYDxIR4monoHh1DYXIhzPT4ajA1Qjo2GgV6EcmqHB8nNwWFO2x5ZInWqpE7T29aB3g o8iGYtXa+fKWflxG6PUmlFtH7UyUBkVLsIPp3dzTvzqm8f7FvhP7ASOYcPmN03VpetQf +A1Q== 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 y26si11710045edm.274.2020.04.15.17.23.39; Wed, 15 Apr 2020 17:24:02 -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 S2410376AbgDOQmU (ORCPT + 99 others); Wed, 15 Apr 2020 12:42:20 -0400 Received: from mail.sssup.it ([193.205.80.98]:20332 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404524AbgDOQmS (ORCPT ); Wed, 15 Apr 2020 12:42:18 -0400 Received: from [151.41.75.232] (account l.abeni@santannapisa.it HELO sweethome) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 147390598; Wed, 15 Apr 2020 18:42:13 +0200 Date: Wed, 15 Apr 2020 18:42:03 +0200 From: luca abeni To: Juri Lelli Cc: Dietmar Eggemann , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Steven Rostedt , Daniel Bristot de Oliveira , Wei Wang , Quentin Perret , Alessio Balsini , Pavan Kondeti , Patrick Bellasi , Morten Rasmussen , Valentin Schneider , Qais Yousef , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] sched/deadline: Make DL capacity-aware Message-ID: <20200415184203.50862783@sweethome> In-Reply-To: <20200415132004.GF9767@localhost.localdomain> References: <20200408095012.3819-1-dietmar.eggemann@arm.com> <20200408095012.3819-4-dietmar.eggemann@arm.com> <20200410125253.GE14300@localhost.localdomain> <20200415132004.GF9767@localhost.localdomain> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; 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 Juri, On Wed, 15 Apr 2020 15:20:04 +0200 Juri Lelli wrote: [...] > > > I'm thinking that, while dl_task_fits_capacity() works well when > > > selecting idle cpus, in this case we should consider the fact > > > that curr might be deadline as well and already consuming some of > > > the rq capacity. > > > > > > Do you think we should try to take that into account, maybe using > > > dl_rq->this_bw ? > > > > So you're saying that cpudl_find(..., later_mask) could return 1 (w/ > > best_cpu (cp->elements[0].cpu) in later_mask). > > > > And that this best_cpu could be a non-fitting CPU for p. > > > > This could happen if cp->free_cpus is empty (no idle CPUs) so we > > take cpudl_find()'s else path and in case p's deadline < > > cp->elements[0] deadline. > > > > We could condition the 'return 1' on best_cpu fitting p. > > > > But should we do this for cpudl_find(..., NULL) calls from > > check_preempt_equal_dl() as well or will this break GEDF? > > So, even by not returning best_cpu, as above, if it doesn't fit p's bw > requirement, I think we would be breaking GEDF, which however doesn't > take asym capacities into account. Well, gEDF could take asymmetric capacities into account by scheduling the earliest deadline task on the fastest CPU (and the task with the second earliest deadline on the second fastest CPU, and so on...) But this could cause a lot of unneeded migrations (I tried to discuss this issue in a previous OSPM presentation). My original approach to work around this issue was to schedule a task on the slowest core on which the task can fit (some experiments revealed that this heuristic can approximate the gEDF behaviour without causing too many migrations)... But this patch is not included on the current patchset, and will be proposed later, after the most important patches have been merged. > OTOH, if we let p migrate to a cpu > that can't suit it, it will still be missing its deadlines (plus it > would be causing deadline misses on the task that was running on > best_cpu). In theory, if the task is scheduled on a core that is too slow for it then we must allow faster cores to pull it later (when tasks with earlier deadlines block). But this might be problematic, because it can require to migrate a currently scheduled task. Luca > > check_preempt_equal_dl() worries me less, as it is there to service > corner cases (hopefully not so frequent). >