[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090611.025630.31891354.davem@davemloft.net>
Date: Thu, 11 Jun 2009 02:56:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: rusty@...tcorp.com.au, netdev@...r.kernel.org
Subject: Re: [PATCH] net: No more expensive sock_hold()/sock_put() on each
tx
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Wed, 10 Jun 2009 10:30:49 +0200
> David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@...il.com>
>> Date: Thu, 04 Jun 2009 11:18:35 +0200
>>
>> Eric, I don't understand this part, please enlighten me :-)
>>
>> Just because we've liberated all of the write buffer space, that does
>> not mean that it's time to kill off the socket completely.
>>
>> Right?
>
> Remember we initialize this field to one.
>
> If we freed all write buffer space, final value is one, not zero.
>
> res == 0 only if we both freed all write buffer space, *and* socket was
> also refcounted to 0 (sk_free() then realized it could not yet call __sk_free())
>
> So we cheat a litle bit, because of this offset of one, we might block a sender a litle bit earlier :)
Now I understand, thanks!
Patch applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists