Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[getHyperTwin] Is siblings of core coreId correct? #24

Open
leemgs opened this issue Apr 16, 2019 · 0 comments
Open

[getHyperTwin] Is siblings of core coreId correct? #24

leemgs opened this issue Apr 16, 2019 · 0 comments

Comments

@leemgs
Copy link

leemgs commented Apr 16, 2019

It strange. We need to check the operation of the getHyperTwin function.
As we can see. we can read just one variable from the thread_sibling_list file.

https://github.com/PlatformLab/CoreArbiter/blob/master/src/CoreArbiterServer.cc#L975
  • on Intel i5 CPU: The function will not be normal.
invain@u1604:/sys/devices/system/cpu/cpu0/topology$ ls -al
합계 0
drwxr-xr-x 2 root root    0  4월 16 07:30 .
drwxr-xr-x 8 root root    0  4월 16 07:30 ..
-r--r--r-- 1 root root 4096  4월 16 07:30 core_id
-r--r--r-- 1 root root 4096  4월 16 08:30 core_siblings
-r--r--r-- 1 root root 4096  4월 16 10:32 core_siblings_list
-r--r--r-- 1 root root 4096  4월 16 07:30 physical_package_id
-r--r--r-- 1 root root 4096  4월 16 07:30 thread_siblings
-r--r--r-- 1 root root 4096  4월 16 07:30 thread_siblings_list
invain@u1604:/sys/devices/system/cpu/cpu0/topology$ cat ./thread_siblings
1
invain@u1604:/sys/devices/system/cpu/cpu0/topology$ cat ./thread_siblings_list 
0
invain@u1604:/sys/devices/system/cpu/cpu0/topology$ 
@leemgs leemgs changed the title Is siblings of core coreId correct? getHyperTwin: Is siblings of core coreId correct? Apr 16, 2019
leemgs added a commit to leemgs/CoreArbiter that referenced this issue Apr 16, 2019
Fixed issue PlatformLab#24.

This commit is to improve the compatability and portability of gethypertiwn
function among the differenct CPU architectures.

**Changelog**
1. Initialize the value of twin1 and twin2 variable.
2. Added the "twin2 != 1" condition for handling different CPUs.

Signed-off-by: Geunsik Lim <[email protected]>
leemgs added a commit to leemgs/CoreArbiter that referenced this issue Apr 16, 2019
Fixed issue PlatformLab#24.

This commit is to ignore the warning message while building the source code.

``bash
src/CoreArbiterServer.cc:
warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’,
declared with attribute warn_unused_result [-Wunused-result]
```

Signed-off-by: Geunsik Lim <[email protected]>
leemgs added a commit to leemgs/CoreArbiter that referenced this issue Apr 16, 2019
Fixed issue PlatformLab#24.

This commit is to ignore the warning message while building the source code.

```bash
src/CoreArbiterServer.cc:
warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’,
declared with attribute warn_unused_result [-Wunused-result]
```

Signed-off-by: Geunsik Lim <[email protected]>
@leemgs leemgs changed the title getHyperTwin: Is siblings of core coreId correct? [getHyperTwin] Is siblings of core coreId correct? Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant