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

Re: [Xen-devel] [PATCH] fix netfront alloc_page error handling bug, need to raise up rx_refill timer if rx request buffer not big enough for backend




On 2013-11-14 19:38, David Vrabel wrote:
On 14/11/13 02:39, annie li wrote:
With this assumption, is it easier to fix this issue by moving mod_timer
directly
             mod_timer(&np->rx_refill_timer,
                   jiffies + (HZ/10));
above
             if (i != 0)
                 goto refill;

in xennet_alloc_rx_buffers?
Yes, always setting the timer if we didn't reach the target is a better
fix I think.

However, we probably want to reduce the fill target if we are under
memory pressure.

Something like:

no_skb:
                /* Memory pressure, reduce fill target. */
               if (--np->rx_target < np->rx_target_min)
                    np->rx_target = np->rx_target_min;
                mod_timer(...);
                goto refill;

perhaps?

Sounds reasonable.
When less memory is availble, then reduce rx_target to decrease requirement of memory. And rx_target can be adjusted back after memory is enough in following code,

    if (((req_prod - np->rx.sring->rsp_prod) < (np->rx_target / 4)) &&
        ((np->rx_target *= 2) > np->rx_max_target))
        np->rx_target = np->rx_max_target;

Thanks
Annie

David


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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