Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5201210imm; Fri, 18 May 2018 19:29:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpklFlDq3ELfMWxII4UvN7t4EEVb3Qg8EVh4710wDZd8OoDh/tw3N7PPusj7ucvM3ueC2Gc X-Received: by 2002:a17:902:9344:: with SMTP id g4-v6mr12055548plp.10.1526696978977; Fri, 18 May 2018 19:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526696978; cv=none; d=google.com; s=arc-20160816; b=KTT7jNpUrRscUpZMcatfKm0ebNgST6EZI1YU4q8d6mMSmzwBA46YUrAoeyumaGAfqd ukp88TinwqAcx21nbZmnL5YXltB4jExaS8LrngHIxT9im1TSo1cXJR9rVY1snwDhM92h l1iJ1KMDyElg3qhW74EgjjEOyB1tF/j8I+BLCOQZzenWuY6yg1KzuXzID3M4aYDlqJq5 qx1yOU5hbEBmUetTzO7CfWEvfvWMRtPZWysvFbgRHH/KadllumYlSwyv/MqqksQdbWok YB1ML6ojwibn0td960V3OZJyfSTVs9OS0fLo+7yUBYiQ5Q+9xXGNaRIkp/YN0ZBnnqmU ZcuQ== 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:arc-authentication-results; bh=mfTrQ1Vluqp6STIhDca+3Bu3rSAB2LuGz0Dbr7vaR1o=; b=iPt364BttZHWoB0wo+t/yLtiBgJZoDxLlCepCNfQSHHZ3ircymEZVg+uG7cMHOmBvK SBnRrloulk1W5aTm1xI82CLqnd9HA8zTvMjYNut78w2AvBjbtRy0djjypL3zu3Xwt3Hq xGirgPiYAyutDxEQ3eWM6GlfdSBSq3rc3QVEdppiEF10A0Kq0Tz93xdw8Lbig0aVKul4 VJ19BG1kiwOckSQVigQrWUFQkEHg1a9PJeBNPm7q6/JYs2S4FF00KkUtOTrs9t9LXWMH 8HZVtAjTJwmb8jNQmXztewKxQjBXU4vsOg6n8gYN2ONKVBO99G5pjtpqrpMEYwf1J+m2 4xYg== 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 n9-v6si6863019pgq.470.2018.05.18.19.29.24; Fri, 18 May 2018 19:29:38 -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 S1752168AbeESC1x (ORCPT + 99 others); Fri, 18 May 2018 22:27:53 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55230 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751117AbeESC1t (ORCPT ); Fri, 18 May 2018 22:27:49 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4J2Ogwg003479 for ; Fri, 18 May 2018 22:27:49 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j27088pdx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 22:27:49 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 22:27:48 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) 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) Fri, 18 May 2018 22:27:45 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4J2RieO48758854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 May 2018 02:27:44 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C680B2068; Fri, 18 May 2018 23:29:38 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67787B205F; Fri, 18 May 2018 23:29:38 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.187.109]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 18 May 2018 23:29:38 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 3E00816C3F24; Fri, 18 May 2018 19:29:18 -0700 (PDT) Date: Fri, 18 May 2018 19:29:18 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: rostedt@goodmis.org, byungchul.park@lge.com, mathieu.desnoyers@efficios.com, Josh Triplett , Lai Jiangshan , linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: Tasks RCU vs Preempt RCU Reply-To: paulmck@linux.vnet.ibm.com References: <20180518183623.GA163151@joelaf.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180518183623.GA163151@joelaf.mtv.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18051902-2213-0000-0000-000002A83448 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009050; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000261; SDB=6.01034362; UDB=6.00528968; IPR=6.00813490; MB=3.00021194; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-19 02:27:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051902-2214-0000-0000-00005A2BE355 Message-Id: <20180519022918.GV3803@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805190025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 11:36:23AM -0700, Joel Fernandes wrote: > Hi, > > I was thinking about tasks-RCU and why its needed. Since preempt-RCU allows > tasks to be preempted in read-sections, can we not just reuse that mechanism > for the trampolines since we track all preempted tasks so we would wait on > all tasks preempted within a trampoline? > > I am trying to understand what will _not_ work if we did that.. I'm guessing > the answer is that that would mean the trampoline has to be wrapped with > rcu_read_{lock,unlock} which may add some overhead, but please let me know > if I'm missing something else.. > > The advantage I guess is possible elimination of an RCU variant, and also > possibly eliminating the tasks RCU thread that monitors.. Anyway I was > thinking more in terms of the effort of reduction of the RCU flavors etc and > reducing complexity ideas. The problem is that if they are preempted while executing in a trampoline, RCU-preempt doesn't queue them nor does it wait on them. And the problem with wrapping them with rcu_read_{lock,unlock} is that there would be a point before the trampoline executed rcu_read_lock() but while it was on the trampoline. Nothing good comes from this. ;-) Thanx, Paul