Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3294264imu; Sun, 11 Nov 2018 11:45:35 -0800 (PST) X-Google-Smtp-Source: AJdET5eR+oMm19hhRwOh1bJlYNzv/+pAjAFBC3XRqgx0KOWdfniGNBS4Fi0tE0WvrSlHB6s6iIiu X-Received: by 2002:a63:30c8:: with SMTP id w191mr1682410pgw.120.1541965534995; Sun, 11 Nov 2018 11:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541965534; cv=none; d=google.com; s=arc-20160816; b=c6lDzgp9g4ytJsIVi7BztoNZHY4dPc4AeNsRnRfj6jrVWKlnRjJZetYCwuIu3S0uQw jgprWYAlre6vhHa4ycR6Gky3UN1UMS/giT8nNnu6gOvY/qDvjE1h5TpSvAB56xyOJGDk H0XIzlTr438jrqnpEn210HxG49p80Ajl6DPoDQv9G1KR5HmmZDlLY/g/AwGsGV5K7rNn +7pg/130XIOHtkL+E27gFPK0PYAgTnLNCPZSjtGYuQi3ACy0s+lcUR+o/7SZcGBHhvTS IOtqFx14p/4mYpsQAxEhrfUC9vavH0hrzJ+Pcp03rhvlQ6qjbCkkc9Rf2sSLVoZ2t+4S GeLQ== 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; bh=PdfAnZ0LId5dxsQo48HkIqi4QmPtf2FnX2wt28hLN8Y=; b=e2JXad2LPEpK1Ibv6jg1J8XZEBIPyI3lw4MbIxygBEsOSIVV9KwO8ETe6F9On5c920 d5PrDyYp3Q18WMbxaslJE1YglAECVFZQs7hOkeezbJvBylChccYk1g7iBZUuh7YrY5jh urXr5t1cKAzrqYRr1EwWuPoNGvbuRHAAcokBsMlrBAr9AcZ4ndvL/wgRLYTYG7Moqet9 823aNe+JzmGdf6LV5VwyBZfWhF8s7jG4AywuhgXJhG/qIPPtKML2DS/jyguCv9mC2HDm qYatZ8V7IbBVKplXnVRZUsUZseoWy1ivUkHWjIRyGLy/+wg1W9Rd46v07/43fOy334Yd Y/FA== 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 p1-v6si12770158pfa.120.2018.11.11.11.45.20; Sun, 11 Nov 2018 11:45:34 -0800 (PST) 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 S1729660AbeKLFeF (ORCPT + 99 others); Mon, 12 Nov 2018 00:34:05 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40188 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726971AbeKLFeF (ORCPT ); Mon, 12 Nov 2018 00:34:05 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wABJidVU161383 for ; Sun, 11 Nov 2018 14:44:39 -0500 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2npdfwhg39-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 11 Nov 2018 14:44:38 -0500 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 11 Nov 2018 19:44:18 -0000 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 11 Nov 2018 19:44:13 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wABJiCZh37027920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 11 Nov 2018 19:44:12 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70291B2071; Sun, 11 Nov 2018 19:44:12 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4CC37B2067; Sun, 11 Nov 2018 19:44:12 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.207.24]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Sun, 11 Nov 2018 19:44:12 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 06C9416C5D5B; Sun, 11 Nov 2018 11:44:13 -0800 (PST) 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@joelfernandes.org, "Paul E. McKenney" , Tejun Heo Subject: [PATCH tip/core/rcu 25/41] workqueue: Replace call_rcu_sched() with call_rcu() Date: Sun, 11 Nov 2018 11:43:54 -0800 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181111194104.GA4787@linux.ibm.com> References: <20181111194104.GA4787@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18111119-2213-0000-0000-00000315A7E3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010028; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01116019; UDB=6.00578733; IPR=6.00896120; MB=3.00024114; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-11 19:44:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111119-2214-0000-0000-00005C386BB5 Message-Id: <20181111194410.6368-25-paulmck@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-11_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 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-1807170000 definitions=main-1811110188 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Tejun Heo Cc: Lai Jiangshan --- kernel/workqueue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 0280deac392e..392be4b252f6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3396,7 +3396,7 @@ static void put_unbound_pool(struct worker_pool *pool) del_timer_sync(&pool->mayday_timer); /* sched-RCU protected to allow dereferences from get_work_pool() */ - call_rcu_sched(&pool->rcu, rcu_free_pool); + call_rcu(&pool->rcu, rcu_free_pool); } /** @@ -3503,14 +3503,14 @@ static void pwq_unbound_release_workfn(struct work_struct *work) put_unbound_pool(pool); mutex_unlock(&wq_pool_mutex); - call_rcu_sched(&pwq->rcu, rcu_free_pwq); + call_rcu(&pwq->rcu, rcu_free_pwq); /* * If we're the last pwq going away, @wq is already dead and no one * is gonna access it anymore. Schedule RCU free. */ if (is_last) - call_rcu_sched(&wq->rcu, rcu_free_wq); + call_rcu(&wq->rcu, rcu_free_wq); } /** @@ -4195,7 +4195,7 @@ void destroy_workqueue(struct workqueue_struct *wq) * The base ref is never dropped on per-cpu pwqs. Directly * schedule RCU free. */ - call_rcu_sched(&wq->rcu, rcu_free_wq); + call_rcu(&wq->rcu, rcu_free_wq); } else { /* * We're the sole accessor of @wq at this point. Directly -- 2.17.1