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)
commitb91cd1440870f7a0649e570498b7b93caf9f781c
tree75173bd366c65c734c537f21aea4ea382259a1dd
parent5da63cc4b2258e1c06ee41637492717481025143
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