Re: [PATCH net-next 2/3] virtio-net: use per-receive queue page frag alloc for mergeable bufs

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

 



On Wed, 2014-01-08 at 19:21 +0200, Michael S. Tsirkin wrote:

> Basically yes, we could start dropping packets immediately
> once GFP_ATOMIC allocations fail and repost the buffer to host,
> and hope memory is available by the time we get the next interrupt.

> But we wanted host to have visibility into the fact that
> we are out of memory and packets are dropped, so we did not want to
> repost.

bufferbloat alert :)

> If we don't repost how do we know memory is finally available?
> We went for a timer based workqueue thing.
> What do you suggest?


In normal networking land, when a host A sends frames to host B,
nothing prevents A to pause the traffic to B if B is dropping packets
under stress.

A physical NIC do not use a workqueue to refill its RX queue but uses
the following strategy :

0) Pre filling of RX ring buffer with N frames. This can use GFP_KERNEL
   allocations with all needed (sleep/retry/shout) logic...
1) IRQ is handled.
2) Can we allocate a new buffer (GFP_ATOMIC) ?
   If yes, we accept the frame,
      and post the new buffer for the 'next frame'
   If no, we drop the frame and recycle the memory for next round.



_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux