patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: Maxime Coquelin <maxime.coquelin@redhat.com>, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH v16.11 LTS] vhost: improve dirty pages logging performance
Date: Wed, 23 May 2018 10:21:38 +0100	[thread overview]
Message-ID: <1527067298.6997.4.camel@debian.org> (raw)
In-Reply-To: <20180523075306.17611-1-maxime.coquelin@redhat.com>

On Wed, 2018-05-23 at 09:53 +0200, Maxime Coquelin wrote:
> [ upstream commit c16915b8710911a75f0fbdb1aa5243f4cdfaf26a ]
> 
> This patch caches all dirty pages logging until the used ring index
> is updated.
> 
> The goal of this optimization is to fix a performance regression
> introduced when the vhost library started to use atomic operations
> to set bits in the shared dirty log map. While the fix was valid
> as previous implementation wasn't safe against concurrent accesses,
> contention was induced.
> 
> With this patch, during migration, we have:
> 1. Less atomic operations as only a single atomic OR operation
> per 32 or 64 (depending on CPU) pages.
> 2. Less atomic operations as during a burst, the same page will
> be marked dirty only once.
> 3. Less write memory barriers.
> 
> Fixes: 897f13a1f726 ("vhost: make page logging atomic")
> Cc: stable@dpdk.org
> 
> Suggested-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
> 
> Hi,
> 
> This backport had some conflicts, mainly because the dirty pages
> logging functions moved from virtio-net.c to vhost.h after 16.11.
> 
> Main other change with upstream is the GCC_VERSION isn't defined,
> so I decided to remove the optimization done for GCC >= 7.1 as it
> is unlikely to be used with v16.11 LTS.
> 
> To test it, I had to revert 357f27736c79d as vhost is currently
> broken on 16.11 branch (see separate mail).
> 
>  lib/librte_vhost/vhost.h      |  13 +++++
>  lib/librte_vhost/virtio_net.c | 128
> +++++++++++++++++++++++++++++++++++++-----
>  2 files changed, 126 insertions(+), 15 deletions(-)

Thanks, applied and pushed to 16.11.

-- 
Kind regards,
Luca Boccassi

      reply	other threads:[~2018-05-23  9:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  7:53 Maxime Coquelin
2018-05-23  9:21 ` Luca Boccassi [this message]

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=1527067298.6997.4.camel@debian.org \
    --to=bluca@debian.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.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).