Allow releasing APs to take more time, as long as we are making progress.

On large core count machines this can be slow while all the CPUs update
the online counter.

Sponsored by:	DARPA, AFRL
Sponsored by:	Cavium (Hardware)
This commit is contained in:
andrew 2018-02-28 16:03:40 +00:00
parent f6aa7ed48c
commit ca026b5b22

View File

@ -221,7 +221,7 @@ arm64_cpu_attach(device_t dev)
static void
release_aps(void *dummy __unused)
{
int i;
int i, started;
/* Only release CPUs if they exist */
if (mp_ncpus == 1)
@ -241,11 +241,22 @@ release_aps(void *dummy __unused)
"sev \n"
::: "memory");
printf("Release APs\n");
printf("Release APs...");
started = 0;
for (i = 0; i < 2000; i++) {
if (smp_started)
if (smp_started) {
printf("done\n");
return;
}
/*
* Don't time out while we are making progress. Some large
* systems can take a while to start all CPUs.
*/
if (smp_cpus > started) {
i = 0;
started = smp_cpus;
}
DELAY(1000);
}