From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id 2F66A1B53 for ; Fri, 2 Mar 2018 18:28:13 +0100 (CET) Received: by mail-wr0-f182.google.com with SMTP id k9so10845703wre.9 for ; Fri, 02 Mar 2018 09:28:13 -0800 (PST) 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=/0Cy3GFlwZ/XEr/bxcdd92EuEiJ0FkAXGaNuOc18RoY=; b=SFaA9zcwS44WTJdZHSQF0yizPYhkGC1/a2O8nwuT9ApAcxVm+dMEQzS9tlT9vUT7TG cy1oJ9kxHaMQcE9q/X3kexHRGIV9mZF/xq6hUcmOD8fIUc4F/P6iBzxpgnHrI3rfqmKZ L1JxQpt+mvOMgXrEH8tmBdSU5dXjNHHCUYvsKxAdYbLhm3aGzMeWiCLCDqJ0RKfG2zn+ J55750ivwbtQyo/h0htpnD2nen+gOQcn1JtSllbtq71pHDzbW+9aBTy2yIC/wtZLqDwq 3jLTo5U3RtAWHlDq/3pijckMJDfF490O3YFsv0KXNSGBuCT3cA0rsx72X6hwKY7Bu/Ct WP5Q== X-Gm-Message-State: APf1xPAElqVkj5WzQtyZ0G1nDpfzbSf8qR5ix36hIr9wjTGNyRT2R4Uo iO23w25LeYfBA6mVWKsBP1I= X-Google-Smtp-Source: AG47ELvDCKhCmnd+B8c2XSEBRt3pKQLfZW1kUkaXc7REHQYIX3WhDGMSB4BSXHzebpUQt/Yf4WTIbQ== X-Received: by 10.223.178.206 with SMTP id g72mr5301247wrd.135.1520011692596; Fri, 02 Mar 2018 09:28:12 -0800 (PST) Received: from localhost ([2a00:23c5:be85:1400:6930:196b:56ac:33db]) by smtp.gmail.com with ESMTPSA id b45sm8188361wrb.79.2018.03.02.09.28.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Mar 2018 09:28:11 -0800 (PST) Message-ID: <1520011690.22753.86.camel@debian.org> From: Luca Boccassi To: Maxime Coquelin , stable@dpdk.org, ktraynor@redhat.com, victork@redhat.com Date: Fri, 02 Mar 2018 17:28:10 +0000 In-Reply-To: <20180302171042.26094-1-maxime.coquelin@redhat.com> References: <20180302171042.26094-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: protect active rings from async ring changes 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: Fri, 02 Mar 2018 17:28:13 -0000 On Fri, 2018-03-02 at 18:10 +0100, Maxime Coquelin wrote: > From: Victor Kaplansky >=20 > [ backported from upstream commit > a3688046995f88c518fa27c45b39ae389260b18d ] >=20 > When performing live migration or memory hot-plugging, > the changes to the device and vrings made by message handler > done independently from vring usage by PMD threads. >=20 > This causes for example segfaults during live-migration > with MQ enable, but in general virtually any request > sent by qemu changing the state of device can cause > problems. >=20 > These patches fixes all above issues by adding a spinlock > to every vring and requiring message handler to start operation > only after ensuring that all PMD threads related to the device > are out of critical section accessing the vring data. >=20 > Each vring has its own lock in order to not create contention > between PMD threads of different vrings and to prevent > performance degradation by scaling queue pair number. >=20 > See https://bugzilla.redhat.com/show_bug.cgi?id=3D1450680 >=20 > Cc: stable@dpdk.org > Signed-off-by: Victor Kaplansky > Reviewed-by: Maxime Coquelin > Acked-by: Yuanhan Liu >=20 > Backport conflicts: > lib/librte_vhost/vhost.c > lib/librte_vhost/vhost.h > lib/librte_vhost/vhost_user.c > lib/librte_vhost/virtio_net.c >=20 > Signed-off-by: Maxime Coquelin > --- >=20 > Hi Luca, All, >=20 > This is the v16.11 backport for Victor's patch already available in > master and v17.11 LTS. It needed some rework to be applied to v16.11. Thank you, applied and pushed to dpdk-stable/16.11. --=20 Kind regards, Luca Boccassi