lkml.org 
[lkml]   [2022]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 06/12] iommu/vt-d: Acquiring lock in domain ID allocation helpers
    From
    On 2022/6/14 14:52, Tian, Kevin wrote:
    >> From: Lu Baolu <baolu.lu@linux.intel.com>
    >> Sent: Tuesday, June 14, 2022 10:52 AM
    >>
    >> The iommu->lock is used to protect the per-IOMMU domain ID resource.
    >> Moving the lock into the ID alloc/free helpers makes the code more
    >> compact. At the same time, the device_domain_lock is irrelevant to
    >> the domain ID resource, remove its assertion as well.
    >>
    >> On the other hand, the iommu->lock is never used in interrupt context,
    >> there's no need to use the irqsave variant of the spinlock calls.
    >
    > I still prefer to separating reduction of lock ranges from changing irqsave.
    > Locking is tricky. From bisect p.o.v. it will be a lot easier if we just change
    > one logic in one patch.
    >

    Fair enough. I will do this in the next version.

    Best regards,
    baolu

    \
     
     \ /
      Last update: 2022-06-14 09:25    [W:2.752 / U:0.232 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site