diff options
author | Peter Jones <pjones@redhat.com> | 2006-02-17 22:15:56 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-02-17 22:15:56 +0000 |
commit | 2a9d9ff387b912932af93bfe47a797fe53ddaedb (patch) | |
tree | 8e8080f9b83cea27cf2f76f6fb3e5c8035c8570f | |
parent | 6042eb92a9232c8298783437c9cef66ee423b2a2 (diff) | |
download | anaconda-2a9d9ff387b912932af93bfe47a797fe53ddaedb.tar.gz anaconda-2a9d9ff387b912932af93bfe47a797fe53ddaedb.tar.xz anaconda-2a9d9ff387b912932af93bfe47a797fe53ddaedb.zip |
- use acpi's MADT by default for cpu probing, as it actually gets the right
answer on all the SMP and returns 0 on all truly UP test boxes I've found.
-rw-r--r-- | packages.py | 49 |
1 files changed, 12 insertions, 37 deletions
diff --git a/packages.py b/packages.py index 295d1ea1f..0721d65be 100644 --- a/packages.py +++ b/packages.py @@ -645,43 +645,18 @@ def doPreInstall(method, id, intf, instPath, dir): if not upgrade: foundkernel = 0 - # XXX this should probably be table driven or something... - ncpus = isys.smpAvailable() or 1 - nthreads = isys.htavailable() or 1 - ncores = isys.coresavailable() - - # some examples: - # 1x1 (nothing fancy UP): should get 1 - # ncpus = 1 - # nthreads = 1 - # ncores = 1 - # nthreads / ncores * ncpus = 1 - # - # 2x1x2 (2 cpu -DC +HT): should get 4 - # ncpus = 2 - # nthreads = 2 - # ncores = 1 - # nthreads / ncores * ncpus = 4 - # - # 1x2x1 (1 cpu +DC -HT): should get 2 - # ncpus = 2 - # nthreads = 2 - # ncores = 2 - # nthreads / ncores * ncpus = 2 - # - # 1x2x2 (1 cpu +DC +HT): should get 4 - # ncpus = 2 - # nthreads = 4 - # ncores = 2 - # nthreads / ncores * ncpus = 4 - # - # 2x2x2 (2 cpus, +DC +HT): should get 8 - # ncpus = 4 - # nthreads = 4 - # ncores = 2 - # nthreads / ncores * ncpus = 8 - # - nthreads = (nthreads / ncores) * ncpus + nthreads = isys.acpicpus() + + if acpicpus == 0: + # XXX this should probably be table driven or something... + ncpus = isys.smpAvailable() or 1 + nthreads = isys.htavailable() or 1 + ncores = isys.coresavailable() + + if ncpus == 1: # machines that have one socket + nthreads = nthreads; + else: # machines with more than one socket + nthreads = (nthreads / ncores) * ncpus largesmp_min = -1 if iutil.getArch() == "x86_64": |