Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250Ab3FEHoR (ORCPT ); Wed, 5 Jun 2013 03:44:17 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:37743 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723Ab3FEHoQ (ORCPT ); Wed, 5 Jun 2013 03:44:16 -0400 Date: Wed, 5 Jun 2013 00:44:12 -0700 From: Tejun Heo To: Rusty Russell Cc: Kent Overstreet , linux-kernel@vger.kernel.org, Zach Brown , Felipe Balbi , Greg Kroah-Hartman , Mark Fasheh , Joel Becker , Jens Axboe , Asai Thambi S P , Selvan Mani , Sam Bradshaw , Jeff Moyer , Al Viro , Benjamin LaHaise , Oleg Nesterov , Christoph Lameter , Ingo Molnar , Andrew Morton , Paul McKenney Subject: Re: [PATCH] Generic percpu refcounting Message-ID: <20130605074412.GE7303@mtj.dyndns.org> References: <1370039205-14071-1-git-send-email-koverstreet@google.com> <87d2s1rowi.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d2s1rowi.fsf@rustcorp.com.au> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 27 On Wed, Jun 05, 2013 at 05:05:09PM +0930, Rusty Russell wrote: > I think this should be rcu_read_lock(), which is currently equivalent > but theoretically different. I suggested using preempt_disable/enable() along with sched RCU. I thought that was better for some reason but I was probably misremembering something. rcu_read_lock/unlock() w/ synchronize_rcu() should be fine too. I don't care either way. > Does your percpu_ref_kill() *really* need to be nonblocking? (I'd have > to read your other patches which use this to be sure). Otherwise, just > use synchronize_rcu(), and get rid of the release function... synchronize_rcu() can always become problematic and should always be avoided for generic things which may be used in various ways. They develop into very long latencies pretty quickly when chained back to back. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/