From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 DE032C7618B for ; Wed, 24 Jul 2019 11:53:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0D1A229F4 for ; Wed, 24 Jul 2019 11:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387414AbfGXLxr (ORCPT ); Wed, 24 Jul 2019 07:53:47 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:10150 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727629AbfGXLxq (ORCPT ); Wed, 24 Jul 2019 07:53:46 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6OBmKav000951; Wed, 24 Jul 2019 07:53:30 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2txnw8jm90-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jul 2019 07:53:29 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x6OBmpoh003013; Wed, 24 Jul 2019 07:53:29 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2txnw8jm7q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jul 2019 07:53:29 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x6OBoIJJ012381; Wed, 24 Jul 2019 11:53:28 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma01wdc.us.ibm.com with ESMTP id 2tx61mx1m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jul 2019 11:53:28 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6OBrRgh47645148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Jul 2019 11:53:27 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 89295B2064; Wed, 24 Jul 2019 11:53:27 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6871CB205F; Wed, 24 Jul 2019 11:53:27 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.189.166]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 24 Jul 2019 11:53:27 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id AFB6516C8FD5; Wed, 24 Jul 2019 04:53:31 -0700 (PDT) Date: Wed, 24 Jul 2019 04:53:31 -0700 From: "Paul E. McKenney" To: fweisbec@gmail.com, tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, peterz@infradead.org Subject: How to turn scheduler tick on for current nohz_full CPU? Message-ID: <20190724115331.GA29059@linux.ibm.com> Reply-To: paulmck@linux.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-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-24_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907240134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! One of the callback-invocation forward-progress issues turns out to be nohz_full CPUs not turning their scheduling-clock interrupt back on when running in kernel mode. Given that callback floods can cause RCU's callback-invocation loop to run for some time, it would be good for this loop to re-enable this interrupt. Of course, this problem applies to pretty much any kernel code that might loop for an extended time period, not just RCU. I took a quick look at kernel/time/tick-sched.c and the closest thing I found was tick_nohz_full_kick_cpu(), except that (1) it isn't clear that this does much when invoked on the current CPU and (2) it doesn't help in rcutorture TREE04. In contrast, disabling NO_HZ_FULL and using RCU_NOCB_CPU instead works quite well. So what should I be calling instead of tick_nohz_full_kick_cpu() to re-enable the current CPU's scheduling-clock interrupt? Thanx, Paul