From: Jan Beulich <jbeulich@suse.com>
To: dmkhn@proton.me
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 v3 4/5] xen/console: remove max_init_domid dependency
Date: Tue, 20 May 2025 08:28:31 +0200 [thread overview]
Message-ID: <f69ddc8d-2f2b-487d-93e1-be652cd7ef09@suse.com> (raw)
In-Reply-To: <20250519201211.1366244-5-dmukhin@ford.com>
On 19.05.2025 22:12, dmkhn@proton.me wrote:
> From: Denis Mukhin <dmukhin@ford.com>
>
> The physical console input rotation depends on max_init_domid symbol, which is
> managed differently across architectures.
>
> Instead of trying to manage max_init_domid in the arch-common code the console
> input rotation code can be reworked by removing dependency on max_init_domid
> entirely.
... at the expense of doing (worst case) 32k iterations just to find nothing
(else). Iirc it was to avoid this why max_init_domid was introduced.
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -2460,6 +2460,35 @@ void domid_free(domid_t domid)
> spin_unlock(&domid_lock);
> }
>
> +/*
> + * Find the ID of the next possible console owner domain.
> + *
> + * @return Domain ID: DOMID_XEN or non-system domain IDs within
> + * the range of [0..CONFIG_MAX_DOMID-1].
> + */
> +domid_t domid_find_with_input_allowed(domid_t hint)
> +{
> + struct domain *d;
const?
> + domid_t domid = DOMID_XEN;
> +
> + spin_lock(&domlist_update_lock);
Why this heavy lock? Other functions iterating the list just use the RCU
read lock.
Jan
next prev parent reply other threads:[~2025-05-20 6:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 20:12 [PATCH v3 0/5] xen/console: cleanup console input switch logic dmkhn
2025-05-19 20:12 ` [PATCH v3 1/5] xen/console: rename switch_serial_input() to console_switch_input() dmkhn
2025-05-20 6:07 ` Jan Beulich
2025-05-19 20:12 ` [PATCH v3 2/5] xen/console: introduce console_get_domid() dmkhn
2025-05-20 6:20 ` Jan Beulich
2025-05-22 0:30 ` dmkhn
2025-05-19 20:12 ` [PATCH v3 3/5] xen/console: introduce console input permission dmkhn
2025-05-19 20:12 ` [PATCH v3 4/5] xen/console: remove max_init_domid dependency dmkhn
2025-05-20 6:28 ` Jan Beulich [this message]
2025-05-19 20:12 ` [PATCH v3 5/5] xen/console: rename console_rx to console_domid 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=f69ddc8d-2f2b-487d-93e1-be652cd7ef09@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmkhn@proton.me \
--cc=dmukhin@ford.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.