From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbcKRKwP (ORCPT ); Fri, 18 Nov 2016 05:52:15 -0500 Received: from merlin.infradead.org ([205.233.59.134]:45572 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbcKRKwN (ORCPT ); Fri, 18 Nov 2016 05:52:13 -0500 Date: Fri, 18 Nov 2016 11:52:06 +0100 From: Peter Zijlstra To: "Reshetova, Elena" Cc: "gregkh@linuxfoundation.org" , "keescook@chromium.org" , "will.deacon@arm.com" , "arnd@arndb.de" , "tglx@linutronix.de" , "mingo@kernel.org" , "hpa@zytor.com" , "dave@progbits.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC][PATCH 7/7] kref: Implement using refcount_t Message-ID: <20161118105206.GM3117@twins.programming.kicks-ass.net> References: <20161114173946.501528675@infradead.org> <20161114174446.832175072@infradead.org> <2236FBA76BA1254E88B949DDB74E612B41C14924@IRSMSX102.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2236FBA76BA1254E88B949DDB74E612B41C14924@IRSMSX102.ger.corp.intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Could you please fix you mailer to not unwrap the emails? On Fri, Nov 18, 2016 at 10:47:40AM +0000, Reshetova, Elena wrote: > >Provide refcount_t, an atomic_t like primitive built just for > >refcounting. It provides overflow and underflow checks as well as > >saturation semantics such that when it overflows, we'll never attempt > >to free it again, ever. > > >Peter do you have the changes to the refcount_t interface compare to > >the version in this patch? We are now starting working on atomic_t > >--> refcount_t conversions and it would save a bit of work to have > >latest version from you that we can be based upon. > > Oh, and if we define refcount_t to be just atomic_t underneath, what > about the other atomic_long_t, local_t and atomic64_t cases when it is > used for recounting? I don't feel good just simply changing them to > become atomic_t under refcount_t wrapper..... Is there anybody using local_t ? That seems 'creative' and highly questionable. As for atomic_long_t there's very few, I'd leave them be for now, and I couldn't find a single atomic64_t refcount user.