From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752068Ab1LKPgb (ORCPT ); Sun, 11 Dec 2011 10:36:31 -0500 Received: from [205.233.59.134] ([205.233.59.134]:56768 "EHLO merlin.infradead.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751961Ab1LKPga convert rfc822-to-8bit (ORCPT ); Sun, 11 Dec 2011 10:36:30 -0500 Message-ID: <1323617738.16764.21.camel@twins> Subject: Re: [PATCH 3/3] kref: Remove the memory barriers From: Peter Zijlstra To: Ming Lei Cc: gregkh@suse.de, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, ostrikov@nvidia.com, adobriyan@gmail.com, eric.dumazet@gmail.com, mingo@elte.hu, Oliver Neukum Date: Sun, 11 Dec 2011 16:35:38 +0100 In-Reply-To: References: <20111210104341.592561407@chello.nl> <20111210104840.295857663@chello.nl> <1323529084.16764.5.camel@twins> <1323546551.2822.14.camel@laptop> <1323607627.16764.13.camel@twins> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.2.1- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2011-12-11 at 20:59 +0800, Ming Lei wrote: > > The implicit rule about kref is that use should make sure > that kref can not be touched once it is released. The only transition for with order makes any difference what so ever is 1 -> 0, you just said that should be done by external means (I agree and have argued thusly), therefore any memory barriers outside of these external means are superfluous. Thus the proposed patch is correct.