From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbdK3UUz (ORCPT ); Thu, 30 Nov 2017 15:20:55 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54964 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750768AbdK3UUy (ORCPT ); Thu, 30 Nov 2017 15:20:54 -0500 Date: Thu, 30 Nov 2017 12:20:46 -0800 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: xiaolong.ye@intel.com, frederic@kernel.org, tglx@linutronix.de, cmetcalf@mellanox.com, cl@linux.com, torvalds@linux-foundation.org, lcapitulino@redhat.com, efault@gmx.de, peterz@infradead.org, riel@redhat.com, kernellwp@gmail.com, mingo@kernel.org, john.stultz@linaro.org Subject: [PATCH] sched/isolation: Make NO_HZ_FULL select CPU_ISOLATION Reply-To: paulmck@linux.vnet.ibm.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17113020-0024-0000-0000-000002FAC493 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008129; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000242; SDB=6.00953529; UDB=6.00481804; IPR=6.00733604; BA=6.00005722; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018276; XFM=3.00000015; UTC=2017-11-30 20:20:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17113020-0025-0000-0000-0000462F6D14 Message-Id: <20171130202046.GA27138@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-30_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711300259 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 5c4991e24c69 ("sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL") can result in RCU CPU stall warnings when running rcutorture with CONFIG_NO_HZ_FULL_ALL=y and CONFIG_CPU_ISOLATION=n. These warnings are caused by RCU's grace-period kthreads sleeping for a few jiffies, but never being awakened: [ 116.353432] rcu_preempt kthread starved for 9974 jiffies! g4294967208 +c4294967207 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x402 ->cpu=0 [ 116.355517] rcu_preempt I 7464 8 2 0x80000000 [ 116.356543] Call Trace: [ 116.357008] __schedule+0x493/0x620 [ 116.357682] schedule+0x24/0x40 [ 116.358291] schedule_timeout+0x330/0x3b0 [ 116.359024] ? preempt_count_sub+0xea/0x140 [ 116.359806] ? collect_expired_timers+0xb0/0xb0 [ 116.360660] rcu_gp_kthread+0x6bf/0xef0 This commit therefore makes NO_HZ_FULL select CPU_ISOLATION, which prevents this behavior and seems like it was the original intention in any case. Fixes: 5c4991e24c69 ("sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL") Link: https://lkml.kernel.org/r/20171126084203.GE21779@yexl-desktop Reported-by: kernel test robot Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker Cc: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Cc: Ingo Molnar Cc: John Stultz diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index e776fc8cc1df..f6b5f19223d6 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -95,6 +95,7 @@ config NO_HZ_FULL select RCU_NOCB_CPU select VIRT_CPU_ACCOUNTING_GEN select IRQ_WORK + select CPU_ISOLATION help Adaptively try to shutdown the tick whenever possible, even when the CPU is running tasks. Typically this requires running a single