From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: dccp@vger.kernel.org
Subject: Re: dccp send
Date: Thu, 03 Jan 2008 23:27:53 +0000 [thread overview]
Message-ID: <20080103232753.GN29523@ghostprotocols.net> (raw)
In-Reply-To: <200801020141.16432.tomasz@grobelny.oswiecenia.net>
Em Fri, Jan 04, 2008 at 11:25:29AM +1300, Ian McDonald escreveu:
> On Jan 4, 2008 11:19 AM, Tomasz Grobelny <tomasz@grobelny.oswiecenia.net> wrote:
> > I think I almost got it. Thanks a lot for the detailed explanation. But I've
> > got two more questions:
> > 1. How can I control the amount of "memory allowed to be allocated for the
> > socket send buffer"? It it somehow connected with tx_qlen or is it not?
>
> I wrote the code here so let me comment - there is no fixed amount of
> memory allocated - it is determined by the tx_qlen. I was looking at
there is no memory allocated in advance nor explicit, DCCP specific
mechanism for limiting the amount of memory a socket can use for its
write queue, but DCCP uses sock_alloc_send_skb and that function does
memory accounting and checks if the maximum memory (SO_SNDBUF) has been
reached, when it makes the app to sleep if O_NONBLOCK is not set.
> implementing memory limits but it got too hard and as DCCP doesn't
> combine packets I thought it made it much simpler just to put a limit
> by packets.
>
> > 2. If I decide that for whatever reason a given skb already in sk_write_queue
> > should not be transmitted I should remove it from queue and call kfree_skb on
> > it, it that right?
>
> Correct. Remember of course all your locking mechanisms. If you want a
> good example look at the below towards the end:
> http://wand.net.nz/~iam4/dccp/patches20/30-best_packet_next.diff
>
> (NB this patch applies against 2.6.20 after previous patches in series).
Correct if he is in-kernel.
- Arnaldo
next prev parent reply other threads:[~2008-01-03 23:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 0:41 dccp send Tomasz Grobelny
2008-01-02 2:37 ` Arnaldo Carvalho de Melo
2008-01-02 22:34 ` Tomasz Grobelny
2008-01-03 1:02 ` Arnaldo Carvalho de Melo
2008-01-03 22:19 ` Tomasz Grobelny
2008-01-03 22:25 ` Ian McDonald
2008-01-03 23:23 ` Arnaldo Carvalho de Melo
2008-01-03 23:27 ` Arnaldo Carvalho de Melo [this message]
2008-01-04 16:28 ` Tomasz Grobelny
2008-01-04 18:56 ` Ian McDonald
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=20080103232753.GN29523@ghostprotocols.net \
--to=acme@redhat.com \
--cc=dccp@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.