From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id D3E2CE5D for ; Mon, 30 Apr 2018 16:56:37 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id a67so6088130wmf.3 for ; Mon, 30 Apr 2018 07:56:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=DJVNKSdFlr3gJ+I280Ss0RWCZGVBpLPBnIdfwYp7wg0=; b=SS60799skx0cyp48bXAyhzlB2htIhGD25QlCb7o9wD1Pbfb4nMIpO9PRudjm+oIKIZ /p78yxpihcoUykXJmYp9ZOYxn22koK5d956cSXbymqPxN8X66eTT0ZfAKNnF7BXlxk/q ut9A1ytT/D2EB5EGSh0+hojadML1qYmoqYw0EUhKxLxpd/tsJ9XWbBu+U4QShUh6Xpsv rlTAtTn6fdby09PSc7UtUge75zJnv7kYY+LAIVF75Tq7Oo96i6sf4Seuo8ZpmjsliDjc NoNj0xOYE8du15VvWixz0t8gp7CKMu70ov7cgC3hIC8xiwoThq3nl2Vo7GaQlUK/7uqK fDwA== X-Gm-Message-State: ALQs6tAQsYoQgVzREQkGmk24LL17cN9bL2w3uSJAO0tBSbE8GR2zic6p mW1RvIyyw16KMxHuwMZNpk0= X-Google-Smtp-Source: AB8JxZr8n26W0ZX+e/pAWIilFIw1K/3Z6I2Ko1fZK3NqefM7jb0WqJz15zPEJ1kUW4zn0avsUy6CCQ== X-Received: by 10.28.15.195 with SMTP id 186mr8276442wmp.113.1525100197539; Mon, 30 Apr 2018 07:56:37 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id b123sm3296328wme.22.2018.04.30.07.56.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:56:36 -0700 (PDT) Message-ID: <1525100196.23337.22.camel@debian.org> From: Luca Boccassi To: Maxime Coquelin Cc: Jianfeng Tan , dpdk stable Date: Mon, 30 Apr 2018 15:56:36 +0100 In-Reply-To: <242bac38-06ff-490a-df4a-f5734179ded6@redhat.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> <20180430144223.18657-5-luca.boccassi@gmail.com> <242bac38-06ff-490a-df4a-f5734179ded6@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:56:38 -0000 On Mon, 2018-04-30 at 16:44 +0200, Maxime Coquelin wrote: > Hi Luca, >=20 > Please don't backport this patch to -stable releases. > It has already been reverted in upstream master, and a new patch is > to > be posted in the coming hours. >=20 > I already notified Yuanhan for the same for v17.11 LTS. >=20 > Thanks, > Maxime Ok, removed, thanks for the heads-up. > On 04/30/2018 04:40 PM, luca.boccassi@gmail.com wrote: > > Hi, > >=20 > > FYI, your patch has been queued to stable release 18.02.2 > >=20 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable > > yet. > > It will be pushed if I get no objections before 05/02/18. So please > > shout if anyone has objections. > >=20 > > Thanks. > >=20 > > Luca Boccassi > >=20 > > --- > > =C2=A0From a5d642c446cc3a3be41694715d99f3e9f9ea44df Mon Sep 17 00:00:00 > > 2001 > > From: Maxime Coquelin > > Date: Wed, 21 Mar 2018 16:44:13 +0100 > > Subject: [PATCH] vhost: avoid concurrency when logging dirty pages > >=20 > > [ upstream commit 394313fff39d0f994325c47f7eab39daf5dc9e11 ] > >=20 > > This patch aims at fixing a migration performance regression > > faced since atomic operation is used to log pages as dirty when > > doing live migration. > >=20 > > 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. > >=20 > > 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. > >=20 > > Fixes: 897f13a1f726 ("vhost: make page logging atomic") > >=20 > > Signed-off-by: Maxime Coquelin > > Reviewed-by: Jianfeng Tan > > --- > > =C2=A0 lib/librte_vhost/vhost.h | 12 ++++-------- > > =C2=A0 1 file changed, 4 insertions(+), 8 deletions(-) > >=20 > > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h > > index bab0b456e..a4f23f714 100644 > > --- a/lib/librte_vhost/vhost.h > > +++ b/lib/librte_vhost/vhost.h > > @@ -247,18 +247,14 @@ struct virtio_net { > > =C2=A0 #define VHOST_LOG_PAGE 4096 > > =C2=A0=C2=A0 > > =C2=A0 /* > > - * 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. > > =C2=A0=C2=A0=C2=A0*/ > > -static __rte_always_inline void > > -vhost_set_bit(unsigned int nr, volatile uint8_t *addr) > > -{ > > - __sync_fetch_and_or_8(addr, (1U << nr)); > > -} > > - > > =C2=A0 static __rte_always_inline void > > =C2=A0 vhost_log_page(uint8_t *log_base, uint64_t page) > > =C2=A0 { > > - vhost_set_bit(page % 8, &log_base[page / 8]); > > + log_base[page / 8] =3D 0xff; > > =C2=A0 } > > =C2=A0=C2=A0 > > =C2=A0 static __rte_always_inline void > >=20 --=20 Kind regards, Luca Boccassi