From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: Socket buffer sizes with autotuning Date: Mon, 12 May 2008 15:31:14 -0700 (PDT) Message-ID: <20080512.153114.163063885.davem@davemloft.net> References: <20080512.152900.220913361.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: hkchu@google.com Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:49394 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754007AbYELWbT (ORCPT ); Mon, 12 May 2008 18:31:19 -0400 In-Reply-To: <20080512.152900.220913361.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: From: David Miller Date: Mon, 12 May 2008 15:29:00 -0700 (PDT) > Simply notice, when we're about to decrement in_flight, that the data > reference is one. You can take appropriate actions if so. Actually, there is an even simpler solution. Since this is a fast clone, when the parent SKB is freed we can see if the fast-clone child is active and has the in_flight atomic_t pointer. If so, we decrement in_flight and zap it to NULL.