diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2024-02-12 09:22:22 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-02-16 15:19:32 +0100 |
commit | cc7338e9d807e20e60e6720a62956f0e9d46f0f8 (patch) | |
tree | 811ff90ba70d45d72337a01478248c38ef01b67f /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 17c51a0ea36b800e7a5998a92d83016c82935dff (diff) |
iommu: Refine locking for per-device fault data management
The per-device fault data is a data structure that is used to store
information about faults that occur on a device. This data is allocated
when IOPF is enabled on the device and freed when IOPF is disabled. The
data is used in the paths of iopf reporting, handling, responding, and
draining.
The fault data is protected by two locks:
- dev->iommu->lock: This lock is used to protect the allocation and
freeing of the fault data.
- dev->iommu->fault_parameter->lock: This lock is used to protect the
fault data itself.
Apply the locking mechanism to the fault reporting and responding paths.
The fault_parameter->lock is also added in iopf_queue_discard_partial().
It does not fix any real issue, as iopf_queue_discard_partial() is only
used in the VT-d driver's prq_event_thread(), which is a single-threaded
path that reports the IOPFs.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Tested-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Longfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/20240212012227.119381-12-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions