From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id AC68CDE3 for ; Wed, 23 May 2018 11:21:41 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id a67-v6so6954938wmf.3 for ; Wed, 23 May 2018 02:21:41 -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:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=jbXLy4Jko1tF60hMwMz3BR2+vaqudF2GDsaQrHnlUoo=; b=NcXvTFq3gkoaeb7XvJRBWSax0PXK7UrrkVKPt1jQtWvXPXfsiZDqiW6fTk+PtOTA3s 82vCypZvbqobXOud9YYHbYHAkcoQe2aXMX7QIaAEefrprQLmyQcFFHV342F6S2bvRhxO MhmLy/HK5qZreVWA/vkg4+ym7t8xI1GIA0KPBbac1IPfUt0g0FYLjFlGjugTYoU8XgMp 7RX2Ge59ppyxlkbuPUHKkKz7EkZulxmU+a0vidz3Df1I5bSsjiKzmVIlKRjS4BliMLbb caN6L5u34Q7djqnKV0W9MU114bymttAG3c1tmyGt3j9zyd0EFGWP7Uh6ztZqQttbuJ58 SQ2A== X-Gm-Message-State: ALKqPwdQg2XLhUAQdIjK2O3o/LC23dWs0aW26Dz5b7QOVJRITWdm/Rxa o7Xag8bysONgtzNwg2b1qupI9BOy X-Google-Smtp-Source: AB8JxZosF0ztWTG8H7MEh3+MQEOehvzNm2cA1805jq6BHVyg5E41edMjsck140wajFPLYMP42BubyA== X-Received: by 2002:a1c:6443:: with SMTP id y64-v6mr3419116wmb.108.1527067301307; Wed, 23 May 2018 02:21:41 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id i12-v6sm4936453wrn.55.2018.05.23.02.21.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 02:21:40 -0700 (PDT) Message-ID: <1527067298.6997.4.camel@debian.org> From: Luca Boccassi To: Maxime Coquelin , stable@dpdk.org Date: Wed, 23 May 2018 10:21:38 +0100 In-Reply-To: <20180523075306.17611-1-maxime.coquelin@redhat.com> References: <20180523075306.17611-1-maxime.coquelin@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 v16.11 LTS] vhost: improve dirty pages logging performance 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: Wed, 23 May 2018 09:21:41 -0000 On Wed, 2018-05-23 at 09:53 +0200, Maxime Coquelin wrote: > [ upstream commit c16915b8710911a75f0fbdb1aa5243f4cdfaf26a ] >=20 > This patch caches all dirty pages logging until the used ring index > is updated. >=20 > 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. >=20 > 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. >=20 > Fixes: 897f13a1f726 ("vhost: make page logging atomic") > Cc: stable@dpdk.org >=20 > Suggested-by: Michael S. Tsirkin > Signed-off-by: Maxime Coquelin > Reviewed-by: Tiwei Bie > --- >=20 > Hi, >=20 > This backport had some conflicts, mainly because the dirty pages > logging functions moved from virtio-net.c to vhost.h after 16.11. >=20 > Main other change with upstream is the GCC_VERSION isn't defined, > so I decided to remove the optimization done for GCC >=3D 7.1 as it > is unlikely to be used with v16.11 LTS. >=20 > To test it, I had to revert 357f27736c79d as vhost is currently > broken on 16.11 branch (see separate mail). >=20 > =C2=A0lib/librte_vhost/vhost.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0= =C2=A013 +++++ > =C2=A0lib/librte_vhost/virtio_net.c | 128 > +++++++++++++++++++++++++++++++++++++----- > =C2=A02 files changed, 126 insertions(+), 15 deletions(-) Thanks, applied and pushed to 16.11. --=20 Kind regards, Luca Boccassi