Re: qemu/vhost tx data path

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

 



On Fri, Jun 10, 2016 at 12:11:58PM -0700, Ritun Patney wrote:
> I am studying the network performance between a pair of KVM workloads
> on different hosts. I have been looking into the RX, TX data path when
> a vhost-net driver is involved.
> 
> I am intrigued why does a packet transmission from a guest run
> entirely in the context of the vhost thread. From what I could gather
> from the source, the vhost driver seems to write packets to the tap
> device using sendmsg. The tap device seems to enqueue it for napi to
> take over. I would have assumed that after sending the packet over the
> tap device, a softirq would have taken over but that doesn't happen.
> 
> I am wondering how it that the entire packet is processed in the vhost
> kernel thread's context and would appreciate help!

The way I read the drivers/net/tun.c code the local softirq processing
happens immediately in netif_rx_ni().  So progress should be made
immediately during ->sendmsg() rather than just marking the softirq
pending and returning back to vhost_net.ko.

Stefan

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux