From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384AbdBKB2W (ORCPT ); Fri, 10 Feb 2017 20:28:22 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57459 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbdBKB2V (ORCPT ); Fri, 10 Feb 2017 20:28:21 -0500 Date: Fri, 10 Feb 2017 13:21:58 -0800 From: "Paul E. McKenney" To: tj@kernel.org, jiangshanlai@gmail.com Cc: linux-kernel@vger.kernel.org Subject: Is it really safe to use workqueues to drive expedited grace periods? 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-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021021-0004-0000-0000-0000118AF650 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006593; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000203; SDB=6.00820070; UDB=6.00400925; IPR=6.00597524; BA=6.00005130; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014248; XFM=3.00000011; UTC=2017-02-10 21:22:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021021-0005-0000-0000-00007CF541FE Message-Id: <20170210212158.GA20183@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-10_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702100212 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! So RCU's expedited grace periods have been using workqueues for a little while, and things seem to be working. But as usual, I worry... Is this use subject to some sort of deadlock where RCU's workqueue cannot start running until after a grace period completes, but that grace period is the one needing the workqueue? Note that there are ways to set up your kernel so that all RCU grace periods are expedited. Should I be worried? If not, what prevents this from being a problem, especially given that workqueue handlers are allowed to wait for RCU grace periods to complete? Thanx, Paul