[dpdk-dev] [PATCH] vhost: avoid concurrency when logging dirty pages

Maxime Coquelin maxime.coquelin at redhat.com
Fri Mar 30 09:42:39 CEST 2018



On 03/21/2018 04:44 PM, Maxime Coquelin wrote:
> 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")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>   lib/librte_vhost/vhost.h | 12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)

Applied to dpdk-next-virtio/master.


More information about the dev mailing list