dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
To: James Yu <ypyu2011-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: outw() in virtio_ring_doorbell() in DPDK+virtio consume 40% of the CPU in oprofile
Date: Mon, 16 Dec 2013 15:58:18 -0800	[thread overview]
Message-ID: <20131216155818.5a422aa4@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAFMB=kBTzbYWvEG9qsdhU7u2Jzh_wZid4vcrenK_XX8A-eqckA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, 16 Dec 2013 15:35:27 -0800
James Yu <ypyu2011-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> (A) The packets I sent are 64-bytes, not big packet. I am not sure GSO will
> help. For bigger packet, it will help.

It will not help with small packets.

> (B) What you do mean "multiple packets per second" ? Do you mean multiple
> queue support to send/receive parallel in multiple cores to speed it up ?
> Is it supported in DPDK 1.3.1r2 ?

With some cases it is possible to get multple packets per send.
This happens if rte_tx_burst is called with more than one packet.

> (C)
> There are two places using dpdk_ring_doorbell() in virtio_user.c,
> eth_tx_burst() and virtio_alloc_rxq() which is called in virtio_recv_buf().
> I looked at them further using "top perf -C 0". It could even occupies 80%
> of the logical core 0 on a CentOS 32-bit VM. Here is the implementation of
> outw() using gcc preprocessing (-E)
> static void outw(unsigned short int value, unsigned short int __port){
>   __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (__port));
> }
> Is outw command a blocking call ?
> Based on this link http://wiki.osdev.org/Inline_Assembly/Examples, I am not
> sure it is blocked/waiting.

Out word causes a VM trap back to hypervisor. Since it is not allowed
as normally by guest, and is used to notify host. Vmware uses memory
in a similar manner as a wakeup.

  parent reply	other threads:[~2013-12-16 23:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 22:04 outw() in virtio_ring_doorbell() in DPDK+virtio consume 40% of the CPU in oprofile James Yu
     [not found] ` <CAFMB=kCmVfXNJdCBoH_g51_M0QxaQU6tevu-qDmNW-okhR_rRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-13 23:01   ` Stephen Hemminger
     [not found]     ` <20131213150121.3d70a0d2-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2013-12-16 23:35       ` James Yu
     [not found]         ` <CAFMB=kBTzbYWvEG9qsdhU7u2Jzh_wZid4vcrenK_XX8A-eqckA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-16 23:58           ` Stephen Hemminger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-13 22:02 James Yu
2013-12-13 21:59 James Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131216155818.5a422aa4@nehalam.linuxnetplumber.net \
    --to=stephen-otpzqlsittunbdjkjebofr2eb7je58tq@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=ypyu2011-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).