From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965801AbcKOIkU (ORCPT ); Tue, 15 Nov 2016 03:40:20 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36712 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbcKOIkO (ORCPT ); Tue, 15 Nov 2016 03:40:14 -0500 Date: Tue, 15 Nov 2016 09:40:09 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: gregkh@linuxfoundation.org, keescook@chromium.org, will.deacon@arm.com, elena.reshetova@intel.com, arnd@arndb.de, tglx@linutronix.de, hpa@zytor.com, dave@progbits.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 7/7] kref: Implement using refcount_t Message-ID: <20161115084009.GB15734@gmail.com> References: <20161114173946.501528675@infradead.org> <20161114174446.832175072@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114174446.832175072@infradead.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra 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. > > Signed-off-by: Peter Zijlstra (Intel) > --- > include/linux/kref.h | 29 ++---- > include/linux/refcount.h | 221 +++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 232 insertions(+), 18 deletions(-) I'd suggest splitting this patch into two parts: first patch introduces the refcount.h facility, second patch changes over struct kref to the new facility. Thanks, Ingo