Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937393AbdLSDYT (ORCPT ); Mon, 18 Dec 2017 22:24:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:50642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937357AbdLSDYP (ORCPT ); Mon, 18 Dec 2017 22:24:15 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9D50218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Ingo Molnar , Wanpeng Li , Mike Galbraith , Rik van Riel Subject: [PATCH 3/5] sched/isolation: Add scheduler tick offloading interface Date: Tue, 19 Dec 2017 04:23:56 +0100 Message-Id: <1513653838-31314-4-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513653838-31314-1-git-send-email-frederic@kernel.org> References: <1513653838-31314-1-git-send-email-frederic@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1602 Lines: 52 Add the boot option that will allow us to offload the 1Hz scheduler tick to the housekeeping CPU. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Ingo Molnar --- include/linux/sched/isolation.h | 3 ++- kernel/sched/isolation.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h index d849431..c831855 100644 --- a/include/linux/sched/isolation.h +++ b/include/linux/sched/isolation.h @@ -11,7 +11,8 @@ enum hk_flags { HK_FLAG_MISC = (1 << 2), HK_FLAG_SCHED = (1 << 3), HK_FLAG_TICK = (1 << 4), - HK_FLAG_DOMAIN = (1 << 5), + HK_FLAG_TICK_SCHED = (1 << 5), + HK_FLAG_DOMAIN = (1 << 6), }; #ifdef CONFIG_CPU_ISOLATION diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index b71b436..264ddcd 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -136,6 +136,12 @@ static int __init housekeeping_isolcpus_setup(char *str) continue; } + if (!strncmp(str, "nohz_offload,", 13)) { + str += 13; + flags |= HK_FLAG_TICK | HK_FLAG_TICK_SCHED; + continue; + } + if (!strncmp(str, "domain,", 7)) { str += 7; flags |= HK_FLAG_DOMAIN; -- 2.7.4