All of lore.kernel.org
 help / color / mirror / Atom feed
From: dmkhn@proton.me
To: Jan Beulich <jbeulich@suse.com>
Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech,
	julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com,
	sstabellini@kernel.org, dmukhin@ford.com,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v6 1/2] xen/domain: unify domain ID allocation
Date: Mon, 19 May 2025 19:31:02 +0000	[thread overview]
Message-ID: <aCuG8TffcquVYWod@kraken> (raw)
In-Reply-To: <98c10f03-c5f9-4e89-9aed-596b5cc3f8fd@suse.com>

On Sun, May 18, 2025 at 10:52:24AM +0200, Jan Beulich wrote:
> On 16.05.2025 04:04, dmkhn@proton.me wrote:
> > From: Denis Mukhin <dmukhin@ford.com>
> >
> > Currently, hypervisor code has two different non-system domain ID allocation
> > implementations:
> >
> >   (a) Sequential IDs allocation in dom0less Arm code based on max_init_domid;
> >
> >   (b) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use
> >       max_init_domid (both Arm and x86).
> >
> > It makes sense to have a common helper code for such task across architectures
> > (Arm and x86) and between dom0less / toolstack domU allocation.
> >
> > Wrap the domain ID allocation as an arch-independent function domid_alloc() in
> > common/domain.c based on rangeset.
> >
> > Allocation algorithm:
> > - If an explicit domain ID is provided, verify its availability and
> >   use it if ID is not used;
> > - Otherwise, perform an exhaustive search starting from the end of the used
> >   domain ID range. domid_alloc() guarantees that two subsequent calls will
> >   result in different IDs allocation.
> While you properly retain original logic now, the above is not an accurate
> description thereof, imo. To search "from the end" usually is understood as
> a backwards search. Whereas what you mean is that the search starts off where
> the last one finished, wrapping around when hitting the end of the valid
> range.

I have updated the description in v7:
  https://lore.kernel.org/xen-devel/20250519192306.1364471-2-dmukhin@ford.com/

> 
> Jan
> 



  reply	other threads:[~2025-05-19 19:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  2:04 [PATCH v6 0/2] xen/domain: domain ID allocation dmkhn
2025-05-16  2:04 ` [PATCH v6 1/2] xen/domain: unify " dmkhn
2025-05-16  8:43   ` Teddy Astie
2025-05-16 18:06     ` dmkhn
2025-05-16 20:35       ` Julien Grall
2025-05-16 21:14         ` dmkhn
2025-05-18  8:52   ` Jan Beulich
2025-05-19 19:31     ` dmkhn [this message]
2025-05-16  2:04 ` [PATCH v6 2/2] xen/domain: adjust domain ID allocation for Arm dmkhn
2025-05-18  8:57   ` Jan Beulich
2025-05-19 19:28     ` dmkhn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCuG8TffcquVYWod@kraken \
    --to=dmkhn@proton.me \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dmukhin@ford.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.