Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964864AbWA3StH (ORCPT ); Mon, 30 Jan 2006 13:49:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964865AbWA3StH (ORCPT ); Mon, 30 Jan 2006 13:49:07 -0500 Received: from mail.kroah.org ([69.55.234.183]:18634 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S964864AbWA3StF (ORCPT ); Mon, 30 Jan 2006 13:49:05 -0500 Date: Mon, 30 Jan 2006 10:43:02 -0800 From: Greg KH To: Eric Dumazet Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, vserver@list.linux-vserver.org, Herbert Poetzl , "Serge E. Hallyn" , Alan Cox , Dave Hansen , Arjan van de Ven , Suleiman Souhlal , Hubertus Franke , Cedric Le Goater , Kyle Moffett Subject: Re: [PATCH 1/5] pid: Implement task references. Message-ID: <20060130184302.GA17457@kroah.com> References: <20060129190539.GA26794@kroah.com> <20060130045153.GC13244@kroah.com> <43DDA1E7.5010109@cosmosbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43DDA1E7.5010109@cosmosbay.com> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 756 Lines: 19 On Mon, Jan 30, 2006 at 06:19:35AM +0100, Eric Dumazet wrote: > Example of improvement in kref_put() : > > [PATCH] kref : Avoid an atomic operation in kref_put() when the last > reference is dropped. On most platforms, atomic_read() is a plan read of > the counter and involves no atomic at all. No, we wat to decrement and test at the same time, to protect against any race where someone is incrementing right when we are dropping the last reference. So, thanks, but I'm not going to apply this. greg k-h - 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/