Received: by 10.192.165.148 with SMTP id m20csp2929645imm; Sun, 22 Apr 2018 19:35:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx48yW6Y1sBH1LoYllh65k2nQktzWfsaIsJ5PbYAdNjaAd8Lhf9oi7UCWTjv11uxny9D+lSFn X-Received: by 2002:a17:902:9688:: with SMTP id n8-v6mr19096823plp.366.1524450924637; Sun, 22 Apr 2018 19:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524450924; cv=none; d=google.com; s=arc-20160816; b=oUU+b8LaX6SDJuTsKey6f3daVl3kZsbyxdnvYavW3DuHrrpflPUipJ+Qx5GgFp12yd n3m7lP6MW0KedxlT4LGBUtM6c8OGq2oiGhGyvBHO+j7VD58yQsGy4lAQdz7v0pYyDL8m 3CZFZFM8K4jkBJE4mVvGIO4Rxhft9bpDbtKJVDV1prw/3Gu2ObNgdgfHyO1/LKeMQDKZ JR7KUJedgdeu5hRb2v1Wa6Ls+uew8CfNglKlm+XlosSO8F1g/pwIrISptCeemkURddmR 4qOAPhJZOO906IIhMW4ZioNYNbu9hHB8+2vm+ww2wz1VGzZu/diGTXZFQCgwVBUar4dq 4o1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=6DbeKJ2jkGbPdFwtDP8NaANM3JR1lL0hHWltOOe73SQ=; b=J31cFeWwOzwmyh/Q5/xNhRFfjKFcmG13V2qWTndG0gmBH4rPvKn8ob7+pIyv43XPq7 1pvUHWapT/YSdUNBL16JhwxAfkxYobkKKpM5zyLrp4BYO5i8ie5ePLosiptvUzY5xffY JseLw6/lSLNp8Dw0aVJ6nL291iwMV8wWyhiBrkVLCKHLCgJmmbQBMzEoExjsShuIaBpG Bdmv4MPm8Dnhnh/ob6hLUW3gOP1SkSRd1DE9qWdIEwPNuf0mYNfyEfyXDqZ+X6xLMScx oxSTcNzfQgOIPsVc1hD5HKNWrJFOuOtj9oYWv9x2Vr9F7xUJclKXSDUv8rckiu2f7GBq 97Tw== 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 h8-v6si3930606pli.474.2018.04.22.19.35.10; Sun, 22 Apr 2018 19:35:24 -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 S1754258AbeDWCdk (ORCPT + 99 others); Sun, 22 Apr 2018 22:33:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44252 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753946AbeDWCbX (ORCPT ); Sun, 22 Apr 2018 22:31:23 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3N2SxtQ059722 for ; Sun, 22 Apr 2018 22:31:22 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hgk2kws56-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Sun, 22 Apr 2018 22:31:21 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 22 Apr 2018 22:31:20 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 22 Apr 2018 22:31:15 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3N2VEpo48365622; Mon, 23 Apr 2018 02:31:14 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B382FB205A; Sun, 22 Apr 2018 23:33:17 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.149.45]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 7590BB204E; Sun, 22 Apr 2018 23:33:17 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 71B0616C8A96; Sun, 22 Apr 2018 19:32:28 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel.opensrc@gmail.com, Byungchul Park , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 04/22] rcu: Call wake_nocb_leader_defer() with 'FORCE' when nocb_q_count is high Date: Sun, 22 Apr 2018 19:32:09 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20180423023150.GA21533@linux.vnet.ibm.com> References: <20180423023150.GA21533@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042302-0008-0000-0000-000002FC9183 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008903; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01021888; UDB=6.00521536; IPR=6.00801123; MB=3.00020719; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-23 02:31:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042302-0009-0000-0000-000038FF59C8 Message-Id: <1524450747-22778-4-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-23_01:,, 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-1804230025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Byungchul Park If an excessive number of callbacks have been queued, but the NOCB leader kthread's wakeup must be deferred, then we should wake up the leader unconditionally once it is safe to do so. This was handled correctly in commit fbce7497ee ("rcu: Parallelize and economize NOCB kthread wakeups"), but then commit 8be6e1b15c ("rcu: Use timer as backstop for NOCB deferred wakeups") passed RCU_NOCB_WAKE instead of the correct RCU_NOCB_WAKE_FORCE to wake_nocb_leader_defer(). As an interesting aside, RCU_NOCB_WAKE_FORCE is never passed to anything, which should have been taken as a hint. ;-) This commit therefore passes RCU_NOCB_WAKE_FORCE instead of RCU_NOCB_WAKE to wake_nocb_leader_defer() when a callback is queued onto a NOCB CPU that already has an excessive number of callbacks pending. Signed-off-by: Byungchul Park Signed-off-by: Paul E. McKenney --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 3566e4f6dfcc..12774c4fb546 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1957,7 +1957,7 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("WakeOvf")); } else { - wake_nocb_leader_defer(rdp, RCU_NOCB_WAKE, + wake_nocb_leader_defer(rdp, RCU_NOCB_WAKE_FORCE, TPS("WakeOvfIsDeferred")); } rdp->qlen_last_fqs_check = LONG_MAX / 2; -- 2.5.2