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

[Xen-devel] [PATCH] Change the pcidevs_lock from rw_lock to spin_lock

  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
  • Date: Fri, 19 Dec 2008 17:59:42 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Delivery-date: Fri, 19 Dec 2008 02:00:48 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AclhwIK7p8S6v4ZiS/md75N5kEtIKw==
  • Thread-topic: [PATCH] Change the pcidevs_lock from rw_lock to spin_lock

This patch change the pcidevs_lock to spin_lock.
As pcidevs_lock is changed from protecting only the alldevs_list to more than 
that, it doesn't benifit too much from the rw_lock. Also the previous patch 
18906:2941b1a97c60 is wrong to use read_lock to protect some sensitive data 
(thanks Espen pointed out that).

Also two minor fix in this patch:
a) deassign_device will deadlock when try to get the pcidevs_lock if called by 
pci_release_devices, remove the lock to the caller.
b) The iommu_domain_teardown should not ASSERT for the pcidevs_lock because it 
just update the domain's vt-d mapping.

Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>

Yunhong Jiang

Attachment: pcidevs_lock.patch
Description: pcidevs_lock.patch

Xen-devel mailing list



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