Comments (5)
Nobody reply?OK
Now,Cpuinfo should use logical cpu cluster device node to parse cpu cluster rather than use physical cpu cluster!!!
We nedd to add a new cpuinfo device node to parse logical cpu cluster,Such as package_leader_id and package_leader_id_list or logical_core_siblings_list 。
Line 189 in 76d5e8f
We can not use a physical cpu cluster device node to parse directly ,because cpu arch is changing all the time.
BR.
Xiaotong
from cpuinfo.
I think some of that is being added as part of RISC-V bringup, but I wonder if it could be landed separately...
from cpuinfo.
I think some of that is being added as part of RISC-V bringup, but I wonder if it could be landed separately...
Hi,malfet, what is means about " I wonder if it could be landed separately".
For Arm CPUs,I am willing to slove the issue.And RISV-V CPUS also has a similar programe.
How to make the issue become a PR?
from cpuinfo.
I suspect we're referring to PR #190 here, where we added the concept of core_leader_id
and cluster_leader_id
to the RISC-V structure definition.
In the RISC-V implementation, we tie the processor's uarch to the core_leader. This seems to be essentially the problem you're flagging on ARM - logical processors on the same physical core are guaranteed to have one uarch, but multiple physical cores tied to the same cluster don't necessarily have to be the same uarch.
I think what malfet@ meant by 'it could be landed separately' is whether #190 might somehow block you, because 2 weeks ago at the comment, it was not yet landed. However, these paths are completely independent, so you could put up a fix for this in ARM without worrying about RISC-V.
In regards to how to make this issue a PR, just create a PR separately and follow this guide to link your PR to this issue.
from cpuinfo.
Application:
uint32_t uarch_index = cpuinfo_get_current_uarch_index();-> const struct cpuinfo_uarch_info* cpuinfo_uarch_info = cpuinfo_get_uarch(uarch_index); (cpuinfo_uarchs,init->fill uarchs in it)-> cpuinfo_uarch_info->uarch ;(Type of CPU microarchitecture )
Cpuinfo:
sibling_package_leader_id ->package_leader_id -> processors[sibling].package_leader_id
cpuinfo_arm_linux_init->cpuinfo_linux_detect_core_siblings->cluster_siblings_parser
static bool cluster_siblings_parser(
uint32_t processor, uint32_t siblings_start, uint32_t siblings_end,
struct cpuinfo_arm_linux_processor* processors)
{
processors[processor].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
uint32_t package_leader_id = processors[processor].package_leader_id;
for (uint32_t sibling = siblings_start; sibling < siblings_end; sibling++) {
if (!bitmask_all(processors[sibling].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
const uint32_t sibling_package_leader_id = processors[sibling].package_leader_id;
if (sibling_package_leader_id < package_leader_id) {
// package_leader_id = sibling_package_leader_id;
}
// processors[sibling].package_leader_id = package_leader_id;
processors[sibling].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
}
processors[processor].package_leader_id = package_leader_id;
return true;
}
from cpuinfo.
Related Issues (20)
- Please support FreeBSD HOT 1
- soc name unknow for huawei mate40
- hwcap on aarch64 linux is 64bit
- exynos9810 problem HOT 2
- Add Bazel builds to PR hooks
- CPUINFO_SUPPORTED_PLATFORM not set on OSX as CMAKE_SYSTEM_PROCESSOR is not set HOT 1
- Add a Github workflow to build Android RISC-V, when an NDK is available
- Nothing Phone 1 support HOT 1
- How to obtain information of CPU frequency? HOT 2
- [Feature Request] Add amx detection in cpuinfo HOT 7
- Unknown chip name for Nokia 8.3 5G HOT 1
- Crash Seen with unspecified micro arch for Windows On Arm devices when getting the cpu micro arch info to check the core type
- Ampere(R) Altra(R) Processor - CPU Detection Error
- Incorrect cache-info output with nosmt linux kernel command line HOT 2
- missing `libcpuinfo.pc` from distro package install HOT 1
- `get_cpu_info()` hangs forever
- Why do we need 'get_system_info_from_registry' for ARM64 device?
- FreeBSD: Xeon CPUs are not detected properly HOT 15
- Add avx10 detect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpuinfo.