Linux-csky Archive on
 help / color / Atom feed
From: Thomas Gleixner <>
To: Hsin-Yi Wang <>
Cc: Josh Poimboeuf <>,
	Ingo Molnar <>,
	Peter Zijlstra <>,
	Jiri Kosina <>,
	Pavankumar Kondeti <>,
	Vitaly Kuznetsov <>,
	Aaro Koskinen <>,
	Greg Kroah-Hartman <>,
	Will Deacon <>, Fenghua Yu <>,
	James Morse <>,
	Mark Rutland <>,
	Heiko Carstens <>,
	Guenter Roeck <>,
	Stephen Boyd <>,
	lkml <>,
	linuxppc-dev <>,,
	Linux-sh list <>,,,
	Linux PM <>
Subject: Re: [PATCH v5] reboot: support offline CPUs before reboot
Date: Thu, 16 Jan 2020 12:10:56 +0100
Message-ID: <> (raw)
In-Reply-To: <>

Hsin-Yi Wang <> writes:
> On Thu, Jan 16, 2020 at 8:30 AM Thomas Gleixner <> wrote:
> We saw this issue on regular reboot (not panic) on arm64: If tick
> broadcast and smp_send_stop() happen together and the first broadcast
> arrives to some idled CPU that hasn't already executed reboot ipi to
> run in spinloop, it would try to broadcast to another CPU, but that
> target CPU is already marked as offline by set_cpu_online() in reboot
> ipi, and a warning comes out since tick_handle_oneshot_broadcast()
> would check if it tries to broadcast to offline cpus. Most of the time
> the CPU getting the broadcast interrupt is already in the spinloop and
> thus isn't going to receive interrupts from the broadcast timer.

The timer broadcasting is obviously broken by the existing reboot unplug
mechanism as the outgoing CPU should remove itself from the broadcast.

Just addressing the broadcast issue is not sufficient as there are tons
of other places which rely on consistency of the various cpu masks.

> If system supports hotplug, _cpu_down() would properly handle tasks
> termination such as remove CPU from timer broadcasting by
> tick_offline_cpu()...etc, as well as some interrupt handling.

Well, emphasis on 'if system supports hotplug'. If not, then you are
back to square one. On ARM64 hotplug is selectable by a config option.

So either we mandate HOTPLUG_CPU for SMP and get rid of all the
ifdeffery or we need to have a mechanism which works on !HOTPLUG_CPU as

That whole reboot/shutdown stuff is an unpenetrable mess of notifiers
and architecture hackery, so something generic and understandable is
really required.



      reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  6:34 Hsin-Yi Wang
2020-01-15  9:49 ` Rafael J. Wysocki
2020-01-15 11:34   ` Hsin-Yi Wang
2020-01-15 11:41 ` Sudeep Holla
2020-01-16  9:25   ` Hsin-Yi Wang
2020-01-16  0:30 ` Thomas Gleixner
2020-01-16  9:18   ` Hsin-Yi Wang
2020-01-16 11:10     ` Thomas Gleixner [this message]

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-csky Archive on

Archives are clonable:
	git clone --mirror linux-csky/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-csky linux-csky/ \
	public-inbox-index linux-csky

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone