Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1625902ybc; Wed, 13 Nov 2019 01:38:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwvg9l2ybDcVjDbFnZoezDiQlPh2kBgEtcOd5NDb+ooktqOq03zPaA8qncnDv2Le5+zn9JZ X-Received: by 2002:a50:fc1a:: with SMTP id i26mr2529003edr.9.1573637915739; Wed, 13 Nov 2019 01:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573637915; cv=none; d=google.com; s=arc-20160816; b=XdWFS2lcrB2rViB5B6/NfIUNgzqJ4OBWr7Hj7kQB/2oKPuED+jigLB8GkP6ooRfSmM E1n1PSP+28CmkAX5jKpKNbVyJ4t4ed+328VeBbsymrElzADiUhpJD6QbRhZhYRaFaGtX hZ4sdIQRQ5Psoh7UB8JjQwJI6KKNsC4chL0a9uOpQ9SxAiwP46csU9d1CGI+Sv0InOuF 6UHyLgxhiccWg8YDBJZTJIjAmwMXF75PLDNPDkarU0KwdIk7GR/lVWLoqjz2HgRnTKfX CyImZpQ06L+bGedpsWz4C2IqiBGQdInjLRlEO+9dL9n1M7HsUi5ADQlJbJfSKd+YzHli IlEQ== 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:dkim-signature; bh=qSG9uSaAn7qofE50Yn5j5jsLtO131S+8AtBXIrCvYT4=; b=oOK+yORarTZDFzR8tKsQJgLW4mVPtzivOWzWU92iNlkjI+YoseW9SvtnIJCdTF/rn6 D96uZM0yhjAOn+iOB18IwnxBsmm/ws6RsVTBuz02dAg2SEq23cdgHKwbN6G3kmoagpH+ D8d9ydr8uukx29C8TlbLY4bOcjTbXKz7ODnSRYDOtvxRbZV94uG9bIgGNX4AGV1yFjZC kiK5mNuQVZ3IDlIUVfYTj163hLt0dMnpFy6/D3gbiu/ygI3SLJZar1rIPnlw86CJhuBW /+SgARBjlpopSHY13Vyb5ApUESuQyIHLV3JbINa1WhIB2+hbZgzz58+YJpdP09J8bkIQ RvKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rliVUmAZ; 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 c23si811926ejk.143.2019.11.13.01.38.12; Wed, 13 Nov 2019 01:38:35 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rliVUmAZ; 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 S1727202AbfKMJhH (ORCPT + 99 others); Wed, 13 Nov 2019 04:37:07 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:47154 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfKMJhH (ORCPT ); Wed, 13 Nov 2019 04:37:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qSG9uSaAn7qofE50Yn5j5jsLtO131S+8AtBXIrCvYT4=; b=rliVUmAZLX+u0ixJ/WjtceIH2 z7YMtymyk/RzzWYXW5gOS7qQc6K1ozrKI5frsTTYmz2vYsMErYlGm0AMFF5ueeS3cfdqdwI6vPIv/ fHft0w8ZCCX9x0u/3wbTgJo1o6TXjwsZpRgoYEmpF+UhhoiU/XXt9cAmLh5nMkxcV2b/QADR8U729 msrz7Vh0AyD+nLcqPX5tKVLgOa3RIZazF4cTdb17fK6+tvSmezzDn6c8HnuwrW6NgzwaUCqYyM5uI ACyFE2ovh5fAbrXVxNsGAl8IHaUYqya/xCYjU68+aHhoXfDLCKMB09nJ+VjSzbdKw3x8vTOVlrLFF VIq1+NoTQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUp52-0005Wr-Mo; Wed, 13 Nov 2019 09:36:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C1FE4305DE2; Wed, 13 Nov 2019 10:35:42 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E4D5A20302F11; Wed, 13 Nov 2019 10:36:49 +0100 (CET) Date: Wed, 13 Nov 2019 10:36:49 +0100 From: Peter Zijlstra To: Juri Lelli Cc: mingo@redhat.com, glenn@aurora.tech, linux-kernel@vger.kernel.org, rostedt@goodmis.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, tglx@linutronix.de, luca.abeni@santannapisa.it, c.scordino@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com Subject: Re: [PATCH 2/2] sched/deadline: Temporary copy static parameters to boosted non-DEADLINE entities Message-ID: <20191113093649.GI4131@hirez.programming.kicks-ass.net> References: <20191112075056.19971-1-juri.lelli@redhat.com> <20191112075056.19971-3-juri.lelli@redhat.com> <20191112105130.GZ4131@hirez.programming.kicks-ass.net> <20191113092241.GB29273@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191113092241.GB29273@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 10:22:41AM +0100, Juri Lelli wrote: > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > index 26e4ffa01e7a..16164b0ba80b 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -4452,9 +4452,11 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task) > > if (!dl_prio(p->normal_prio) || > > (pi_task && dl_entity_preempt(&pi_task->dl, &p->dl))) { > > p->dl.dl_boosted = 1; > > - queue_flag |= ENQUEUE_REPLENISH; > > - } else > > + p->dl.deadline = pi_task->dl.deadline; > > + } else { > > p->dl.dl_boosted = 0; > > + p->dl.deadline = p->dl.normal_deadline; > > + } > > p->sched_class = &dl_sched_class; > > } else if (rt_prio(prio)) { > > if (dl_prio(oldprio)) > So, the problem is more related to pi_se->dl_runtime than its deadline. > Even if we don't replenish at the instant in time when boosting happens, > the boosted task might still deplete its runtime while being boosted and I thought we ignored all runtime checks when we were boosted? Yes, that is all sorts of broken, but IIRC we figured that barring something like proxy-execution there really wasn't anything sane we could do wrt bandwidth anyway. Seeing how proper bandwidth handling would have the boosted task consume the boostee's budget etc.. And blocking the entire boost chain when it collectively runs out.