netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: rusty@rustcorp.com.au, netdev@vger.kernel.org
Subject: Re: [PATCH] net: No more expensive sock_hold()/sock_put() on each tx
Date: Thu, 11 Jun 2009 02:56:30 -0700 (PDT)	[thread overview]
Message-ID: <20090611.025630.31891354.davem@davemloft.net> (raw)
In-Reply-To: <4A2F6F39.8060107@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Jun 2009 10:30:49 +0200

> David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@gmail.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.

  reply	other threads:[~2009-06-11  9:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 14:14 [PATCH 1/4] net: skb_orphan on dev_hard_start_xmit Rusty Russell
2009-05-29 15:11 ` Eric Dumazet
2009-06-01 12:27   ` Rusty Russell
2009-06-03 21:02     ` Eric Dumazet
2009-06-04  3:54       ` Rusty Russell
2009-06-04  4:00         ` David Miller
2009-06-04  4:54           ` Eric Dumazet
2009-06-04  4:56             ` David Miller
2009-06-04  9:18               ` [PATCH] net: No more expensive sock_hold()/sock_put() on each tx Eric Dumazet
2009-06-04  9:26                 ` David Miller
2009-06-10  8:17                 ` David Miller
2009-06-10  8:30                   ` Eric Dumazet
2009-06-11  9:56                     ` David Miller [this message]
2009-06-01 19:47 ` [PATCH 1/4] net: skb_orphan on dev_hard_start_xmit Patrick Ohly
2009-06-02  7:25   ` David Miller
2009-06-02 14:08     ` Rusty Russell
2009-06-03  0:14       ` David Miller
2009-07-03  7:55         ` Herbert Xu
2009-07-04  3:02           ` David Miller
2009-07-04  3:08             ` Herbert Xu
2009-07-04  3:13               ` David Miller
2009-07-04  7:42                 ` Herbert Xu
2009-07-04  9:09                   ` Herbert Xu
2009-07-05  3:26                     ` Herbert Xu
2009-07-05  3:34                       ` Herbert Xu
2009-08-18  1:47                         ` David Miller
2009-08-19  3:19                           ` Herbert Xu
2009-08-19  3:34                             ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090611.025630.31891354.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).