From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by dpdk.org (Postfix) with ESMTP id 254D6156 for ; Tue, 17 Dec 2013 00:57:15 +0100 (CET) Received: by mail-pb0-f43.google.com with SMTP id rq2so6177871pbb.2 for ; Mon, 16 Dec 2013 15:58:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=pDLk+PeMsdpK7ZzAID8GkjkGyN4f+rQP4VbCWkHVBik=; b=iGhV7h5Qs7Mr8lXMUg5J66I92he9uQKYxkZ8ob+O2h1ZI3gaWGUE/w/YEXAK42verN qdhMhxpV0WIY1pDlD9qg1bGxfgb5cPYsGhIpsAnUHBhM17BTmhZJqqvivuZNLUgGljGF qDN6DFfgoHSytG1ZYMIW9pSEyMQzVtqyc5D6CA4ZFm06uh/6viCt7lVfU1ZURwo8dSy5 N/w/9Ss/WKP3b4QbiTU/Bd20gONVlLboVhhiQrmCNueUSHkVxSgF4u/QQ38mZ0gICD+U jTaq3tyuu3XIKKB7TVh0aa2Z84PEFfnBpnI6gLLtYMch/YuSP0zsWcLra3/T2mV6IJfz MXmQ== X-Gm-Message-State: ALoCoQk/CdrPYdlgnmVT2hYDGhLpK7qm4rUvm4w20SeLHjTjqW4RpR5WQpAaCLzCiUH1dB+wVCXX X-Received: by 10.68.25.229 with SMTP id f5mr23840917pbg.6.1387238301621; Mon, 16 Dec 2013 15:58:21 -0800 (PST) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ic7sm8963313pbc.29.2013.12.16.15.58.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Dec 2013 15:58:21 -0800 (PST) Date: Mon, 16 Dec 2013 15:58:18 -0800 From: Stephen Hemminger To: James Yu Message-ID: <20131216155818.5a422aa4@nehalam.linuxnetplumber.net> In-Reply-To: References: <20131213150121.3d70a0d2@nehalam.linuxnetplumber.net> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] outw() in virtio_ring_doorbell() in DPDK+virtio consume 40% of the CPU in oprofile X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2013 23:57:16 -0000 On Mon, 16 Dec 2013 15:35:27 -0800 James Yu 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.