From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbdJCTYa (ORCPT ); Tue, 3 Oct 2017 15:24:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43784 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbdJCTY2 (ORCPT ); Tue, 3 Oct 2017 15:24:28 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2F0F8C058EAA Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com Date: Wed, 4 Oct 2017 03:24:13 +0800 From: Ming Lei To: Bart Van Assche Cc: "linux-scsi@vger.kernel.org" , "hch@infradead.org" , "jejb@linux.vnet.ibm.com" , "linux-block@vger.kernel.org" , "axboe@fb.com" , "martin.petersen@oracle.com" , "linux-kernel@vger.kernel.org" , "jthumshirn@suse.de" , "martin@lichtvoll.de" , "oleksandr@natalenko.name" , "hare@suse.com" , "tj@kernel.org" , "cavery@redhat.com" Subject: Re: [PATCH V8 5/8] percpu-refcount: introduce __percpu_ref_tryget_live Message-ID: <20171003192412.GC5362@ming.t460p> References: <20171003140406.26060-1-ming.lei@redhat.com> <20171003140406.26060-6-ming.lei@redhat.com> <1507056023.2567.1.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507056023.2567.1.camel@wdc.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 03 Oct 2017 19:24:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 03, 2017 at 06:40:24PM +0000, Bart Van Assche wrote: > On Tue, 2017-10-03 at 22:04 +0800, Ming Lei wrote: > > Block layer need to call this function after holding > > rcu lock in a real hot path, so introduce this helper. > > Since it is allowed to nest rcu_read_lock_sched() calls I don't think > that this patch is necessary. Yeah, I know that, with this patch, we can avoid the nest RCU lock. As I mentioned, it is a real hot path, so maybe better to not introduce the extra RCU read lock/unlock. If you guys doesn't care the little cost, I can remove that. -- Ming