Hi, I am currently working on the virtio performance analysis in PowerPC . I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done() and virtqueue_kick(). What I had seen is virtqueue_kick() internally it calls iowrite16() which will cause an exit to QEMU, now either I send a packets from Guest or receive a packets to guest sart_xmit() will be called and inside start_xmit there is a call to virtqueue_kick() causing Guest exit. Also for every packet or ack sent from Guest there is an exception received while sending or receiving the next packet/ack. Due to all of the above factors mentioned their will be an increase in signal, EXTINT and guest exits and hence it will effect the CPU performance. This is what my analysis is so far, it would be great if I could get some help on this such that whether it seems appropriate or not ? Regards Nitesh Narayan Lal -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20130430/16ff029b/attachment.html>
Hi, I am currently working on the virtio performance analysis in PowerPC . I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done( ) and virtqueue_kick(). What I had seen is virtqueue_kick() internally it calls iowrite16() which will cause an exit to QEMU, now either I send a packets from Guest or receive a packets to guest sart_xmit() will be called and inside start_xmit there is a call to virtqueue_kick() causing Guest exit. Also for every packet or ack sent from Guest there is an exception received while sending or receiving the next packet/ack. Due to all of the above factors mentioned their will be an increase in signal, EXTINT and guest exits and hence it will effect the CPU performance. This is what my analysis is so far, it would be great if I could get some help on this such that whether it seems appropriate or not ? Regards Nitesh Narayan Lal
Hi, I am currently working on the virtio performance analysis in PowerPC . I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done( ) and virtqueue_kick(). What I had seen is virtqueue_kick() internally it calls iowrite16() which will cause an exit to QEMU, now either I send a packets from Guest or receive a packets to guest sart_xmit() will be called and inside start_xmit there is a call to virtqueue_kick() causing Guest exit. Also for every packet or ack sent from Guest there is an exception received while sending or receiving the next packet/ack. Due to all of the above factors mentioned their will be an increase in signal, EXTINT and guest exits and hence it will effect the CPU performance. This is what my analysis is so far, it would be great if I could get some help on this such that whether it seems appropriate or not ? Regards Nitesh Narayan Lal
Hi Michael, I had seen the virtqueue_kick_prepare() where vring_need_event() is been used, but somehow for every start_xmit() call vq->event and need_kick is been set to true. Due to which for every start_xmit() its kicking via notify() routine. Regards Nitesh Narayan Lal
I was wondering how exactly vq->event is been set and used? Regards Nitesh Narayan Lal On Tue, May 14, 2013 at 11:37 AM, nitesh narayan lal <niteshnarayanlalleo at gmail.com> wrote:> Hi Michael, > I had seen the virtqueue_kick_prepare() where vring_need_event() is > been used, but somehow for every start_xmit() call vq->event and > need_kick is been set to true. > Due to which for every start_xmit() its kicking via notify() routine. > Regards > Nitesh Narayan Lal
On Tue, May 14, 2013 at 11:37:35AM +0530, nitesh narayan lal wrote:> I was wondering how exactly vq->event is been set and used? > Regards > Nitesh Narayan Lal > > > On Tue, May 14, 2013 at 11:37 AM, nitesh narayan lal > <niteshnarayanlalleo at gmail.com> wrote: > > Hi Michael, > > I had seen the virtqueue_kick_prepare() where vring_need_event() is > > been used, but somehow for every start_xmit() call vq->event and > > need_kick is been set to true. > > Due to which for every start_xmit() its kicking via notify() routine. > > Regards > > Nitesh Narayan Lalvq->event if set when guest and host agree to use event index. needs_kick comes from comparison of event index (element for which host requested an event) and avail index. We trigger the event when we make available the element for which host requested notification. More detail in the virtio spec. -- MST
I was going through the documentation and I had found that avail_event is used to set the threshold value after which notification will be sent. If the kick is required or not will be decide on the basis of the following condition every time: (u16)(new_idx - avail_event - 1) < (u16)(new_idx - old_idx) Right now due to avail_event value the kick is been made for every start_xmit call, I wanted to know, how could I modify the avail_event value . So that the kicks are not made for each start_xmit() call. Regards Nitesh Narayan Lal On Tue, May 14, 2013 at 1:23 PM, Michael S. Tsirkin <mst at redhat.com> wrote:> On Tue, May 14, 2013 at 11:37:35AM +0530, nitesh narayan lal wrote: >> I was wondering how exactly vq->event is been set and used? >> Regards >> Nitesh Narayan Lal >> >> >> On Tue, May 14, 2013 at 11:37 AM, nitesh narayan lal >> <niteshnarayanlalleo at gmail.com> wrote: >> > Hi Michael, >> > I had seen the virtqueue_kick_prepare() where vring_need_event() is >> > been used, but somehow for every start_xmit() call vq->event and >> > need_kick is been set to true. >> > Due to which for every start_xmit() its kicking via notify() routine. >> > Regards >> > Nitesh Narayan Lal > > > vq->event if set when guest and host agree to use event index. > needs_kick comes from comparison of event index (element for > which host requested an event) and avail index. > > We trigger the event when we make available the element > for which host requested notification. > > More detail in the virtio spec. > > -- > MST