Author: andrew
Date: Wed Feb 28 16:03:40 2018
New Revision: 330120
URL: https://svnweb.freebsd.org/changeset/base/330120

Log:
  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)

Modified:
  head/sys/arm64/arm64/mp_machdep.c

Modified: head/sys/arm64/arm64/mp_machdep.c
==============================================================================
--- head/sys/arm64/arm64/mp_machdep.c   Wed Feb 28 15:48:08 2018        
(r330119)
+++ head/sys/arm64/arm64/mp_machdep.c   Wed Feb 28 16:03:40 2018        
(r330120)
@@ -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);
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to