[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1c2719f0805071837v5168cee0qa6a3d160e93adb48@mail.gmail.com>
Date: Wed, 7 May 2008 18:37:01 -0700
From: "Jerry Chu" <hkchu@...gle.com>
To: "David Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: Socket buffer sizes with autotuning
On Wed, May 7, 2008 at 2:18 PM, David Miller <davem@...emloft.net> wrote:
> From: "Jerry Chu" <hkchu@...gle.com>
> Date: Wed, 7 May 2008 11:36:59 -0700
>
>
> > No I haven't tested your patch. I tried to understand skb better before
> > applying your patch. After I studied bunch of code, I come to the conclusion
> > that your patch won't work for me. First it tracks # of clones, which is not
> > what I need. E.g., tcpdump will cause host_inflight to be grossly wrong.
>
> We can make sub-clones not count.
>
> Also, we already can distinguish this case, because all SKB clones
> made by TCP are fast-clones. So we could only bump the counter for
> fast clones. If tcpdump clones it again, it won't be a fast clone and
> therefore we can avoid bumping the counter in that case. Similarly
> for other features that want to clone.
Ok, just Google search "skb fast clone" and found some posting from you.
Will take a look.
>
> Please try to get your idea working with my infrastructure. We
> can modify it to behave however you need it to, but at the core
> it's the idea that tracks the state most directly and properly.
>
Ok, will give it a try. First i'll fix your patch to
atomic_add()/atomic_sub() by
skb_shinfo(skb)->gso_segs rather than always 1, in order for GSO/TSO to work.
One problem came up to my mind - it seems possible for __kfree_skb() to
access skb_shinfo(skb)->in_flight whose tp has been freed up since only the
original skb's on TCP's rexmit list have the owner set and socket
held. One solution
is for TCP to zap skb_shinfo(skb)->in_flight field when it's ready to
free up skb.
I can hack sock_wfree() to do this, but I don't know how to do it right.
Jerry
--
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