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

Re: [PATCH v3 2/6] xen: pci: introduce reference counting for pdev


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 17 Apr 2023 12:34:31 +0200
  • 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=baBHCNCprn9x3IMJt6q/GtY4bteAhrnSmSni5g5U3yQ=; b=X6qD7iEuOsyyCWivDINDtkulg6ET0nlxPcgiHFhrYdGo4cbuW75fLsSuKfGtBMSrBUamVIn3yrn+nf9A8xFNODR2eD3RiNgwClmF+3+zCA9q0pAZv+mP5E7Po0O8AkMjHwZ6IOmaO7aG4uld7eO9zolrJxENNtt7zcLjqYY2BAZ9RHoJDbOJXuesFRDv269HfxYZ8B38pOtetivIth8pTsozmhwrXhoZDmNQsNbSdJPNNw0PeuXgPcqTQ1162pBlBChw/fDbzUQVwM1VPzgu/eofIBhmkfGbvU7u1GZCIzDmewfwhNxxtThB0Yy3jVKmYgPOmwl7dmlpc/TUnVg16A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WGoe6Z2TtzQjhPFeVWYZxUn9D8iK+C93BmiCbt7za3/xAXIH9Ac/lJTYlPnIRc4lcnX7R0F41wNCRGZjS0QyDtj15XM0Wc2GmcVvh/CDgTxi64BadNQVOAfYz++eiUIjGgfuzFVEAFXqVjLTkbpz5JxS7yg9fmPD8v6KWr4Fx4SvPqIXssjJn41YcGMiGTJjJh8why3yddOLrJ6ayVenye4aoJMvBpUpYGld9tImkx3ekvgnwZNPrtA7JX9co1KIKxqfwpdcse/VDD0frwUdFIKiCb/ddxrn+b9AQqlRqqj4yytS2pKFz4xBm8aTGwL5EL8Uv7AUvO6MKqeuk3Ns1A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Mon, 17 Apr 2023 10:34:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.04.2023 12:17, Roger Pau Monné wrote:
> On Fri, Apr 14, 2023 at 01:30:39AM +0000, Volodymyr Babchuk wrote:
>> Above I have proposed another view on this. I hope, it will work for
>> you. Just to reiterate, idea is to allow "harmless" refcounts to be left
>> after returning from pci_remove_device(). By "harmless" I mean that
>> owners of those refcounts will not try to access the physical PCI
>> device if pci_remove_device() is already finished.
> 
> I'm not strictly a maintainer of this piece code, albeit I have an
> opinion.  I will like to also hear Jans opinion, since he is the
> maintainer.

I'm afraid I can't really appreciate the term "harmless refcounts". Whoever
holds a ref is entitled to access the device. As stated before, I see only
two ways of getting things consistent: Either pci_remove_device() is
invoked upon dropping of the last ref, or it checks that it is dropping the
last one. The former looks architecturally cleaner to me, but I can accept
that moving there might be more of a change, so wouldn't object to going
the latter route.

Jan



 


Rackspace

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