Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2184686ybv; Mon, 24 Feb 2020 00:34:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwQ11pdtxzrL42guhlPGrvHw1esFxB+6M1qtgWlISuHF2fAuhpePK0xkLkbdktfEh/aPoEV X-Received: by 2002:a05:6830:154c:: with SMTP id l12mr38863708otp.275.1582533270358; Mon, 24 Feb 2020 00:34:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582533270; cv=none; d=google.com; s=arc-20160816; b=U8JNX5jSGQ7+OlIw6eMExYnM7x8OKR1/CPC5BCrLxaLGMdsLSKYcpgXlkAwZzoEl/g nFhKWA5Px53CAk5Anr2/6BAQwOSHnxvInJGeuMZppWZecIrJZsYNcKjyEM+1vXFR+LLu uLqAdR0UPIj0ZvShiE23N6yA3aJJvWs98yvcVBfJOZa0jZ+K4aZMnF4Tp6v5JAcn2YHs N+KTaZ2Pxvhu5muitx0Htaq5ZtO+VhDqTt0mmLHOyRr9rGT0F+i9n9sfKFZAhfZ/L4z9 Xygjc/76SrHHFZbuiXDkzFJgoIp1rUzTdd2Z8CeIHsoh1IYO36clUAej96ghsVNO5gfk jFog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Ppkd/iO8wqmYUSsFM1aLM7ZN18W6K+aFlbt3d7/PQ5M=; b=dqnKfIYveQXj/3ht+ZfAvORrvtkVS5//1gxkfpOy6pJVm6mhGd55plv7UxF9bM9ttW llwzXMyngSPPZt8dwN5sLlFQ1+T0edahXq+ZOUCSx5uXNTUFHoP1EAQvQSaSD2haQYeL rXsXNFtjSB9BR1oq+2Hf67mVnR5ddQyNHsQd/dh3nzn/H/yoqkPYWfUOy2nJM5i9pdik cBSWCdA8YAkNpsLzPbFhgMz2Kq8eD3jrOSf0DnQqH0ew98ne5cdOkhofbCMshc2ENLwW 2WCqKTsgAp5h3GEgbuo/tEb7jk1nCZNcBBk0XPrwgLzpLHoybCzA2y5zWi9rYd3WLnIL bcQg== 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 w142si4492537oia.132.2020.02.24.00.34.16; Mon, 24 Feb 2020 00:34:30 -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; 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 S1727229AbgBXIdH (ORCPT + 99 others); Mon, 24 Feb 2020 03:33:07 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:48724 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgBXIdH (ORCPT ); Mon, 24 Feb 2020 03:33:07 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1j69Am-00050y-Eh; Mon, 24 Feb 2020 09:33:04 +0100 Date: Mon, 24 Feb 2020 09:33:03 +0100 From: Sebastian Andrzej Siewior To: zanussi@kernel.org, Juri Lelli Cc: LKML , linux-rt-users , Steven Rostedt , Thomas Gleixner , Carsten Emde , John Kacur , Daniel Wagner Subject: Re: [PATCH RT 03/25] sched/deadline: Ensure inactive_timer runs in hardirq context Message-ID: <20200224083303.cdj27guxfxqkbyqo@linutronix.de> References: <11a532007a600928e64e761722da7100e19a0c5f.1582320278.git.zanussi@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <11a532007a600928e64e761722da7100e19a0c5f.1582320278.git.zanussi@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-21 15:24:31 [-0600], zanussi@kernel.org wrote: > [ Upstream commit ba94e7aed7405c58251b1380e6e7d73aa8284b41 ] > > SCHED_DEADLINE inactive timer needs to run in hardirq context (as > dl_task_timer already does) on PREEMPT_RT The message says "dl_task_timer already does" but this is not true for v4.14 as it still runs in softirq context on RT. v4.19 has this either via https://lkml.kernel.org/r/20190731103715.4047-1-juri.lelli@redhat.com or the patch which got merged upstream. Juri, I guess we want this for v4.14, too? > Change the mode to HRTIMER_MODE_REL_HARD. > > [ tglx: Fixed up the start site, so mode debugging works ] > > Signed-off-by: Juri Lelli > Signed-off-by: Thomas Gleixner > Link: https://lkml.kernel.org/r/20190731103715.4047-1-juri.lelli@redhat.com > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Tom Zanussi > --- > kernel/sched/deadline.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index eb68f7fb8a36..7b04e54bea01 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > @@ -252,7 +252,7 @@ static void task_non_contending(struct task_struct *p) > > dl_se->dl_non_contending = 1; > get_task_struct(p); > - hrtimer_start(timer, ns_to_ktime(zerolag_time), HRTIMER_MODE_REL); > + hrtimer_start(timer, ns_to_ktime(zerolag_time), HRTIMER_MODE_REL_HARD); > } > > static void task_contending(struct sched_dl_entity *dl_se, int flags) > @@ -1234,7 +1234,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) > { > struct hrtimer *timer = &dl_se->inactive_timer; > > - hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); > + hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); > timer->function = inactive_task_timer; > } > Sebastian