[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: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 15 Feb 2022 17:36:13 +0100
  • 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=uV3nTGQYjOfjOMMfqv/mHtHSTE3as+B393c9kSW8YQA=; b=XyPv0UybqaQUYd3Fk5nIbJfJ2t+KIGy66TndWSJ94D/RbARG4tiOKQlGmQJXRMlYcPjTseqI+kALyteQ6wqXt7MXpcDbWNGwA3l3zakw+msr25QaLcKXSkaHltc5ACje7/MsyX06iBZGCx1o68Unl/vUzQDDD6Tr4aRw+vEqLWRszevYyfImOJn4EV/qCOYtvVlReoPjRlvwdfJLbClkNYvBpUHziqNsu8Lzzm0WiLNtFIof37uBB6DsRTSZkbOtf8BRvq5A3PMeOZhXfBNzbFGzfUXe7OkrjXtcfUJ9aobJqKY2mUJIFS7bP+UE/U/epaTv6Al0/qKVoAMobJAcmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AezeqDoMgXViZFgCdJLAhb8MDQP3LYInokYYbY3PQlgCuYdOC7ZGeS8E21m+AP0oG5Cx+B7+e0DjSo6mo6vRkVmLebJS7utvioyHTFr13uDqDVcWoDAfsTcfuV0Blw3Wt6Gmg17oHkBHmOmW4GcSYeVkocnlgw6ImkPMSuefv96VO5dukp9/uUbtg4SF4Ou24W4fbEyfFSgPtKKdhLulObLRy9x/q/vxEUzNPfJLtfCwqf2lpv+8c8fUoSS3u3txbkiR8lu+CRwOAkOd04kAD619gRisESmctC/kIGdw5D54SnOvzNn+FlXKF6kLNAauW694KUxJh4/oQmiaF2kNUg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 15 Feb 2022 16:36:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.02.2022 17:28, Oleksandr Andrushchenko wrote:
> 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.

But the reason for changing it to be recursive is stated in the
description of the respective commit bfa493f52e89:

IOMMU: make the pcidevs_lock a recursive one

The pcidevs_lock is going to be recursively taken for hiding ATS
device, when VT-d Device-TLB flush timed out.

Before asking such a question, I would have assumed that you looked
up that very commit. Hence my asking to be more specific.

Jan




 


Rackspace

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