|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [NET] front: Do not allocate unnecessary
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 1d817bfc5ed90ac6b637e6b52b1c07c22f9fcf50
# Parent 80f364a5662f662dbb12d607403deada8bdba28b
[NET] front: Do not allocate unnecessary page-sized main data area
for receive skbuffs. The bulk data is stored in fragments.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff -r 80f364a5662f -r 1d817bfc5ed9
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Aug 10
15:51:38 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Aug 11
14:22:54 2006 +0100
@@ -609,9 +609,14 @@ static void network_alloc_rx_buffers(str
*/
batch_target = np->rx_target - (req_prod - np->rx.rsp_cons);
for (i = skb_queue_len(&np->rx_batch); i < batch_target; i++) {
- /* Allocate an skb and a page. */
- skb = __dev_alloc_skb(RX_COPY_THRESHOLD,
- GFP_ATOMIC | __GFP_NOWARN);
+ /*
+ * Allocate an skb and a page. Do not use __dev_alloc_skb as
+ * that will allocate page-sized buffers which is not
+ * necessary here.
+ * 16 bytes added as necessary headroom for netif_receive_skb.
+ */
+ skb = alloc_skb(SKB_DATA_ALIGN(RX_COPY_THRESHOLD + 16),
+ GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb))
goto no_skb;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [NET] front: Do not allocate unnecessary page-sized main data area,
Xen patchbot-unstable <=
|
|
|
|
|