patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yliu@fridaylinux.org>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Jianfeng Tan <jianfeng.tan@intel.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' has been queued to LTS release 17.11.2
Date: Sun, 6 May 2018 11:51:23 +0800	[thread overview]
Message-ID: <20180506035123.nl52slupnjm4ufz4@yuanhanliu-NB0.tencent.com> (raw)
In-Reply-To: <6d78c0cd-08b1-2b57-ad96-b0b7a0d7063b@redhat.com>

On Mon, Apr 23, 2018 at 11:03:22AM +0200, Maxime Coquelin wrote:
> Hi Yuanhan,
> 
> On 04/22/2018 05:09 PM, Yuanhan Liu wrote:
> > Hi,
> > 
> > FYI, your patch has been queued to LTS release 17.11.2
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 04/29/18. So please
> > shout if anyone has objections.
> 
> Please don't pick this patch, it cause a regression with multiqueue,
> I posted a revert of the patch on list last week.

Hi Maxime,

Thank you for letting me know. I have now dropped it.

	--yliu
> 
> I'm working on an alternative solution, but while it is ready, better to
> keep performance penalty from initial patch.
> 
> 
> Thanks,
> Maxime
> > Thanks.
> > 
> > 	--yliu
> > 
> > ---
> >  From acdf634b3533a5ccb1528ee546ac9dcfb57b8a36 Mon Sep 17 00:00:00 2001
> > From: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Date: Wed, 21 Mar 2018 16:44:13 +0100
> > Subject: [PATCH] vhost: avoid concurrency when logging dirty pages
> > 
> > [ upstream commit 394313fff39d0f994325c47f7eab39daf5dc9e11 ]
> > 
> > This patch aims at fixing a migration performance regression
> > faced since atomic operation is used to log pages as dirty when
> > doing live migration.
> > 
> > Instead of setting a single bit by doing an atomic read-modify-write
> > operation to log a page as dirty, this patch write 0xFF to the
> > corresponding byte, and so logs 8 page as dirty.
> > 
> > The advantage is that it avoids concurrent atomic operations by
> > multiple PMD threads, the drawback is that some clean pages are
> > marked as dirty and so are transferred twice.
> > 
> > Fixes: 897f13a1f726 ("vhost: make page logging atomic")
> > 
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
> > ---
> >   lib/librte_vhost/vhost.h | 12 ++++--------
> >   1 file changed, 4 insertions(+), 8 deletions(-)
> > 
> > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> > index c8f2a8176..5c488fa57 100644
> > --- a/lib/librte_vhost/vhost.h
> > +++ b/lib/librte_vhost/vhost.h
> > @@ -261,18 +261,14 @@ struct virtio_net {
> >   #define VHOST_LOG_PAGE	4096
> >   /*
> > - * Atomically set a bit in memory.
> > + * Mark all pages belonging to the same dirty log bitmap byte
> > + * as dirty. The goal is to avoid concurrency between different
> > + * threads doing atomic read-modify-writes on the same byte.
> >    */
> >   static __rte_always_inline void
> > -vhost_set_bit(unsigned int nr, volatile uint8_t *addr)
> > -{
> > -	__sync_fetch_and_or_8(addr, (1U << nr));
> > -}
> > -
> > -static __rte_always_inline void
> >   vhost_log_page(uint8_t *log_base, uint64_t page)
> >   {
> > -	vhost_set_bit(page % 8, &log_base[page / 8]);
> > +	log_base[page / 8] = 0xff;
> >   }
> >   static __rte_always_inline void
> > 

  reply	other threads:[~2018-05-06  3:51 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'pci: remove duplicated symbol from map file' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'bus/vdev: fix finding device by name' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'examples/exception_path: limit core count to 64' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix message payload union in setting ring address' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix offset while mmaping log base " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: check cmsg not null' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix device cleanup at stop' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix realloc failure' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix ring index returned to master on stop' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: add missing defines for SAL annotation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix primary slave port id storage type' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix null pointer dereference' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized variable in port open' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix assigning port id in mbuf' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix barrier location' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix link speed capabilities' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'doc: fix NFP NIC guide grammar' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/qede: fix alloc from socket 0' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: allocate stats DMA buffer upfront during probe' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix link update no wait' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vmxnet3: set the queue shared buffer at start' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix crash when port is closed without starting' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix Rx descriptors number' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mlx5: fix existing file removal' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix LRO disable' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix mbuf data alignment calculation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix queue start' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix type of opaque pointer in perf profile handler' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix port accessing after release' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' " Yuanhan Liu
2018-04-23  9:03   ` Maxime Coquelin
2018-05-06  3:51     ` Yuanhan Liu [this message]
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix crash when creating vdev dynamically' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'bus/fslmc: fix find device start condition' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'hash: fix missing spinlock unlock in add key' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'app/crypto-perf: fix IOVA translation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'mem: do not use physical addresses in IOVA as VA mode' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vfio: do not needlessly check for IOVA " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa: fix oob access' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'bus/dpaa: fix resource leak' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa2: fix xstats' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ip_frag: fix double free of chained mbufs' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized speed variable' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: clear started state if start fails' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix total stats' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: fix crash on MTU update with non-setup queues' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: fix busy wait during checking link status' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'doc: add timestamp offload to mlx5 features' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix Rx drop setting' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc/base: fix comparison always true warning' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix DDP profile DEL operation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix invalid state' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: free mempool used in mode 6' " Yuanhan Liu

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=20180506035123.nl52slupnjm4ufz4@yuanhanliu-NB0.tencent.com \
    --to=yliu@fridaylinux.org \
    --cc=jianfeng.tan@intel.com \
    --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).