linux: Adjust memory allocation condition in netback
PATCH 1/1 linux: Adjust memory allocation condition in netback
.. to reduce memory pressure on Xen and avoid unnecessarily stalling receives.
Signed-off-by Jan Beulich <[email protected]>
drivers/xen/netback/netback.c +2 -0
@@ -110,6 +110,7 @@ static unsigned int alloc_index = 0;static inline unsigned long alloc_mfn (void ) { +BUG_ON (!alloc_index);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 () )