Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp729644img; Wed, 20 Mar 2019 09:37:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyvOydYqxgLkC3WM8yGrN8H29wMrWqScQxhECObZKsCEVfQTqxRKQO7RtsIxpGwq7p0zDG X-Received: by 2002:a17:902:32b:: with SMTP id 40mr9007641pld.122.1553099865635; Wed, 20 Mar 2019 09:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553099865; cv=none; d=google.com; s=arc-20160816; b=qMIGVUst7ABcDGUxb1MtquKgt2ifXHS+4p36sWxU1Gr2LY7lOtUPzUmwW7Kg5iyqkU jR4sq2q7C0QEfELgqqip4fvgScEBmfEnPVgfil3gvI6PKqUJA8ECDDIgOGi94NZQJYcB 70pmGdTbuS+AiWOxdwgGAAF1dM+7Es17fbjZwsMe+Gq9Sn1/x/NgOOZtvMdBTzomEqcY yOkwQ8t9YH+J7pKQUzhRjGmpSXzHKOTaGdz/qtPo3oA2sv6jP1XqISr93NMBmK+QFO05 vTIpsp7hl4m5ZVK9FpzdGyoDGY4ixdKD/VeW6gw61RuvxpKsOko989SsiV/omO/FBtJG MViQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=2v1jHxuCZxClo4t9RWX1zRO+YArRAWMDZS6gm6ysq3A=; b=zC/iuInGeH5JxZd3NwcDbrQsVz02hcIsZD9DUzyzcRlFZyH4jN134RJPgg1+7Zwo2n mIgK+lC2lboZZFHxjnT89jKCcQ8+nscEa236G9w4ixfg902bEf7awIGxXIN5IJYvuc2q v5J4iSjrEtavJ47YxD6nTUcO+CcMonaRp5TC148nbW9Zh+V2t1xU+TobP12JQjS6hHqv L6UI7Ku9tPPIFBV3ZRMuPXLYoVimWuuAOZ94ij5c1LgHbWLK/GU/Iw9gIoLo9Fd3OXla Hyf+i4LQYWgS7nP2HI8xclac/NaTtVPRIWdcgAr32IjqvX85DApU5tnyjQ6yER3sFaM9 HXQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si1981603pgg.391.2019.03.20.09.37.30; Wed, 20 Mar 2019 09:37:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727563AbfCTQfH (ORCPT + 99 others); Wed, 20 Mar 2019 12:35:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45612 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726817AbfCTQfG (ORCPT ); Wed, 20 Mar 2019 12:35:06 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2KGT85W012947 for ; Wed, 20 Mar 2019 12:35:05 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rbqxcmt17-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Mar 2019 12:35:04 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Mar 2019 16:35:03 -0000 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 20 Mar 2019 16:35:00 -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 x2KGZ0nK18612422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 16:35:00 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65FD6B206A; Wed, 20 Mar 2019 16:35:00 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 48BE2B2065; Wed, 20 Mar 2019 16:35:00 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.188]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 20 Mar 2019 16:35:00 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id AFBBC16C30D6; Wed, 20 Mar 2019 09:35:50 -0700 (PDT) Date: Wed, 20 Mar 2019 09:35:50 -0700 From: "Paul E. McKenney" To: Zhouyi Zhou Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] RCU: Adjust comments for force_qs_rnp Reply-To: paulmck@linux.ibm.com References: <1553052780-3789-1-git-send-email-zhouzhouyi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553052780-3789-1-git-send-email-zhouzhouyi@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19032016-0072-0000-0000-0000040DF0AC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010789; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01177144; UDB=6.00615766; IPR=6.00957839; MB=3.00026075; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-20 16:35:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19032016-0073-0000-0000-00004B8D0D81 Message-Id: <20190320163550.GL4102@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-20_10:,, 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-1810050000 definitions=main-1903200124 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 03:33:00AM +0000, Zhouyi Zhou wrote: > Previously, threads blocked on offlining CPUS are migrated to root > rcu_node, so there is a need to initiate RCU priority boosting on root > rcu_node, > > Current RCU does not migrate blocked tasks even if all corresponding CPUs > offline. > commit d19fb8d1f3f6 ("rcu: Don't migrate blocked tasks even if all corresponding CPUs offline")' > > Consequently, rcu does not initiate RCU priority boosting on root rcu_node. > commit 1be0085b515e ("rcu: Don't initiate RCU priority boosting on root rcu_node")' > > So I think the comments for force_qs_rnp should be adjusted. > > Signed-off-by: Zhouyi Zhou Great catch, thank you! I have queued it with wordsmithing as shown below. Please let me know if I messed anything up. Thanx, Paul ------------------------------------------------------------------------ commit 24bbb0754fdfabe3976c42e82620d1d1a86da9d6 Author: Zhouyi Zhou Date: Wed Mar 20 03:33:00 2019 +0000 rcu: Fix force_qs_rnp() header comment Previously, threads blocked on offlining CPUS were migrated to the root rcu_node structure, thus requiring RCU priority boosting on this structure. However, since commit d19fb8d1f3f6 ("rcu: Don't migrate blocked tasks even if all corresponding CPUs offline"), RCU does not migrate blocked tasks. Consequently, RCU no longer does RCU priority boosting on the root rcu_node structure as of commit 1be0085b515e ("rcu: Don't initiate RCU priority boosting on root rcu_node"). This commit therefore brings comments for the force_qs_rnp() function's header comment in line with this new no-root-boosting reality. Signed-off-by: Zhouyi Zhou [ paulmck: Also remove obsolete comment on suppressing new grace periods. ] Signed-off-by: Paul E. McKenney diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index c719929c9316..961dbc7b8949 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2171,11 +2171,11 @@ void rcu_sched_clock_irq(int user) } /* - * Scan the leaf rcu_node structures, processing dyntick state for any that - * have not yet encountered a quiescent state, using the function specified. - * Also initiate boosting for any threads blocked on the root rcu_node. - * - * The caller must have suppressed start of new grace periods. + * Scan the leaf rcu_node structures. For each structure on which all + * CPUs have reported a quiescent state and on which there are tasks + * blocking the current grace period, initiate RCU priority boosting. + * Otherwise, invoke the specified function to check dyntick state for + * each CPU that has not yet reported a quiescent state. */ static void force_qs_rnp(int (*f)(struct rcu_data *rdp)) {