[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/7] xen/evtch: use smp barriers for user event ring


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 8 Feb 2021 10:23:02 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4jEKH8PX/ONb1EVKOuyR6l6EL4AdOivu1ZjE6u1YryU=; b=Tf7UGgbXZXd/G52ttsWPKl4fwvUG1s8lO4aWfq14WLnd5hZZfgFPjwRe9qdFhzS6EjkudPmeSx79jWRL7mpKhXmJLGxUXhQ/XYj7rPqFR/DH1pJFpl4THjzQwfhLj9TZzBTlhVBD4u18JlvLjlua9xY5mxA9llcrI2JNOFTdPsmhBqKjEQAaE+jx3olUAxVMwBO6gYNq+xWlOBp/48j6ZtM5WwtKjX9/gn9qSAm8oTkAExHFohD20nMyZLTFxI4h9DnpQxybBJ1b8X5RFh73sWpFKw65iEa4qD/qqqgg3ao1YblJuZP943umdeFbcTNRkIlL+s/p5Apbg6w8hhJVew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+qaZxtdKsFlFU5uTAjyUnLbFZM69CjskEiNGjCn36GZcpNbu+8pdnhRz1yNoibVT4cQTTKpimTMS/l6DPwTyjKqcusIz+Y38U2p7A1k4scVLOYEbjzwJbXeecNMt4uE0iH+q6xfRqpYiyA8gGHcKip9IyAlrVQuiIXw437iJnNRdUoxIxi56LsG47+EKC2s1SMHQRNKzyOX4BX7iJyVvlS9HffpBKa5Hlk3qHsDPQxFSu8R53xsAz1+XtN6RMAPIuJtctXlqGOlpLTWIlfWD2+2W9OvArcQ4bJe6ooCNHfNmK/36nyydEz80HUDWXWSWxuJ1Q1DIGceWpI8UQIsIw==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 08 Feb 2021 10:23:16 +0000
  • Ironport-sdr: vb8cVxuP5RB4sCqF/4CwEu/J3PK3WDMh9MFw62YblUyjsjYlMcoBh5r2h1M4Zh/ufLscsfqUXJ lV60z1m4FjpgKmUGSaqttXn9WJMO+9HKRdh4saQi9EauYIWQaITZFP2GTqjW/iw3GFdRpyVwa/ +o+WxNLj19tqntFfZnh4Eo/V7sdHMvcpQNGwq3cFHmgtjBHUPkTDD85OwN6TKXxLPbvahOqhzy +MjGE/3u3dkGjWGIRfyZ/9D6BLB/V5RXerC1XJIKodKi/08h0Sr5HdLuPSdNFSFX196CFTZ4r1 4jI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08/02/2021 09:50, Jan Beulich wrote:
> On 08.02.2021 10:44, Andrew Cooper wrote:
>> On 06/02/2021 10:49, Juergen Gross wrote:
>>> The ring buffer for user events is used in the local system only, so
>>> smp barriers are fine for ensuring consistency.
>>>
>>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>> These need to be virt_* to not break in UP builds (on non-x86).
> Initially I though so, too, but isn't the sole vCPU of such a
> VM getting re-scheduled to a different pCPU in the hypervisor
> an implied barrier anyway?

Yes, but that isn't relevant to why UP builds break.

smp_*() degrade to compiler barriers in UP builds, and while that's
mostly fine for x86 read/write, its not fine for ARM barriers.

virt_*() exist specifically to be smp_*() which don't degrade to broken
in UP builds.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.