[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-13 Thread Yang, Zhiyong
dpdk.org; qemu- > devel at nongnu.org > Subject: Re: [dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout > feature > > On Tue, Oct 11, 2016 at 02:57:49PM +0800, Yuanhan Liu wrote: > > > > > > > There was an example: the vhost enqueue optmization

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-12 Thread Yuanhan Liu
On Tue, Oct 11, 2016 at 02:57:49PM +0800, Yuanhan Liu wrote: > > > > > > There was an example: the vhost enqueue optmization patchset from > > > > > > Zhihong [0] uses memset, and it introduces more than 15% drop (IIRC) Though it doesn't matter now, but I have verified it yesterday (with and wihto

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-11 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 07:39:59AM +0300, Michael S. Tsirkin wrote: > > > > > > 1. why is this memset expensive? > > > > > > > > > > I don't have the exact answer, but just some rough thoughts: > > > > > > > > > > It's an external clib function: there is a call stack and the > > > > > IP register w

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-11 Thread Yuanhan Liu
On Tue, Oct 11, 2016 at 08:39:54AM +0200, Maxime Coquelin wrote: > > > On 10/11/2016 08:04 AM, Yuanhan Liu wrote: > >On Mon, Oct 10, 2016 at 04:54:39PM +0200, Maxime Coquelin wrote: > >> > >> > >>On 10/10/2016 04:42 PM, Yuanhan Liu wrote: > >>>On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coqu

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-11 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 04:54:39PM +0200, Maxime Coquelin wrote: > > > On 10/10/2016 04:42 PM, Yuanhan Liu wrote: > >On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: > >At that time, a packet always use 2 descs. Since indirect desc is > >enabled (by default) now, the assum

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-11 Thread Maxime Coquelin
On 10/11/2016 08:04 AM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 04:54:39PM +0200, Maxime Coquelin wrote: >> >> >> On 10/10/2016 04:42 PM, Yuanhan Liu wrote: >>> On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: >>> At that time, a packet always use 2 descs. Since indirect

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: > >>>At that time, a packet always use 2 descs. Since indirect desc is > >>>enabled (by default) now, the assumption is not true then. What's > >>>worse, it might even slow things a bit down. That should also be > >>>part of the reaso

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Maxime Coquelin
On 10/10/2016 04:42 PM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: > At that time, a packet always use 2 descs. Since indirect desc is > enabled (by default) now, the assumption is not true then. What's > worse, it might even slow things a bi

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Maxime Coquelin
On 10/10/2016 06:22 AM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: >> On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: >>> On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: >> And the same is done is done in DPDK: >>>

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: > On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > > And the same is done is done in DPDK: > > > > > > > > > > static inline int __attribu

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > And the same is done is done in DPDK: > > > > > > static inline int __attribute__((always_inline)) > > > copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs, > > > uint16_t max_desc, struct rte_mbuf

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 06:46:44AM +0300, Michael S. Tsirkin wrote: > On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote: > > On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > > > >

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > >so doing this unconditionally would be a spec violation, but if you see > >value in this, we can add a feature bit. > Right it would be a spec violation, so it should be done conditionally. > If a feature bit is to be added, what a

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Yuanhan Liu
On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > Yes but two points. > > 1. why is this memset expensive? I don't have the exact answer, but just

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Coquelin ; Stephen Hemminger > > ; dev at dpdk.org

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:22:09PM +0800, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: > > On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > > > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > > > And the same is d

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Coquelin ; Stephen Hemminger > > ; dev at dpdk.org

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > And the same is done is done in DPDK: > > > > > > > > static inline int __attribute__((always_inline)) > > > > copy_desc_to_mbuf(struct virtio_net *dev, struct

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote: > On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > > Yes but two points. > >

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Wang, Zhihong
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, October 10, 2016 11:59 AM > To: Michael S. Tsirkin > Cc: Maxime Coquelin ; Stephen Hemminger > ; dev at dpdk.org; qemu- > devel at nongnu.org; Wang, Zhihong > Subject: Re: [Qemu-devel] [PATC

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-03 Thread Maxime Coquelin
On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: >> > >> > >> > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: >>> > > On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: >> > ... > > > > > > Before enab

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-30 Thread Michael S. Tsirkin
On Fri, Sep 30, 2016 at 02:05:10PM +0200, Maxime Coquelin wrote: > > > On 09/29/2016 11:23 PM, Maxime Coquelin wrote: > > > > > > On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: > > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > > > > On 09/29/2016 07:5

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-30 Thread Maxime Coquelin
On 09/29/2016 11:23 PM, Maxime Coquelin wrote: > > > On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: >> On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: >>> >>> >>> On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin w

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-29 Thread Maxime Coquelin
On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: >> >> >> On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: >>> On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: >> ... Before enabling anything by default

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-29 Thread Michael S. Tsirkin
On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: > ... > > > > > > Before enabling anything by default, we should first optimize the 1 slot > > > case. Ind

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-29 Thread Maxime Coquelin
On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: ... >> >> Before enabling anything by default, we should first optimize the 1 slot >> case. Indeed, micro-benchmark using testpmd in txonly[0] shows ~17% >> perf regression for 64

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-29 Thread Michael S. Tsirkin
On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: > > > On 09/28/2016 04:28 AM, Yuanhan Liu wrote: > > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > > > On Tue, Sep 27, 2016 at 11:11:58AM +0800, Yuanhan Liu wrote: > > > > On Mon, Sep 26, 2016 at 10:24:55PM +

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-29 Thread Maxime Coquelin
On 09/28/2016 04:28 AM, Yuanhan Liu wrote: > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: >> On Tue, Sep 27, 2016 at 11:11:58AM +0800, Yuanhan Liu wrote: >>> On Mon, Sep 26, 2016 at 10:24:55PM +0300, Michael S. Tsirkin wrote: On Mon, Sep 26, 2016 at 11:01:58AM -0700, S