]> git.baikalelectronics.ru Git - kernel.git/commit
f_phonet: use page-sized rather than MTU-sized RX buffers
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Thu, 6 Aug 2009 21:56:44 +0000 (21:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2009 03:44:49 +0000 (20:44 -0700)
commit1eaa0e0ea761e1dcdbf7a452c0613829616b8e6b
tree75173bd366c65c734c537f21aea4ea382259a1dd
parent4c4decd03d9aca37c5c48c97e4d5de26457f3dc7
f_phonet: use page-sized rather than MTU-sized RX buffers

Instead of a large (physically) linear buffer, we generate a set of
paged sk_buff, so no extra memory copy is involved. This removes
high-order allocations and saves quite a bit of memory. Phonet MTU is
65541 bytes, so the two buffers were padded to 128 kilo-bytes each.
Now, we create 17 page buffers, almost a 75% memory use reduction.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/usb/gadget/f_phonet.c