Giter Club home page Giter Club logo

x86_adapt's People

Contributors

andreasgocht avatar b4ckslash avatar bmario avatar cvonelm avatar mstud avatar rschoene avatar tilsche avatar xaseron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

x86_adapt's Issues

unchecked MSR access error

[  410.528943] unchecked MSR access error: RDMSR from 0xec0 at rIP: 0xffffffff9c05d1e7 (native_read_msr+0x7/0x30)
[  410.528945] Call Trace:
[  410.528956]  __rdmsr_on_cpu+0x33/0x50
[  410.528968]  generic_exec_single+0xaf/0x120
[  410.528975]  ? refcount_dec_and_test+0x11/0x20
[  410.528978]  ? __extract_hwseed+0x3d/0x3d
[  410.528981]  smp_call_function_single+0xcc/0x130
[  410.528991]  ? pci_conf1_read+0xb8/0xf0
[  410.528994]  rdmsr_on_cpu+0x5d/0x90
[  410.529003]  read_setting.isra.3+0x13b/0x470 [x86_adapt_driver]
[  410.529010]  x86_adapt_init+0x19d2/0x3000 [x86_adapt_driver]
[  410.529018]  ? netlink_broadcast_filtered+0x138/0x3d0
[  410.529020]  ? 0xffffffffc0340000
[  410.529027]  do_one_initcall+0x53/0x1a0
[  410.529034]  ? kmem_cache_alloc_trace+0x152/0x1c0
[  410.529038]  do_init_module+0x5f/0x1ff
[  410.529042]  load_module+0x27f2/0x2bd0
[  410.529051]  ? ima_post_read_file+0x7d/0xa0
[  410.529061]  ? security_kernel_post_read_file+0x6b/0x80
[  410.529065]  SYSC_finit_module+0xdf/0x110
[  410.529068]  ? SYSC_finit_module+0xdf/0x110
[  410.529072]  SyS_finit_module+0xe/0x10
[  410.529082]  entry_SYSCALL_64_fastpath+0x1e/0xad
[  410.529084] RIP: 0033:0x2ad9ee43e8e9
[  410.529087] RSP: 002b:00007fffe8276a48 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[  410.529090] RAX: ffffffffffffffda RBX: 0000563e98ed1fc0 RCX: 00002ad9ee43e8e9
[  410.529092] RDX: 0000000000000000 RSI: 0000563e9713c246 RDI: 0000000000000004
[  410.529093] RBP: 00002ad9ee701b20 R08: 0000000000000000 R09: 0000000000000000
[  410.529095] R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000140
[  410.529096] R13: 00002ad9ee701b78 R14: 0000000000002710 R15: 00002ad9ee701b78

Seen with 4.10 / 4.11 on the 4.10 branch during insmod.

Cannot build static libraries

I'm trying to build x86_adapt on our Cray system, which by default only uses static libraries. I get the following error:

$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt-cray/x86_adapt
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Cray Programming Environment 2.5.15 C
-- Check for working C compiler: /opt/cray/pe/craype/2.5.15/bin/cc
-- Check for working C compiler: /opt/cray/pe/craype/2.5.15/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Cray Programming Environment 2.5.15 CXX
-- Check for working CXX compiler: /opt/cray/pe/craype/2.5.15/bin/CC
-- Check for working CXX compiler: /opt/cray/pe/craype/2.5.15/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:65 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:83 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "x86_adapt".


-- Configuring incomplete, errors occurred!

Are shared libraries really required to use x86_adapt?

Build with 5.4.0-2-amd64 kernel gives warnings

During build with a 5.4 Kernel, the following warnings occured:

[ 27%] Generating kernel_module/driver/x86_adapt_driver.ko
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:379: warning: Function parameter or member 'i' not described in 'increment_knob_counter'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:379: warning: Function parameter or member 'nr_knobs_cpu' not described in 'increment_knob_counter'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:379: warning: Function parameter or member 'nr_knobs_node' not described in 'increment_knob_counter'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:391: warning: Function parameter or member 'i' not described in 'add_knob'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:391: warning: Function parameter or member 'nr_knobs_cpu' not described in 'add_knob'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:391: warning: Function parameter or member 'nr_knobs_node' not described in 'add_knob'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:495: warning: Function parameter or member 'name' not described in 'defaults_param'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:495: warning: Function parameter or member 'return_value' not described in 'defaults_param'
/home/gocht/Dokumente/code/x86_adapt/build/kernel_module/driver/x86_adapt_driver.c:548: warning: Function parameter or member 'cpu' not described in 'read_defaults_cpu'

Best,

Andreas

Installation fails without root privileges

I am trying to install x86_adapt on our Cray system (as regular user, into my home directory) but the installation fails with the following error:

-- Install configuration: ""
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/include/x86_adapt.h
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/lib/libx86_adapt.so
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/lib/libx86_adapt_static.a
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/bin/x86a_read
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/bin/x86a_write
-- Up-to-date: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man
-- Up-to-date: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man/man1
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man/man1/x86a_read.1
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man/man1/x86a_write.1
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man/man3
-- Installing: /zhome/academic/HLRS/hlrs/hpcjschu/opt-cray/readex-BETA1806-intel/share/man/man3/x86_adapt.h.3
mkdir: cannot create directory ‘/lib/modules/4.4.114-94.11-default/extra’: Permission denied
/usr/src/linux-4.4.114-94.11/Makefile:1446: recipe for target '_emodinst_' failed
make[3]: *** [_emodinst_] Error 1
Makefile:150: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make[1]: *** [__sub-make] Error 2

CMake was called using:

$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt-cray/readex-BETA1806-intel/

Just to be sure: Does it even make sense to install x86_adapt as non-root?

dmesg warnings: cannot create duplicate filename

(with 4.10, in the 4.10 branch)

[   35.814081] ------------[ cut here ]------------
[   35.814087] WARNING: CPU: 0 PID: 14 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80
[   35.814088] sysfs: cannot create duplicate filename '/devices/virtual/x86_adapt/cpu_0'
[   35.814088] Modules linked in: x86_adapt_driver(OE+) x86_adapt_defs(POE) coretemp lp parport autofs4 hid_generic usbhid ahci hid libahci fjes
[   35.814095] CPU: 0 PID: 14 Comm: cpuhp/0 Tainted: P           OE   4.10.0-rc4-powernightmares-v4 #17
[   35.814096] Hardware name: Intel Corporation S2600CW/S2600CW, BIOS SE5C610.86B.01.01.0016.033120161139 03/31/2016
[   35.814097] Call Trace:
[   35.814102]  dump_stack+0x63/0x90
[   35.814105]  __warn+0xcb/0xf0
[   35.814106]  warn_slowpath_fmt+0x5f/0x80
[   35.814109]  ? kernfs_path_from_node+0x4f/0x60
[   35.814110]  sysfs_warn_dup+0x62/0x80
[   35.814112]  sysfs_create_dir_ns+0x77/0x90
[   35.814113]  kobject_add_internal+0xaa/0x330
[   35.814117]  ? vsnprintf+0x35b/0x4c0
[   35.814117]  kobject_add+0x75/0xd0
[   35.814120]  ? mutex_lock+0x12/0x40
[   35.814123]  device_add+0x119/0x670
[   35.814124]  device_create_groups_vargs+0xe0/0xf0
[   35.814127]  ? x86_adapt_devnode+0x120/0x120 [x86_adapt_driver]
[   35.814128]  device_create+0x51/0x70
[   35.814132]  ? pick_next_task_fair+0x3d6/0x4d0
[   35.814135]  ? __switch_to+0x23c/0x4f0
[   35.814137]  x86_adapt_cpu_hotplug_online+0x49/0x1bb [x86_adapt_driver]
[   35.814139]  ? x86_adapt_devnode+0x120/0x120 [x86_adapt_driver]
[   35.814141]  cpuhp_invoke_callback+0x80/0x3f0
[   35.814144]  ? __schedule+0x235/0x6d0
[   35.814146]  cpuhp_thread_fun+0x44/0xe0
[   35.814149]  smpboot_thread_fn+0x10a/0x160
[   35.814151]  kthread+0x101/0x140
[   35.814152]  ? sort_range+0x30/0x30
[   35.814153]  ? kthread_create_on_node+0x60/0x60
[   35.814155]  ret_from_fork+0x2c/0x40
[   35.814156] ---[ end trace 3bee66f44239b051 ]---
[   35.814156] ------------[ cut here ]------------
[   35.814158] WARNING: CPU: 0 PID: 14 at lib/kobject.c:240 kobject_add_internal+0x2bd/0x330
[   35.814158] kobject_add_internal failed for cpu_0 with -EEXIST, don't try to register things with the same name in the same directory.
[   35.814159] Modules linked in: x86_adapt_driver(OE+) x86_adapt_defs(POE) coretemp lp parport autofs4 hid_generic usbhid ahci hid libahci fjes
[   35.814162] CPU: 0 PID: 14 Comm: cpuhp/0 Tainted: P        W  OE   4.10.0-rc4-powernightmares-v4 #17
[   35.814163] Hardware name: Intel Corporation S2600CW/S2600CW, BIOS SE5C610.86B.01.01.0016.033120161139 03/31/2016
[   35.814163] Call Trace:
[   35.814165]  dump_stack+0x63/0x90
[   35.814166]  __warn+0xcb/0xf0
[   35.814167]  warn_slowpath_fmt+0x5f/0x80
[   35.814169]  ? sysfs_warn_dup+0x6a/0x80
[   35.814170]  kobject_add_internal+0x2bd/0x330
[   35.814171]  ? vsnprintf+0x35b/0x4c0
[   35.814172]  kobject_add+0x75/0xd0
[   35.814173]  ? mutex_lock+0x12/0x40
[   35.814174]  device_add+0x119/0x670
[   35.814175]  device_create_groups_vargs+0xe0/0xf0
[   35.814177]  ? x86_adapt_devnode+0x120/0x120 [x86_adapt_driver]
[   35.814178]  device_create+0x51/0x70
[   35.814179]  ? pick_next_task_fair+0x3d6/0x4d0
[   35.814180]  ? __switch_to+0x23c/0x4f0
[   35.814181]  x86_adapt_cpu_hotplug_online+0x49/0x1bb [x86_adapt_driver]
[   35.814183]  ? x86_adapt_devnode+0x120/0x120 [x86_adapt_driver]
[   35.814184]  cpuhp_invoke_callback+0x80/0x3f0
[   35.814185]  ? __schedule+0x235/0x6d0
[   35.814186]  cpuhp_thread_fun+0x44/0xe0
[   35.814188]  smpboot_thread_fn+0x10a/0x160
[   35.814188]  kthread+0x101/0x140
[   35.814189]  ? sort_range+0x30/0x30
[   35.814190]  ? kthread_create_on_node+0x60/0x60
[   35.814191]  ret_from_fork+0x2c/0x40
[   35.814192] ---[ end trace 3bee66f44239b052 ]---

Kernel 4.9

X86_adapt has some problems with the kernel 4.9. The branch 4_10 seems to fix them.
I tested with the current Debian testing on my machine. x86a_read works as expected.
I would suppose to merge the branch if the patch doesn't brake x86_a for older kernels.

Best,
Andreas

x86 node knobs listed under CPU knobs

e.g. lo2s --list-knobs shows the following twice

  Intel_PKG_C2_RESIDENCY
  Intel_PKG_C3_RESIDENCY
  Intel_PKG_C6_RESIDENCY

Could also be an x86_adapt issue because Intel_PKG_C7_RESIDENCY is listed as CPU knob but Intel_PKG_C7_RESIDENCY_deprecated is listed as node knob.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.