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

Re: [RFC PATCH 02/10] xen: pci: add pci_seg->alldevs_lock


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 28 Feb 2023 17:32:05 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=bYUVFIcS25dqJO08hhaGprZVW3JltPGrYCBaCpsQnG4=; b=MnQvc7f6Ki00Wwx25r4ruuLlOkk5Y2eJD/K70+LjU4CDTJoo0CY3EkSyevmUWhszZipIrkQNSqAKoCJdC6WGBDXZlC5IAJgrwWP1OPxD5eD1jalMjZJK/q3lGrXvbuqFez7aDdxtIQfufVLIv/tfV8vvJGGWMSnJxE72loYE6FpmUgx6GWdBuqMTy/vcjVXgzMF/S7ROB+qxCThqIXFnIA+iKlY5ilO/f3QNHEaKZuIimSpFFZnbcdrmVG5LaikEzSZOMOVoaKpLbuitIn5o3c1yvD3ly4jhZOJJUAMY4eWlJSc/+sNXYY50ge/JgoKVtpk5XioPPoz+fQCyjf7XTg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHphhbs4YK0m288vgSsbPji34Djulleyjv2M2rOtEdrHX3XAE8Dv8Znd3rDeqfjERvqc8HBbgt4tZTz+7BT+RuzCATaDsXR5vmt76bQqJ0gbHOddJsE9kwwbQbz8RDkR+8JrFFAv78KgtnKvBHfXhNr427MTPhrHY90ZcTnbO/KGB6jdHcdf9QFgs9Q1G0rrCLik4VR62PfB5+xzzu17KmDlPC+8404yvvJIMhZtXf7uR0M94CDaRMyLpoEmUUBNbF2ReJmcFMD1h22uED3vNpaOWS9kj17+RgjV82RW5SPkqpBzyES5E4Pst68xJlSphzGCfSTgY2ONzH5ZH7lElg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 28 Feb 2023 16:32:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.08.2022 16:10, Volodymyr Babchuk wrote:
> This lock protects alldevs_list of struct pci_seg. As this, it should
> be used when we are adding, removing on enumerating PCI devices
> assigned to a PCI segment.
> 
> Radix tree that stores PCI segment has own locking mechanism, also
> pci_seg structures are only allocated and newer freed, so we need no
> additional locking to access pci_seg structures. But we need a lock
> that protects alldevs_list field.
> 
> This enables more granular locking instead of one huge pcidevs_lock
> that locks entire PCI subsystem.  Please note that pcidevs_lock() is
> still used, we are going to remove it in subsequent patches.

Just a thought: To limit the scope of the steps taken, would it be a
possibility (and useful) to move from the global to the per-segment
lock, extending what this per-segment lock is actually protecting?
And only then take further steps, as already done in later parts of
this series?

Jan




 


Rackspace

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