netdev
[Top] [All Lists]

Re: [PATCH] Improve behaviour of Netlink Sockets

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [PATCH] Improve behaviour of Netlink Sockets
From: Pablo Neira <pablo@xxxxxxxxxxx>
Date: Thu, 23 Sep 2004 17:40:24 +0200
Cc: hadi@xxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040922105221.59a67d4b.davem@xxxxxxxxxxxxx>
References: <414DF11C.1080505@xxxxxxxxxxx> <20040919215915.GB9573@xxxxxxxxxxxxxxxxxxx> <1095633569.1047.107.camel@xxxxxxxxxxxxxxxx> <20040919231734.GA10124@xxxxxxxxxxxxxxxxxxx> <1095647944.1046.206.camel@xxxxxxxxxxxxxxxx> <20040920025802.GA11567@xxxxxxxxxxxxxxxxxxx> <1095683660.1047.254.camel@xxxxxxxxxxxxxxxx> <414F1E12.6010808@xxxxxxxxxxx> <20040922000503.GA13218@xxxxxxxxxxxxxxxxxxx> <4150E7E5.2000001@xxxxxxxxxxx> <20040922045239.GA19573@xxxxxxxxxxxxxxxxxxx> <1095854920.1047.64.camel@xxxxxxxxxxxxxxxx> <20040922105221.59a67d4b.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
David S. Miller wrote:

On 22 Sep 2004 08:08:40 -0400
jamal <hadi@xxxxxxxxxx> wrote:

Note also, theres a lot of wastage of that scarce sock buffer via page
sized skbs - its not as trivial to fix, but would go some way to improve
overrunning of the socket.

Thanks for reminding me about this.

Initially we could allocate a skb with size NLMSG_GOODSIZE, then after all the information has been added, we could use a function (skb_*) which allocates a new buffer headroom, memcpy the old skb headroom and release it, so we trim the useless part of the headroom. This make us waste some extra jiffies with memcpy's but we could save same space in the queue. Does such skb_* function exist?

Another choice could be using a temporary buffer and them memcpy the buffer to a skb which has only allocated the buffer space used.

regards,
Pablo

<Prev in Thread] Current Thread [Next in Thread>