From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jianbo.liu@linaro.org>
Received: from mail-yb0-f179.google.com (mail-yb0-f179.google.com
 [209.85.213.179]) by dpdk.org (Postfix) with ESMTP id CB29329CF
 for <dev@dpdk.org>; Mon, 26 Sep 2016 07:12:47 +0200 (CEST)
Received: by mail-yb0-f179.google.com with SMTP id i83so7047285ybi.3
 for <dev@dpdk.org>; Sun, 25 Sep 2016 22:12:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=GY35vXD72rNdU2oOESRCWXml6oU+Lm+kpzg09bneh6c=;
 b=IK8gu9nyyIeQljrmLCqmeLBa4NSR5N+97h4XChNSx/f2eW5b7TtigICq7W1f0X8Jdc
 DsA9dL7N5dKo4Hghi6F4Rh4I3dFE6A3eyRn7GzIarWr9PePbte3CfBKeESstLjzxJ5N0
 9vgIb4D35nMsRw1yxHId6jN72nMMx47oLs6J8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=GY35vXD72rNdU2oOESRCWXml6oU+Lm+kpzg09bneh6c=;
 b=khQ55t0LJLSrYVTS0W9pxoa/o/QHsKKbUC3R1TFUMVao+xMd4do/x7db2dARmR2BYk
 qF4MNBdk5O4qyvHOFHgWAlqBgoNLFc9C9WOJ5u0hHqNf9a0lWkT2+23nelX/ofl52co1
 WZUGrvI6HzLq0WqQD7LkoqgG0JRnwVlk9aWYP1B8+qChGJSLoG/bxYNnKm+bd4bCibBk
 SZ3QEqBCK1o/ijxooWAn11D2fCfSXu7/dMGNqXsIuX7xs7k23rIVwQX3aiLFGZvHoqEa
 qAxpZJeQBS82OCPOjQrs4HLDoMDXYTkyFXb1j0r1BkV+K+KO4If0a4Hs+bsaVt/utZmQ
 oLOA==
X-Gm-Message-State: AE9vXwPKseaVREuKJxqkMyxYe0fAsuBNnq/Vw9MZDOLcMEXxyyBucCAmaV/sOjmv8HWna4sXTiJqGQXnTJTPAmxe
X-Received: by 10.37.174.137 with SMTP id b9mr15955215ybj.126.1474866767221;
 Sun, 25 Sep 2016 22:12:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.37.25.6 with HTTP; Sun, 25 Sep 2016 22:12:46 -0700 (PDT)
In-Reply-To: <8F6C2BD409508844A0EFC19955BE09414E7B6EA6@SHSMSX103.ccr.corp.intel.com>
References: <1471319402-112998-1-git-send-email-zhihong.wang@intel.com>
 <8F6C2BD409508844A0EFC19955BE09414E7B6204@SHSMSX103.ccr.corp.intel.com>
 <CAP4Qi3_DxAnvs0jX1P=G_PiLnRRbP5Wty-eU-OPE_81RGCAuTA@mail.gmail.com>
 <1536480.IYe8r5XoNN@xps13>
 <8F6C2BD409508844A0EFC19955BE09414E7B6EA6@SHSMSX103.ccr.corp.intel.com>
From: Jianbo Liu <jianbo.liu@linaro.org>
Date: Mon, 26 Sep 2016 13:12:46 +0800
Message-ID: <CAP4Qi39FfeA_B1-5D-5wzXK_S2wJXGUHp9S+w2Z_BtoedAfrfQ@mail.gmail.com>
To: "Wang, Zhihong" <zhihong.wang@intel.com>
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>,
 Yuanhan Liu <yuanhan.liu@linux.intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>
Content-Type: text/plain; charset=UTF-8
Subject: Re: [dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Sep 2016 05:12:48 -0000

On 25 September 2016 at 13:41, Wang, Zhihong <zhihong.wang@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
>> Sent: Friday, September 23, 2016 9:41 PM
>> To: Jianbo Liu <jianbo.liu@linaro.org>
>> Cc: dev@dpdk.org; Wang, Zhihong <zhihong.wang@intel.com>; Yuanhan Liu
>> <yuanhan.liu@linux.intel.com>; Maxime Coquelin
>> <maxime.coquelin@redhat.com>
....
> This patch does help in ARM for small packets like 64B sized ones,
> this actually proves the similarity between x86 and ARM in terms
> of caching optimization in this patch.
>
> My estimation is based on:
>
>  1. The last patch are for mrg_rxbuf=on, and since you said it helps
>     perf, we can ignore it for now when we discuss mrg_rxbuf=off
>
>  2. Vhost enqueue perf =
>     Ring overhead + Virtio header overhead + Data memcpy overhead
>
>  3. This patch helps small packets traffic, which means it helps
>     ring + virtio header operations
>
>  4. So, when you say perf drop when packet size larger than 512B,
>     this is most likely caused by memcpy in ARM not working well
>     with this patch
>
> I'm not saying glibc's memcpy is not good enough, it's just that
> this is a rather special use case. And since we see specialized
> memcpy + this patch give better performance than other combinations
> significantly on x86, we suggest to hand-craft a specialized memcpy
> for it.
>
> Of course on ARM this is still just my speculation, and we need to
> either prove it or find the actual root cause.
>
> It can be **REALLY HELPFUL** if you could help to test this patch on
> ARM for mrg_rxbuf=on cases to see if this patch is in fact helpful
> to ARM at all, since mrg_rxbuf=on the more widely used cases.
>
Actually it's worse than mrg_rxbuf=off.