From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdI2BKx (ORCPT ); Thu, 28 Sep 2017 21:10:53 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43012 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbdI2BKw (ORCPT ); Thu, 28 Sep 2017 21:10:52 -0400 Date: Thu, 28 Sep 2017 18:10:46 -0700 From: "Paul E. McKenney" To: Sebastian Andrzej Siewior Cc: Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] srcu: queue work without holding the lock Reply-To: paulmck@linux.vnet.ibm.com References: <20170922152806.22860-1-bigeasy@linutronix.de> <20170922152806.22860-2-bigeasy@linutronix.de> <20170922184610.GT3521@linux.vnet.ibm.com> <20170928160357.anfyrkwq32tyamez@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928160357.anfyrkwq32tyamez@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17092901-0024-0000-0000-000002DA1EA6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007806; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000232; SDB=6.00923830; UDB=6.00464470; IPR=6.00703968; BA=6.00005613; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017313; XFM=3.00000015; UTC=2017-09-29 01:10:49 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092901-0025-0000-0000-00004592FD74 Message-Id: <20170929011046.GW3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-28_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-1707230000 definitions=main-1709290015 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 28, 2017 at 06:03:57PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-09-22 11:46:10 [-0700], Paul E. McKenney wrote: > > On Fri, Sep 22, 2017 at 05:28:05PM +0200, Sebastian Andrzej Siewior wrote: > > > On RT we can't invoke queue_delayed_work() within an atomic section > > > (which is provided by raw_spin_lock_irqsave()). > > > srcu_reschedule() invokes queue_delayed_work() outside of the > > > raw_spin_lock_irq_rcu_node() section so this should be fine here, too. > > > If the remaining callers of call_srcu() aren't atomic > > > (spin_lock_irqsave() is fine) then this should work on RT, too. > > > > Just to make sure I understand... The problem is not the _irqsave, > > but rather the raw_? > > exactly. The _irqsave is translated into a sleeping lock on RT and does > not matter. The raw_ ones stay as they are and queue_delayed_work() uses > sleeping locks itself and this is where things fall apart. OK, internally I could get rid of raw_ at the expense of some code bloat, but in the call_srcu() case, the caller might well hold a raw_ lock. Thoughts? Thanx, Paul