virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* virtio Performance Analysis
@ 2013-04-30 11:36 nitesh narayan lal
  0 siblings, 0 replies; 8+ messages in thread
From: nitesh narayan lal @ 2013-04-30 11:36 UTC (permalink / raw)
  To: virtualization


[-- Attachment #1.1: Type: text/plain, Size: 936 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1077 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 8+ messages in thread

* virtio performance analysis
@ 2013-05-01  6:49 nitesh narayan lal
  0 siblings, 0 replies; 8+ messages in thread
From: nitesh narayan lal @ 2013-05-01  6:49 UTC (permalink / raw)
  To: virtualization

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* virtio performance analysis
@ 2013-05-02  3:43 nitesh narayan lal
  2013-05-06 10:19 ` Michael S. Tsirkin
  0 siblings, 1 reply; 8+ messages in thread
From: nitesh narayan lal @ 2013-05-02  3:43 UTC (permalink / raw)
  To: virtualization

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: virtio performance analysis
  2013-05-02  3:43 virtio performance analysis nitesh narayan lal
@ 2013-05-06 10:19 ` Michael S. Tsirkin
       [not found]   ` <CAAtA1-ZTU7oance7f4=eHGqAf-g+u5e+JwPHMp3iAusHgBphLQ@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael S. Tsirkin @ 2013-05-06 10:19 UTC (permalink / raw)
  To: nitesh narayan lal, agraf; +Cc: kvm, virtualization

On Thu, May 02, 2013 at 09:13:29AM +0530, nitesh narayan lal wrote:
> Hi,
> I am currently working on the virtio performance analysis in PowerPC .

That's nice.

> 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().

That's a bit heavy-handed. Why not just use ftrace?

> What I had seen is virtqueue_kick() internally it calls iowrite16()
> which will cause an exit to QEMU,

You probably should be looking at vhost-net and not
userspace virtio-net if you are interested in performance.

> 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.

Not exactly, we can buffer many events in
case guest and host are running in parallel.
See vring_need_event and its uses.

> Due to all of the above factors mentioned their will be an increase in
> signal, EXTINT and guest exits

Increase as compared to what?

>  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
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: virtio performance analysis
       [not found]   ` <CAAtA1-ZTU7oance7f4=eHGqAf-g+u5e+JwPHMp3iAusHgBphLQ@mail.gmail.com>
@ 2013-05-14  6:07     ` nitesh narayan lal
  2013-05-14  6:07       ` nitesh narayan lal
  0 siblings, 1 reply; 8+ messages in thread
From: nitesh narayan lal @ 2013-05-14  6:07 UTC (permalink / raw)
  To: Michael S. Tsirkin, virtualization

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: virtio performance analysis
  2013-05-14  6:07     ` nitesh narayan lal
@ 2013-05-14  6:07       ` nitesh narayan lal
  2013-05-14  7:53         ` Michael S. Tsirkin
  0 siblings, 1 reply; 8+ messages in thread
From: nitesh narayan lal @ 2013-05-14  6:07 UTC (permalink / raw)
  To: Michael S. Tsirkin, virtualization

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@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: virtio performance analysis
  2013-05-14  6:07       ` nitesh narayan lal
@ 2013-05-14  7:53         ` Michael S. Tsirkin
  2013-05-14 12:34           ` nitesh narayan lal
  0 siblings, 1 reply; 8+ messages in thread
From: Michael S. Tsirkin @ 2013-05-14  7:53 UTC (permalink / raw)
  To: nitesh narayan lal; +Cc: virtualization

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@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: virtio performance analysis
  2013-05-14  7:53         ` Michael S. Tsirkin
@ 2013-05-14 12:34           ` nitesh narayan lal
  0 siblings, 0 replies; 8+ messages in thread
From: nitesh narayan lal @ 2013-05-14 12:34 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: virtualization

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@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@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-14 12:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02  3:43 virtio performance analysis nitesh narayan lal
2013-05-06 10:19 ` Michael S. Tsirkin
     [not found]   ` <CAAtA1-ZTU7oance7f4=eHGqAf-g+u5e+JwPHMp3iAusHgBphLQ@mail.gmail.com>
2013-05-14  6:07     ` nitesh narayan lal
2013-05-14  6:07       ` nitesh narayan lal
2013-05-14  7:53         ` Michael S. Tsirkin
2013-05-14 12:34           ` nitesh narayan lal
  -- strict thread matches above, loose matches on Subject: below --
2013-05-01  6:49 nitesh narayan lal
2013-04-30 11:36 virtio Performance Analysis nitesh narayan lal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).