From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Longpeng(Mike)" <longpeng2@huawei.com>
Cc: peterz@infradead.org, valentin.schneider@arm.com,
mingo@kernel.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, arei.gonglei@huawei.com
Subject: Re: [RFC] cpu/hotplug: allow the cpu in UP_PREPARE state to bringup again
Date: Thu, 30 Sep 2021 16:01:18 +0200 [thread overview]
Message-ID: <20210930140118.z352cj3uzjscctcb@linutronix.de> (raw)
In-Reply-To: <20210901051143.2752-1-longpeng2@huawei.com>
On 2021-09-01 13:11:43 [+0800], Longpeng(Mike) wrote:
> The cpu's cpu_hotplug_state will be set to CPU_UP_PREPARE before
> the cpu is waken up, but it won't be reset when the failure occurs.
> Then the user cannot to make the cpu online anymore, because the
> CPU_UP_PREPARE state makes cpu_check_up_prepare() unhappy.
>
> We should allow the user to try again in this case.
Can you please describe where it failed / what did you reach that state?
> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
> ---
> kernel/smpboot.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kernel/smpboot.c b/kernel/smpboot.c
> index f6bc0bc..d18f8ff 100644
> --- a/kernel/smpboot.c
> +++ b/kernel/smpboot.c
> @@ -392,6 +392,13 @@ int cpu_check_up_prepare(int cpu)
> */
> return -EAGAIN;
>
> + case CPU_UP_PREPARE:
> + /*
> + * The CPU failed to bringup last time, allow the user
> + * continue to try to start it up.
> + */
> + return 0;
> +
> default:
>
> /* Should not happen. Famous last words. */
> --
> 1.8.3.1
Sebastian
next prev parent reply other threads:[~2021-09-30 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 5:11 Longpeng(Mike)
2021-09-30 14:01 ` Sebastian Andrzej Siewior [this message]
2021-10-08 3:10 ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2021-11-19 17:36 ` Sebastian Andrzej Siewior
2021-11-22 0:26 ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
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=20210930140118.z352cj3uzjscctcb@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=arei.gonglei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longpeng2@huawei.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=valentin.schneider@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®