Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1807204imm; Tue, 22 May 2018 09:37:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpEKiC/fN9QJlnG3ADW0s3RsCxY/B2mj7mXCKiiHqF9eFlNYlm40/QHYWI6td+DmBCqYtQ X-Received: by 2002:aa7:850f:: with SMTP id v15-v6mr24979936pfn.144.1527007022656; Tue, 22 May 2018 09:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527007022; cv=none; d=google.com; s=arc-20160816; b=nqN+rFQoUTYh7vUi2ztrj7pzzDGvQ9OCgqLuLl2dBlj55zAeR2dmjiiI5mpvP8G7GD oVEqbZomRkx3VTpSWWCO91P5qfV6EeAEehx5y253iwTRXly/FBiTuuKGd9meKPHqjezl ge4RTbCurvkmSpbVw0rRpRytgDpJd4vnYoM3cxsYZuJTdvOSCf0CNYVmT48lDuoTK91n SEHoSSRPs56ByFavOCxjzhLJTsdBMMzLj92yebmefsdUboY9GuN/+EitFRLMt4/tawP2 ypRjFnhVlICx4sG8H6CyuuU57nWLOaHwWFrtqY9d1nqxvbSDMJCeGgtYPgjx+VroGdDB 6qRw== 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=qpYBA0HqPaFw0EQ5D6KB+cj9FXru2LmFjLwH9XIzpKE=; b=erLhUk50+Tf/jRXopmxRwh/bumjnahIMzei742H9oMANyrDaz3+HzNEr1DY/GF7ua7 NIoI5P3lR5aPKO7E8+4CRAg/billvYLOUtaX/1sRbh7JPeqz/VpyHlXtoNcr6xpYE6iK tZHvGAwCoI1LA84yc1lkXqpNoZp9HWqZYct2MBKoh2qLSxaOCTMKEMfUcQzJHOxuqqhd LZ684EwBznUCJCeAKRgYiGAtBMGjfU6a7rHP/q9NrynETsp8r1Dwa4SxR8ewN/E3YEeN dlPmd5ek1mOBFs0SwcNEhq6DNFzOKl2IQzZDX9ohbgDw+9jHKf4iVG7XhF8Qyu2+zg75 CP2Q== 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 b97-v6si16924099plb.135.2018.05.22.09.36.47; Tue, 22 May 2018 09:37:02 -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 S1752556AbeEVQgI (ORCPT + 99 others); Tue, 22 May 2018 12:36:08 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40314 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbeEVQgD (ORCPT ); Tue, 22 May 2018 12:36:03 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4MGXssK131643 for ; Tue, 22 May 2018 12:36:03 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j4knyb9bc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 May 2018 12:36:02 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 May 2018 10:36:02 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 22 May 2018 10:35:56 -0600 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4MGZtxQ13763066; Tue, 22 May 2018 09:35:56 -0700 Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A24C1B2513; Tue, 22 May 2018 13:37:45 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 69FEAB2518; Tue, 22 May 2018 13:37:01 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 22 May 2018 13:37:01 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 8157016C0E7D; Tue, 22 May 2018 09:36:48 -0700 (PDT) Date: Tue, 22 May 2018 09:36:48 -0700 From: "Paul E. McKenney" To: Roman Penyaev Cc: Linus Torvalds , linux-block , linux-rdma , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Bart Van Assche , Or Gerlitz , Doug Ledford , "swapnil.ingle" , Danil Kipnis , Jinpu Wang , Linux Kernel Mailing List Subject: Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu() Reply-To: paulmck@linux.vnet.ibm.com References: <20180518130413.16997-1-roman.penyaev@profitbricks.com> <20180518130413.16997-2-roman.penyaev@profitbricks.com> <20180519163735.GX3803@linux.vnet.ibm.com> <20180520004318.GY3803@linux.vnet.ibm.com> <20180521153337.GF3803@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18052216-0004-0000-0000-000014227E77 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009066; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000261; SDB=6.01036085; UDB=6.00529999; IPR=6.00815212; MB=3.00021242; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-22 16:36:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052216-0005-0000-0000-0000874F2A2D Message-Id: <20180522163648.GV3803@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-22_05:,, 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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805220183 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 11:09:08AM +0200, Roman Penyaev wrote: > On Mon, May 21, 2018 at 5:33 PM, Paul E. McKenney > wrote: > > On Mon, May 21, 2018 at 08:16:59AM -0700, Linus Torvalds wrote: > >> On Mon, May 21, 2018 at 6:51 AM Roman Penyaev < > >> roman.penyaev@profitbricks.com> wrote: > >> > >> > No, I continue from the pointer, which I assigned on the previous IO > >> > in order to send IO fairly and keep load balanced. > >> > >> Right. And that's exactly what has both me and Paul nervous. You're no > >> longer in the RCU domain. You're using a pointer where the lifetime has > >> nothing to do with RCU any more. > >> > >> Can it be done? Sure. But you need *other* locking for it (that you haven't > >> explained), and it's fragile as hell. > > > > He looks to actually have it right, but I would want to see a big comment > > on the read side noting the leak of the pointer and documenting why it > > is OK. > > Hi Paul and Linus, > > Should I resend current patch with more clear comments about how careful > caller should be with a leaking pointer? Also I will update read side > with a fat comment about "rcu_assign_pointer()" which leaks the pointer > out of RCU domain and what is done to prevent nasty consequences. > Does that sound acceptable? That sounds good to me. Thanx, Paul