Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp358137pxk; Wed, 9 Sep 2020 07:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb3zAOMsbTQC3PNA9TpRR7YFSnqK/YPuiA5fxucUeajYCH0Nz0LucpZQsTJ/x+e7cBMKM7 X-Received: by 2002:a05:6402:326:: with SMTP id q6mr4315563edw.216.1599660993881; Wed, 09 Sep 2020 07:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599660993; cv=none; d=google.com; s=arc-20160816; b=aN8WozGPistZGiWTgAMMkihlNb9v5GATVl3bi4MdBOotLw2PMteBT7WkN+vnFTPYva qwEnNwxWS0y0UOWeKJiTEI/MFhnr0c5rv5x90+2efxdE4cG3kiLYfQQBfzErAiBk/4Rf 8jxUBtqivzdC8M9sIVegFA8EWVR/ZxJ8HaLHE39tdTGXYdAuiKSKp0beoKvEDD4GdcE9 6NLdcab39+HpsK+2hrl08j3RWPmUO/CTZFLifr0YDbPfsF/mkzTCt3/bK/aXSl38o/sI RkaA0NtOMjnpiFMSs066J9LA+f0QHpjs8iZXHCzUAQIqrjAGsgtiApnWATxvKw60utcB 9wmw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=fsb94INTeAl+1076DJPqTm2lnFinaezAcJffO58Qz5Q=; b=GciYc9WiUUf6zDt2u7YpdnA8Q36vqSFWKl37KLlYcyfYOQIoq903II25STxhYu/8Ub pGY8y6LEVhTPCR9PKdPr74098t8U+5BxB+6U0mdQI7G4tUtsYbsR4DXd/YJ807xWY5Z8 tPUInogEvQI3dYzlMk5kgTuzpa6Am9CQlJ3KFbgMS7HDhR6iMdltRscm606S23jz94oL G/xrFECRDZVhT3Rl4i8vN9ckJU5KDwoWsyuaTapfPDzxv/a3+AHWlAn/HAB+IzJFaIly l2UOV44BAJSD6oPujlmAEPsWSQzF0lCwwdPDQ7Z2Z+wve6rpkcdjyG44cmwc+1bxuBeH GPcw== 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 n25si1429607edq.555.2020.09.09.07.16.10; Wed, 09 Sep 2020 07:16:33 -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 S1730270AbgIINGP (ORCPT + 99 others); Wed, 9 Sep 2020 09:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730168AbgIINAC (ORCPT ); Wed, 9 Sep 2020 09:00:02 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 988FBC0617A4 for ; Wed, 9 Sep 2020 05:59:16 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1kFzgn-00028L-5e; Wed, 09 Sep 2020 14:59:05 +0200 Message-ID: <729431b40a2c0744f8f5496f7f90c612a318bd8c.camel@pengutronix.de> Subject: Re: [PATCH] sched/deadline: Fix stale throttling on de-/boosted tasks From: Lucas Stach To: peterz@infradead.org, Juri Lelli Cc: Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org, kernel@pengutronix.de, patchwork-lst@pengutronix.de Date: Wed, 09 Sep 2020 14:59:01 +0200 In-Reply-To: <20200902094339.GZ1362448@hirez.programming.kicks-ass.net> References: <20200831110719.2126930-1-l.stach@pengutronix.de> <20200902060024.GK16601@localhost.localdomain> <20200902094339.GZ1362448@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mi, 2020-09-02 at 11:43 +0200, peterz@infradead.org wrote: > On Wed, Sep 02, 2020 at 08:00:24AM +0200, Juri Lelli wrote: > > On 31/08/20 13:07, Lucas Stach wrote: > > > When a boosted task gets throttled, what normally happens is that it's > > > immediately enqueued again with ENQUEUE_REPLENISH, which replenishes the > > > runtime and clears the dl_throttled flag. There is a special case however: > > > if the throttling happened on sched-out and the task has been deboosted in > > > the meantime, the replenish is skipped as the task will return to its > > > normal scheduling class. This leaves the task with the dl_throttled flag > > > set. > > > > > > Now if the task gets boosted up to the deadline scheduling class again > > > while it is sleeping, it's still in the throttled state. The normal wakeup > > > however will enqueue the task with ENQUEUE_REPLENISH not set, so we don't > > > actually place it on the rq. Thus we end up with a task that is runnable, > > > but not actually on the rq and neither a immediate replenishment happens, > > > nor is the replenishment timer set up, so the task is stuck in > > > forever-throttled limbo. > > > > > > Clear the dl_throttled flag before dropping back to the normal scheduling > > > class to fix this issue. > > > > > > Signed-off-by: Lucas Stach > > Acked-by: Juri Lelli > > Thanks! Does this mean the patch will get picked up as-is, or are there any changes required? Regards, Lucas