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

Re: [PATCH] libxl/PCI: defer backend wait upon attaching to PV guest


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Dec 2021 14:52:43 +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=KWKFtm6ZXF44qiSUmXPznQZW3QCKhJEVH8CFZzICRLA=; b=hEXCIS/KMQZ7gZuz2STxDrmU2jF9ukf3Tqlqoolgl1dOAM072CGiRJ7UVe73h101Io2w9X5jbwTRebYXBs8bk3vj9hF6P08XeTTuIV2w5osnOhwdihdwIor5J2jVMJw3pYG6yG10rbKoogE1VEmO6zwwPBk0Q28Jbvz1Q9HpQBPzUjbs7s9xRl26UQw/4QusLhSQxt7rEu6ES75pNOI2w/0cpXITViZ9CfXwENoJw5e+pyCmDClFgayCaNDv0gzFMZuWDll3S+R5AAgA64MRvmQnjznHjyAjdeKRlgac/BYYdMxqHW/kUSU4lVOzezcLBiOQX15sc1AU/MyDURUC8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W62S0eSkHVUTsuPvS4CfpMMOtu0Dw3sNDu08KpPc1T9y1TZEau8wWDDWW7cAMQ/3xAEH2BGkWrnslcmAyeh9kitL8DllNy3Yge/rWZlVDxVZ1j8xwxwfNhrmMzYXzoejA2speypVqfN6UK16W7MOFD7ZUYY9Zbs2belRqp5LQIG4vYNelawxZaUt6x7eBlfbY/KCOz9S7AR639uptdwy3ulYvkEqf/wn6cZFh7x+n1yHM7fUE0+DFyLc1lTlmG1EfZPV8NYz9nY5dKNp34yTTjFenH3zi0db8uJUE8s0JrZAXfhtWItXLijp5tFnrWY+bZ2t4/qtaYyeO/8A3h4Hjw==
  • 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>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Stefano Stabellini <stefano@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 14 Dec 2021 13:53:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.12.2021 14:34, Jason Andryuk wrote:
> On Tue, Dec 14, 2021 at 2:50 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> Attempting to wait when the backend hasn't been created yet can't work:
>> the function will complain "Backend ... does not exist". Move the
>> waiting past the creation of the backend (and that of other related
>> nodes), hoping that there are no other dependencies that would now be
>> broken.
>>
>> Fixes: 0fdb48ffe7a1 ("libxl: Make sure devices added by pci-attach are 
>> reflected in the config")
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>> Just to make it explicit: I have no idea why the waiting is needed in
>> the first place. It's been there from the very introduction of PCI
>> passthrough support (commit b0a1af61678b). I therefore can't exclude
>> that an even better fix would be to simply omit the 2nd hunk here.
> 
> The first time a device is attached, the backend does not exist, and
> the wait is not needed.  However, when a second device is attached,
> the backend does exist.  Since pciback goes through Reconfiguring and
> Reconfigured, I believe the wait exists to let the frontend/backend
> settle back to Connected before modifying the xenstore entries to add
> the additional device.  I could be wrong, but that is my best answer
> for why someone went to the trouble of adding a wait in the first
> place.

If things are as you describe them, then the change here is wrong: The
waiting gets moved from before the creation of the new device's nodes
to immediately after. Yet then I also can't see how else I should
address the issue at hand, so I'd have to defer to someone else; this
may involve undoing / redoing some of what the commit referenced by
the Fixes: tag did.

However, since all new nodes get added in a single transaction, I
can't see why waiting for the completion of a prior reconfigure would
be necessary: That'll either notice (and process) the new nodes, or
it won't. If it does, the next reconfigure would simply be a no-op.

Jan




 


Rackspace

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