From: Jan Beulich <jbeulich@suse.com>
To: Igor Druzhinin <igor.druzhinin@citrix.com>
Cc: sstabellini@kernel.org, julien@xen.org, wl@xen.org,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
george.dunlap@citrix.com, xen-devel@lists.xenproject.org,
roger.pau@citrix.com
Subject: Re: [Xen-devel] [PATCH v3] x86/cpu: Sync any remaining RCU callbacks before CPU up/down
Date: Fri, 6 Mar 2020 10:43:01 +0100 [thread overview]
Message-ID: <6175e008-2b25-0232-8fe1-073fe4325b99@suse.com> (raw)
In-Reply-To: <1583336008-10123-1-git-send-email-igor.druzhinin@citrix.com>
On 04.03.2020 16:33, Igor Druzhinin wrote:
> --- a/xen/arch/x86/acpi/power.c
> +++ b/xen/arch/x86/acpi/power.c
> @@ -305,7 +305,6 @@ static int enter_state(u32 state)
> cpufreq_add_cpu(0);
>
> enable_cpu:
> - rcu_barrier();
> mtrr_aps_sync_begin();
> enable_nonboot_cpus();
> mtrr_aps_sync_end();
I take it you remove the invocation here because of being redundant
with the cpu_up() in enable_nonboot_cpus(). Is this safe / correct
in all cases? For one, it's not obvious to me that
mtrr_aps_sync_begin() couldn't rely on RCU syncing to have happened.
And then enable_nonboot_cpus() may not call cpu_up() at all,
because of the park_offline_cpus-based early loop continuation in
the function.
> --- a/xen/arch/x86/sysctl.c
> +++ b/xen/arch/x86/sysctl.c
> @@ -85,11 +85,7 @@ long cpu_up_helper(void *data)
> int ret = cpu_up(cpu);
>
> if ( ret == -EBUSY )
> - {
> - /* On EBUSY, flush RCU work and have one more go. */
> - rcu_barrier();
> ret = cpu_up(cpu);
> - }
>
> if ( !ret && !opt_smt &&
> cpu_data[cpu].compute_unit_id == INVALID_CUID &&
> @@ -110,11 +106,7 @@ long cpu_down_helper(void *data)
> int cpu = (unsigned long)data;
> int ret = cpu_down(cpu);
> if ( ret == -EBUSY )
> - {
> - /* On EBUSY, flush RCU work and have one more go. */
> - rcu_barrier();
> ret = cpu_down(cpu);
> - }
In both cases I think the comments would better be retained (in
an adjusted shape).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-03-06 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 15:33 [Xen-devel] [PATCH v3] x86/cpu: Sync any remaining RCU callbacks before CPU up/down Igor Druzhinin
2020-03-06 9:43 ` Jan Beulich [this message]
2020-03-06 13:10 ` Igor Druzhinin
2020-03-06 13:28 ` Jan Beulich
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=6175e008-2b25-0232-8fe1-073fe4325b99@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=igor.druzhinin@citrix.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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.