Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Don't overwrite ci_is_slow if it has explicitly bee...



details:   https://anonhg.NetBSD.org/src/rev/c523cab37fb1
branches:  trunk
changeset: 1008556:c523cab37fb1
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Mar 26 19:23:18 2020 +0000

description:
Don't overwrite ci_is_slow if it has explicitly been set.  Changed for
correctness, should have no impact.

diffstat:

 sys/kern/subr_cpu.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 34e6891f8df3 -r c523cab37fb1 sys/kern/subr_cpu.c
--- a/sys/kern/subr_cpu.c       Thu Mar 26 18:50:16 2020 +0000
+++ b/sys/kern/subr_cpu.c       Thu Mar 26 19:23:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_cpu.c,v 1.13 2020/02/15 07:20:40 skrll Exp $      */
+/*     $NetBSD: subr_cpu.c,v 1.14 2020/03/26 19:23:18 ad Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019, 2020
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.13 2020/02/15 07:20:40 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.14 2020/03/26 19:23:18 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -151,7 +151,6 @@
        ci->ci_core_id = core_id;
        ci->ci_smt_id = smt_id;
        ci->ci_numa_id = numa_id;
-       ci->ci_is_slow = false;
        for (rel = 0; rel < __arraycount(ci->ci_sibling); rel++) {
                ci->ci_sibling[rel] = ci;
                ci->ci_nsibling[rel] = 1;
@@ -246,8 +245,9 @@
        ci->ci_schedstate.spc_flags |=
            (SPCF_CORE1ST | SPCF_PACKAGE1ST | SPCF_1STCLASS);
        ci->ci_package1st = ci;
-       ci->ci_is_slow = false;
-       cpu_topology_haveslow = false;
+       if (!cpu_topology_haveslow) {
+               ci->ci_is_slow = false;
+       }
 }
 
 /*



Home | Main Index | Thread Index | Old Index