kvm-guest-drivers-windows icon indicating copy to clipboard operation
kvm-guest-drivers-windows copied to clipboard

may netkvm driver support interrupte-moderation?

Open zjmletang opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe. In some scenarios where traffic bursts, there will be packet loss

Describe the solution you'd like On the one hand, we can increase the ring size solution, and on the other hand, we can also solve it by supporting the interrupt adjudication rate.

the m_nReusedRxBuffersLimit is fixed when the netmaxReceiveBuffers is fixed. I suggest the m_nReusedRxBuffersLimit can be adjusted by user. (not fixed divided by 4,but can be adjusted like the concept of interrupte adjudication rate)

//the code now m_nReusedRxBuffersLimit = m_Context->NetMaxReceiveBuffers / 4 + 1;

if (++m_nReusedRxBuffersCounter >= m_nReusedRxBuffersLimit) { DPrintf(0, " Error: m_nReusedRxBuffersCounter >= m_nReusedRxBuffersLimit [%d] [%d]\n", m_nReusedRxBuffersCounter, m_nReusedRxBuffersLimit); m_nReusedRxBuffersCounter = 0; m_VirtQueue.Kick(); }

Describe alternatives you've considered [A clear and concise description of any alternative solutions or features you've considered.]

may refer to https://learn.microsoft.com/en-us/windows-hardware/drivers/network/interrupt-moderation

Additional context Add any other context or screenshots about the feature request here.

zjmletang avatar Mar 09 '23 09:03 zjmletang

Hi @zjmletang, Thank you for reporting. Let me take a look at this.

Thanks, Yan.

YanVugenfirer avatar Mar 12 '23 14:03 YanVugenfirer

Hi @zjmletang ,

  1. Do you have the statistics on when the kick in ReuseReceiveBufferNoLock works for the case of lost packets?
  2. What about NumberOfHandledRXPacketsInDPC, does it play a role in your use case?
  3. If you want to add the patch for the limit, you are welcomed.

YanVugenfirer avatar Mar 19 '23 12:03 YanVugenfirer

Also, is VIRTIO_RING_F_EVENT_IDX enabled on the host side for you?

YanVugenfirer avatar Mar 19 '23 13:03 YanVugenfirer

What is the ring size of RX queue in your case?

ybendito avatar Dec 14 '23 21:12 ybendito

What is the ring size of RX queue in your case?

@ybendito 256. But it might be changed to 4096 in the future.

zjmletang avatar Dec 15 '23 08:12 zjmletang

Hi @zjmletang ,

  1. Do you have the statistics on when the kick in ReuseReceiveBufferNoLock works for the case of lost packets?
  2. What about NumberOfHandledRXPacketsInDPC, does it play a role in your use case?
  3. If you want to add the patch for the limit, you are welcomed.

@YanVugenfirer ,I believe I need to find some environments to verify this, but I haven't had the time to do so recently. I will respond to you after I have conducted the verification.

zjmletang avatar Dec 15 '23 08:12 zjmletang