[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] linux: Adjust memory allocation condition in netback to reduce memory



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173711302 0
# Node ID 68282f4b3e0f02e4febb6a28eda594506fe5b38c
# Parent  a4ca6a264fee5dce40c51c1e8b319767afb41210
linux: Adjust memory allocation condition in netback to reduce memory
pressure on Xen and avoid unnecessarily stalling receives.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r a4ca6a264fee -r 68282f4b3e0f 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Mar 12 
14:52:11 2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Mar 12 
14:55:02 2007 +0000
@@ -110,6 +110,7 @@ static unsigned int alloc_index = 0;
 
 static inline unsigned long alloc_mfn(void)
 {
+       BUG_ON(alloc_index == 0);
        return mfn_list[--alloc_index];
 }
 
@@ -552,6 +553,7 @@ static void net_rx_action(unsigned long 
                *(int *)skb->cb = nr_frags;
 
                if (!xen_feature(XENFEAT_auto_translated_physmap) &&
+                   !((netif_t *)netdev_priv(skb->dev))->copying_receiver &&
                    check_mfn(nr_frags + 1)) {
                        /* Memory squeeze? Back off for an arbitrary while. */
                        if ( net_ratelimit() )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.