|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 0/3] XenVif receive backpressure adjustments
To be accompanied with the Xenbus patch for suppressing quota-related
error messages in CacheCreateSlab.
Currently, traffic floods can cause anything from system lockups to
resource exhaustion (OOM) due to insufficient backpressure. The causes
are uncontrolled packet cache allocation, uncontrolled restarts and
queue DPC cascades.
An easy reproducer is to start a UDP flood from a Linux VM:
#!/bin/sh
set -e
IFACE="enX0" # replace with real VM's iface name
SRC_MAC="02:00:00:00:00:01"
DST_MAC="02:00:00:00:00:02" # replace with real victim VIF's MAC
DST_IP="192.0.2.1" # replace with real victim VIF's IP
UDP_PORT="9"
modprobe pktgen
PG=/proc/net/pktgen
echo rem_device_all > "$PG/kpktgend_0"
echo "add_device $IFACE" > "$PG/kpktgend_0"
echo clone_skb 1000 > "$PG/$IFACE"
echo pkt_size 60 > "$PG/$IFACE"
echo count 0 > "$PG/$IFACE"
echo delay 0 > "$PG/$IFACE"
echo "dst_mac $DST_MAC" > "$PG/$IFACE"
echo "src_mac $SRC_MAC" > "$PG/$IFACE"
echo "dst $DST_IP" > "$PG/$IFACE"
echo "dst_min $DST_IP" > "$PG/$IFACE"
echo "dst_max $DST_IP" > "$PG/$IFACE"
echo "udp_dst_min $UDP_PORT" > "$PG/$IFACE"
echo "udp_dst_max $UDP_PORT" > "$PG/$IFACE"
echo start > "$PG/pgctrl"
To stop:
echo stop > /proc/net/pktgen/pgctrl
The following patches attempt to address this problem by adding
backpressure at key exhaustion-prone locations (packet cache size, ring
restart behavior, ring unpause behavior). With these patches, the victim
VM's system and networking remain responsive throughout the flood.
Tu Dinh (3):
Cap the size of the receiver PacketCache
Conditionally restart the RX ring from packet return
Avoid requeuing QueueDpc during ring swizzles
src/xenvif/receiver.c | 113 +++++++++++++++++++++++-------------------
1 file changed, 63 insertions(+), 50 deletions(-)
--
2.54.0.windows.1
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |