Re: [PATCH] net: No more expensive sock_hold()/sock_put() on each tx
From: David Miller <davem@davemloft.net>
Date: 2009-06-11 09:56:28
From: David Miller <davem@davemloft.net>
Date: 2009-06-11 09:56:28
From: Eric Dumazet <redacted> Date: Wed, 10 Jun 2009 10:30:49 +0200
David Miller a écrit :quoted
From: Eric Dumazet <redacted> 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.