These patches are to this scenario: " When the host run for long time, there are a lot of memory fragments in the hosts. And it is possible that kernel will compact memory fragments. But normally it is difficult for NIC driver to allocate a memory from kernel. From this variable stat_rx_dropped, we can confirm that NIC driver can not allocate skb very frequently. "
Since NIC driver can not allocate skb in time, this makes some important tasks not be completed in time. To avoid it, a recv cache is created to pre-allocate skb for NIC driver. This can make the important tasks be completed in time. >From Nan's tests in LAB, these patches can make NIC driver work steadily. Now in production hosts, these patches are applied. With these patches, one NIC port needs 125MiB reserved. This 125MiB memory can not be used by others. To a host on which the communications are not mandatory, it is not necessary to reserve so much memory. So this recv cache is disabled by default. V1->V2: 1. ndelay is replaced with GFP_KERNEL function __netdev_alloc_skb. 2. skb_queue_purge is used when recv cache is destroyed. 3. RECV_LIST_ALLOCATE bit is removed. 4. schedule_delayed_work is moved out of while loop. Zhu Yanjun (2): forcedeth: add recv cache make nic work steadily forcedeth: disable recv cache by default drivers/net/ethernet/nvidia/Kconfig | 11 +++ drivers/net/ethernet/nvidia/Makefile | 1 + drivers/net/ethernet/nvidia/forcedeth.c | 129 +++++++++++++++++++++++++++++++- 3 files changed, 139 insertions(+), 2 deletions(-) -- 2.7.4