All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Krystian Hebel <krystian.hebel@3mdeb.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org, "Wei Liu" <wl@xen.org>
Subject: Re: [XEN PATCH 3/9] x86/smp: drop x86_cpu_to_apicid, use cpu_data[cpu].apicid instead
Date: Thu, 8 Feb 2024 08:29:07 +0100	[thread overview]
Message-ID: <0d776dcc-af14-436a-bf8b-9bfb39b787b8@suse.com> (raw)
In-Reply-To: <8121d9b472b305be751158aa3af3fed98ff0572e.1699982111.git.krystian.hebel@3mdeb.com>

On 14.11.2023 18:50, Krystian Hebel wrote:
> Both fields held the same data.

Supposedly the same data only. They come from different origins, and you're
hiding this quite well by leaving all sites in place where the field is
written. Both items are also used for entirely separate purposes. So you
need to
- explain why both sources of information necessarily provide the same
  data,
- especially if there's remaining concern from the above explanation that
  the two values might end up different in corner cases (running
  virtualized ourselves comes to mind as a possible example), explain why
  nevertheless it is fine (risk free) to use the consolidated item for
  all of the originally separate purposes,
- either explain or do away with the multiple places setting this single
  remaining field.

> --- a/xen/arch/x86/smpboot.c
> +++ b/xen/arch/x86/smpboot.c
> @@ -61,10 +61,8 @@ unsigned int __read_mostly nr_sockets;
>  cpumask_t **__read_mostly socket_cpumask;
>  static cpumask_t *secondary_socket_cpumask;
>  
> -struct cpuinfo_x86 cpu_data[NR_CPUS];
> -
> -u32 x86_cpu_to_apicid[NR_CPUS] __read_mostly =
> -	{ [0 ... NR_CPUS-1] = BAD_APICID };
> +struct cpuinfo_x86 cpu_data[NR_CPUS] =
> +        { [0 ... NR_CPUS-1] .apicid = BAD_APICID };

Nit: Stray blank after closing square bracket.

Jan


  parent reply	other threads:[~2024-02-08  7:29 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 17:49 [XEN PATCH 0/9] x86: parallelize AP bring-up during boot Krystian Hebel
2023-11-14 17:49 ` [XEN PATCH 1/9] x86/boot: choose AP stack based on APIC ID Krystian Hebel
2024-01-26 18:30   ` Julien Grall
2024-03-12 14:14     ` Krystian Hebel
2024-02-07 16:11   ` Jan Beulich
2024-03-12 15:11     ` Krystian Hebel
2024-03-12 15:40       ` Jan Beulich
2023-11-14 17:49 ` [XEN PATCH 2/9] x86: don't access x86_cpu_to_apicid[] directly, use cpu_physical_id(cpu) Krystian Hebel
2024-01-26 18:38   ` Julien Grall
2024-02-07 16:28   ` Jan Beulich
2024-03-12 15:18     ` Krystian Hebel
2024-03-12 15:42       ` Jan Beulich
2023-11-14 17:50 ` [XEN PATCH 3/9] x86/smp: drop x86_cpu_to_apicid, use cpu_data[cpu].apicid instead Krystian Hebel
2024-02-02 18:11   ` Julien Grall
2024-02-07 16:41     ` Jan Beulich
2024-03-12 15:29       ` Krystian Hebel
2024-03-12 15:49         ` Jan Beulich
2024-02-08  7:29   ` Jan Beulich [this message]
2024-03-12 15:35     ` Krystian Hebel
2023-11-14 17:50 ` [XEN PATCH 4/9] x86/smp: move stack_base to cpu_data Krystian Hebel
2024-02-02 18:24   ` Julien Grall
2024-02-05  8:41     ` Jan Beulich
2024-02-05  9:32       ` Julien Grall
2024-03-12 15:59       ` Krystian Hebel
2024-02-07 16:53   ` Jan Beulich
2023-11-14 17:50 ` [XEN PATCH 5/9] x86/smp: call x2apic_ap_setup() earlier Krystian Hebel
2024-02-07 17:02   ` Jan Beulich
2024-03-12 16:02     ` Krystian Hebel
2024-03-13 13:05       ` Jan Beulich
2023-11-14 17:50 ` [XEN PATCH 6/9] x86/shutdown: protect against recurrent machine_restart() Krystian Hebel
2024-02-08 11:30   ` Jan Beulich
2024-03-12 16:05     ` Krystian Hebel
2024-03-13 13:11       ` Jan Beulich
2023-11-14 17:50 ` [XEN PATCH 7/9] x86/smp: drop booting_cpu variable Krystian Hebel
2024-02-08 11:39   ` Jan Beulich
2024-03-12 16:16     ` Krystian Hebel
2023-11-14 17:50 ` [XEN PATCH 8/9] x86/smp: make cpu_state per-CPU Krystian Hebel
2024-02-08 12:13   ` Jan Beulich
2024-03-12 16:38     ` Krystian Hebel
2024-03-13 13:21       ` Jan Beulich
2023-11-14 17:50 ` [XEN PATCH 9/9] x86/smp: start APs in parallel during boot Krystian Hebel
2024-02-08 12:37   ` Jan Beulich
2024-03-12 17:13     ` Krystian Hebel
2024-03-13 13:30       ` Jan Beulich
2023-11-14 20:13 ` [XEN PATCH 0/9] x86: parallelize AP bring-up " Julien Grall

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=0d776dcc-af14-436a-bf8b-9bfb39b787b8@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=krystian.hebel@3mdeb.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.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.