WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Change the pcidevs_lock from rw_lock to spin_lock
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>

Thanks
Yunhong Jiang

Attachment: pcidevs_lock.patch
Description: pcidevs_lock.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Change the pcidevs_lock from rw_lock to spin_lock, Jiang, Yunhong <=