Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbdFHUJw (ORCPT ); Thu, 8 Jun 2017 16:09:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:58505 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751510AbdFHUJv (ORCPT ); Thu, 8 Jun 2017 16:09:51 -0400 Date: Thu, 8 Jun 2017 13:09:31 -0700 From: Davidlohr Bueso To: "Reshetova, Elena" Cc: Christoph Hellwig , Kees Cook , "linux-kernel@vger.kernel.org" , Peter Zijlstra , "Eric W. Biederman" , Andrew Morton , Josh Poimboeuf , Jann Horn , Eric Biggers , Hans Liljestrand , David Windsor , Greg KH , Ingo Molnar , Alexey Dobriyan , "Serge E. Hallyn" , "arozansk@redhat.com" , Manfred Spraul , "axboe@kernel.dk" , James Bottomley , "x86@kernel.org" , Ingo Molnar , Arnd Bergmann , "David S. Miller" , Rik van Riel , linux-arch Subject: Re: [PATCH v2] refcount: Create unchecked atomic_t implementation Message-ID: <20170608200931.GC2464@linux-80c1.suse> References: <20170608025831.GA43608@beast> <20170608065809.GC14568@infradead.org> <2236FBA76BA1254E88B949DDB74E612B6FF0E5C7@IRSMSX102.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <2236FBA76BA1254E88B949DDB74E612B6FF0E5C7@IRSMSX102.ger.corp.intel.com> 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 Content-Length: 1344 Lines: 28 On Thu, 08 Jun 2017, Reshetova, Elena wrote: >> On Wed, Jun 07, 2017 at 07:58:31PM -0700, Kees Cook wrote: >> > Many subsystems will not use refcount_t unless there is a way to build the >> > kernel so that there is no regression in speed compared to atomic_t. This >> > adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation >> > which has the validation but is slightly slower. When not enabled, >> > refcount_t uses the basic unchecked atomic_t routines, which results in >> > no code changes compared to just using atomic_t directly. >> > >> > Signed-off-by: Kees Cook >> > --- >> > This is v2 of this patch, which I've split from the arch-specific >> > alternative implementation for x86. Getting this patch in will unblock >> > atomic_t -> refcount_t conversion, and the x86 alternative implementation >> > can be developed in parallel. Changes from v1: use better atomic ops, >> > thanks to Elena and Peter. >> >> Yeah, can we get this in ASAP? Without having to always incur the over >> this will allow us to convert subsystems to refcount_t broadly. > >+1. If this gets in, I can refresh the rest of the patches in net, mm, ipc, block, etc. and send them for review again. Yes, this would be a prerequisite for ipc; which I initially thought didn't take a performance hit. Thanks, Davidlohr