]> git.baikalelectronics.ru Git - kernel.git/commit
net: Optimize memory usage when splicing from sockets.
authorJarek Poplawski <jarkao2@gmail.com>
Sun, 1 Feb 2009 08:41:42 +0000 (00:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Feb 2009 08:41:42 +0000 (00:41 -0800)
commit0197d5b8da535503b5756cb1587ac585184adc1e
tree0be7481f6339fe4cb32faf4047f15f7cc962babc
parentb3b6fff8635c751a899c32f8562032a0f2be3ccd
net: Optimize memory usage when splicing from sockets.

The recent fix of data corruption when splicing from sockets uses
memory very inefficiently allocating a new page to copy each chunk of
linear part of skb. This patch uses the same page until it's full
(almost) by caching the page in sk_sndmsg_page field.

With changes from David S. Miller <davem@davemloft.net>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c