From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751442AbdJCTU4 (ORCPT ); Tue, 3 Oct 2017 15:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57586 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbdJCTUy (ORCPT ); Tue, 3 Oct 2017 15:20:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 57D4529AF5 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com Date: Wed, 4 Oct 2017 03:20:40 +0800 From: Ming Lei To: Tejun Heo Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , linux-scsi@vger.kernel.org, "Martin K . Petersen" , "James E . J . Bottomley" , Bart Van Assche , Oleksandr Natalenko , Johannes Thumshirn , Cathy Avery , Martin Steigerwald , linux-kernel@vger.kernel.org, Hannes Reinecke , Bart Van Assche Subject: Re: [PATCH V8 5/8] percpu-refcount: introduce __percpu_ref_tryget_live Message-ID: <20171003192039.GB5362@ming.t460p> References: <20171003140406.26060-1-ming.lei@redhat.com> <20171003140406.26060-6-ming.lei@redhat.com> <20171003141459.GI3301751@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171003141459.GI3301751@devbig577.frc2.facebook.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.28]); Tue, 03 Oct 2017 19:20:54 +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 07:14:59AM -0700, Tejun Heo wrote: > Hello, > > On Tue, Oct 03, 2017 at 10:04:03PM +0800, Ming Lei wrote: > > Block layer need to call this function after holding > > rcu lock in a real hot path, so introduce this helper. > > The patch description is too anemic. It doesn't even describe what > changes are being made, let alone justifying them. Sorry for Cc you, and this change is needed by the following patch: https://marc.info/?l=linux-scsi&m=150703956929333&w=2 Block layer need to call percpu_ref_tryget_live() with holding RCU read lock, given it is a hot I/O path, that is why I make this patch so that we can avoid nested RCU read lock and save a bit cost. -- Ming