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

Re: [PATCH v2] vpci: introduce per-domain lock to protect vpci structure


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Tue, 15 Feb 2022 16:28:01 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VgZOaJt+FH67mQt3LsTqeHmCsVVjuzwlxt8mtpFdPQ4=; b=nGCkEWwqcRvRijvqher5pvMNojryGc99hZNtWAwGVocuv3eHuakr0atTYL3S85PdmXJ0IGN0Q6ZZYx0tPMkNlAjweQUR48WAQb1xOdE9SyR+r91CyMVDIoV5u+WqWvimNJBv8qqSzn8P3TsjcMy+ETNMKdl7ckuJFkQE8WJtat4A1FgtLxBqds+gjr0nCWPTbRwnz+xKRlqmIjekUMMUekER6bgVDPMyc13ZEWRpuv5XjJr0i8sjpgEb9YTj39RnAOcRxKRMrPwPKJSlSUFMXr0AszLyUs3gdQeV3VeEU2XHep/zBEjH1xDuE3Do0opKT7t/shon+ljCJFosKy7cVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MiPpVqF1nh/aazzzcQTdWvPc7FgLCxNUGA5FPRAgSs0d5wJOK99CQQyhvP5SJ9GygvQ9mxKu3GpYxGskb7Ye2OAI0i8p9Lh5iQWX+yXZFmyKl3XFYc/oTUKK4VIr9HH2pAxVhv+YzpELrIKFBNlItL+uwsGtczuNdnnvXhZtF3fYAzDm5DiEw3UqmJnBzGBmGH2FsBqufTgnesZa6HhL6nfo9Nfu3l1s2uZ3KXJifAaLL7aYB8PYiAwb5v5KyvMeQ6RfxVJmeYxCefsnPeOLNKoK1426lJjVybDPthzhe9uY617ukZt2XjvOltCNQKbvgUUPZedLycRbVpxnWArz+Q==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 15 Feb 2022 16:28:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYIkOs9pmsZb0l5kefj1m3qdTVCayUboeAgAAGwYCAAAeVgIAAAZQAgAABlwCAAAEVAIAADewAgAADdICAAC9JAIAACSyAgAAChoA=
  • Thread-topic: [PATCH v2] vpci: introduce per-domain lock to protect vpci structure


On 15.02.22 18:18, Jan Beulich wrote:
> On 15.02.2022 16:46, Oleksandr Andrushchenko wrote:
>> Question: can anyone please explain why pcidevs is a recursive lock?
> Well, assuming you did look at the change making it so, can you be a
> little more specific with your question? Are you perhaps suggesting
> the original reason has disappeared, and no new one has appeared? I'm
> afraid I have to repeat what I did say before: If you want to remove
> the recursive nature of the lock, then it is all on you to prove that
> there's no code path where the lock is taken recursively. IOW even if
> no-one knew of a reason, you'd still need to provide this proof.
> Unless of course we'd all agree we're okay to take the risk; I don't
> see us doing so, though.
The question was exactly as asked: I don't understand why it is
recursive and for what reason. I am not suggesting we blindly
change it to a normal spinlock.

My impression was that the code is structured in a way
that the same functionality is coded such as functions,
which already hold the lock, can call others which are
about to acquire the same. So, that allowed not introducing
XXX and XXX_unlocked function pairs which can be done
for many reasons.

That's it

> Jan
>
>
Thank you,
Oleksandr

 


Rackspace

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