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

Re: [PATCH RFC 2/4] xen: add bitmap to indicate per-domain state changes


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Nov 2021 14:39: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=NdLh5QL2I942orzw8vED+ukwbVfREOpx+dAqvB7Bfuc=; b=WWAQ5Vs0BeVcCTRRguJDdh3t0b2awlGkbZMr9MV/BSFPHCAzBw2pmwy5pMJsBq+bAHostrkWcFPhkxJrhDwSgxPJ6wZHlxgSMKYXsOUuw8aofF3Zpe0ZY1HGdETmqMfBQXL+yqmkkB0iL6rtUKGy7zMLagCLmkFq/YDMdh6C3VozkBXP9Yh387O+StXsMkVe/W35ewlU5V3zLVKX0+jPCaFVBCNlX7ZMI087gL1usmmIlmxANeM3GYvCsVWcm9NafbTeRz1ik8JUofEiADMg3k6cZtzbRYZvi+lrIpao6rlkz57egKZsgJ3fG0SKlRi+Ksq7YVCSWtNe1saLcnc1DA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uc5klzW9ofX5YaYLPJhqRB8ut5o/JJdRfGaMK+nJH2iN78G8d1NHlFU8t0D311IJ42fMnNouU1YkR9GrCgsMunjB7IV8og4M16+iQ5gLn2psOVyBw4FfRoXngfovqyO15ejWSci7tzajXh1gpi6KQWggRzisVlfeDEb6O3HIHSFzWhQ3cwdX9jw/PVh5i3Fwbm7v+SdCd57EjHiuqUsq8k6XOR4APemo/h/qckfO68n3XPZXy1TDpjjbkoCJdtFFW/Ahqs1kELYyhbddkyxw57Kqskasrt/wQAdhy9InUESJPudJ5WEqPBpko0V4ezY45/xqAarWRDfOmIeAi9dwIQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 22 Nov 2021 13:40:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.11.2021 13:46, Juergen Gross wrote:
> On 22.11.21 11:41, Jan Beulich wrote:
>> On 14.09.2021 14:35, Juergen Gross wrote:
>>> Add a bitmap with one bit per possible domid indicating the respective
>>> domain has changed its state (created, deleted, dying, crashed,
>>> shutdown).
>>>
>>> Registering the VIRQ_DOM_EXC event will result in setting the bits for
>>> all existing domains and resetting all other bits.
>>
>> Generally I view VIRQ_DOM_EXC as overly restrictive already - what if both
>> a xenstore domain and a control domain want respective notification? Hence
> 
> The general idea was that in this case the control domain should
> register a related Xenstore watch.
> 
>> similarly I'm not convinced a single, global instance will do here. Which
>> in turn raises the question whether the approach chosen may not take us
>> far enough, and we wouldn't instead want a more precise notification model
>> (i.e. not just "something has changed").
> 
> Yes, that would be the job of Xenstore. It would provide the more
> fine grained watches for that purpose.

And the watch consumer still wouldn't have a way to distinguish two domain
instances using the same ID, would it?

>>> @@ -1141,6 +1161,8 @@ static void complete_domain_destroy(struct rcu_head 
>>> *head)
>>>         xfree(d->vcpu);
>>>   +    set_bit(d->domain_id, dom_state_changed);
>>> +
>>>       _domain_destroy(d);
>>>         send_global_virq(VIRQ_DOM_EXC);
>>
>> Wouldn't this better be in domain_destroy() immediately after the domain
>> has been taken off the list, and hence is no longer "discoverable"?
> 
> In this case the call of send_global_virq() should be moved, too,
> I guess?

Possibly, albeit I'd see this as a separate change to make. It doesn't
seem outright wrong for the vIRQ to be sent late. But I agree with the
idea of keeping sending and bit-setting together (ideally, even if this
was to stay here, the two would better sit truly side by side).

Jan




 


Rackspace

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