Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932946AbcKHJWQ (ORCPT ); Tue, 8 Nov 2016 04:22:16 -0500 Received: from smtpi-sp-233.kinghost.net ([177.185.201.233]:47338 "EHLO smtpi-sp-233.kinghost.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932280AbcKHJWN (ORCPT ); Tue, 8 Nov 2016 04:22:13 -0500 Subject: [PATCH] sched/rt: Change default setup for RT THROTTLING To: Steven Rostedt References: <20161107133207.4282de69@gandalf.local.home> <20161107144738.4811a5dd@gandalf.local.home> <20161107150003.66777b43@gandalf.local.home> <1e79f711-95f1-da2f-f572-1ac4329c8be7@bristot.me> <20161107151617.486b1b42@gandalf.local.home> <20161107154401.16f0214e@gandalf.local.home> Cc: Christoph Lameter , Daniel Bristot de Oliveira , Ingo Molnar , Peter Zijlstra , linux-rt-users , LKML , Tommaso Cucinotta , Luca Abeni , Clark Williams From: Daniel Bristot de Oliveira Message-ID: <879730f8-3966-7c6d-a581-d46a735a73e9@bristot.me> Date: Tue, 8 Nov 2016 10:22:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161107154401.16f0214e@gandalf.local.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1812 Lines: 43 [ looks good? if so, I will send a v2 patch set including the ] [ RT_RUNTIME_GREED patch and this one. ] Currently, the option RT_RUNTIME_SHARE is enabled by default. This option enables the sharing of rt_runtime between CPUs, allowing a CPU to borrow rt_runtime from another CPU, permitting a real-time task to run 100% of the time on a single CPU. The problem is that this can lead to the starvation of a non-real-time task pinned to the CPU running the CPU bound RT workload. One example of non-real-time task pinned to a CPU are the kworkers. Often kworkers starve on this scenario, causing a system hang. This patch changes the default setup for RT THROTTLING, disabling the RT_RUNTIME_SHARE option while enabling the RT_RUNTIME_GREED option. In such configuration, real-time tasks will be able to run 100% of the time in the absence of non-real-time tasks starving in the local CPU. Signed-off-by: Daniel Bristot de Oliveira Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Christoph Lameter Cc: Tommaso Cucinotta Cc: Luca Abeni Cc: Clark Williams Cc: linux-rt-users Cc: LKML diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 3bd7a6d..265c0db 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -65,8 +65,8 @@ SCHED_FEAT(RT_PUSH_IPI, true) #endif SCHED_FEAT(FORCE_SD_OVERLAP, false) -SCHED_FEAT(RT_RUNTIME_SHARE, true) -SCHED_FEAT(RT_RUNTIME_GREED, false) +SCHED_FEAT(RT_RUNTIME_SHARE, false) +SCHED_FEAT(RT_RUNTIME_GREED, true) SCHED_FEAT(LB_MIN, false) SCHED_FEAT(ATTACH_AGE_LOAD, true)