From patchwork Fri Feb 21 21:24:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 213206 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BBBAC35669 for ; Fri, 21 Feb 2020 21:27:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA16524650 for ; Fri, 21 Feb 2020 21:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582320424; bh=uHCUX8XBDJdEPhvPI5BGTgSTzCMMQv9TwfPe4ivWfRs=; h=From:To:Subject:Date:In-Reply-To:References:In-Reply-To: References:List-ID:From; b=UClCz/S0joP6lv7oeS0ZgNcJn07Sha1T6TONll/Omhby1Jo2MvxH0hYEaAQaSKl2g 1+oPXsfjEPxTDLc9tMUQHUd1AmpoUievRG+NUsslbQrcNxpj27U7F0W+ube+3n2VGB PUDITDhSU8dCq93cvOogAhI08JWoJxqR+uqN8LtM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729855AbgBUV07 (ORCPT ); Fri, 21 Feb 2020 16:26:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:39036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728745AbgBUVZS (ORCPT ); Fri, 21 Feb 2020 16:25:18 -0500 Received: from localhost.localdomain (c-98-220-238-81.hsd1.il.comcast.net [98.220.238.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C32724656; Fri, 21 Feb 2020 21:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582320318; bh=uHCUX8XBDJdEPhvPI5BGTgSTzCMMQv9TwfPe4ivWfRs=; h=From:To:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=bzGE6TBD685FDCwhUiWC+dQlS7NbMcmMrnDIVUDiKXGfq0C2mxzOlpFlrzwal1x5H uqFzo2dS62x1VRWazPktYhvHrE+o9jXdCyBLJjW1aP8nCcN8o8CurwN6II99a3+4ed KVkt8eYc3u4fNUd26I/SSsh2d0xbWh4e6nKlKvIM= From: zanussi@kernel.org To: LKML , linux-rt-users , Steven Rostedt , Thomas Gleixner , Carsten Emde , John Kacur , Sebastian Andrzej Siewior , Daniel Wagner , Tom Zanussi Subject: [PATCH RT 03/25] sched/deadline: Ensure inactive_timer runs in hardirq context Date: Fri, 21 Feb 2020 15:24:31 -0600 Message-Id: <11a532007a600928e64e761722da7100e19a0c5f.1582320278.git.zanussi@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org From: Juri Lelli v4.14.170-rt75-rc1 stable review patch. If anyone has any objections, please let me know. ----------- [ Upstream commit ba94e7aed7405c58251b1380e6e7d73aa8284b41 ] SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does) on PREEMPT_RT 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; }