Bug 692177
| Summary: | sysconf(_SC_*CACHE) returns 0 for all caches on some CPUs. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | john.haxby <john.haxby> | ||||
| Component: | glibc | Assignee: | Andreas Schwab <schwab> | ||||
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.0 | CC: | fweimer, mfranc, pmuller, syeghiay | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glibc-2.12-1.25.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-05-19 13:16:31 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0584.html |
Created attachment 488813 [details] Variation of the patch posted upstream to use cpuid 4 rather than cpuid 2 when possible Description of problem: The mechanism that sysconf(3) uses to get the various CACHE parameters fails on the Xen 5670 Version-Release number of selected component (if applicable): 2.12-1.7.el6_0.4 How reproducible: Every time Steps to Reproduce: 1. Find a machine whose /proc/cpuinfo starts something like this: vendor_id : GenuineIntel cpu family : 6 model : 44 model name : Intel(R) Xeon(R) CPU X5670 @ 2.93GHz stepping : 2 2. run "getconf -a | grep CACHE" 3. Observe values printed Actual results: All the cache parameter values are zero. Expected results: Non-zero values for all but the level 4 cache Additional info: Recent CPUs no longer have useful cpuid leaf 2 cache descriptors. For this particular machine, cpuid 2 returns 0x55035a01 0xf0b2ff 0x0 0xca0000 in eax, ebx, ecx and edx respectively. The 0xff in the least significant byte of ebx indicates that you need to use cpuid leaf 4. Actually, for all but somewhat old CPUs you're better off using cpuid leaf 4 anyway (the only machines I have access to that have a cpuid level less than four are a "Intel(R) Pentium(R) 4 CPU 1.70GHz" and "Intel(R) Pentium(R) 4 CPU 2.40GHz" both of which are long past their use-by date).