mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: make --num-cpus work in gem5 userland and fs_bigLITTLE.py
This commit is contained in:
7
run
7
run
@@ -479,6 +479,7 @@ Extra options to append at the end of the emulator command line.
|
||||
cmd.extend([
|
||||
self.env['gem5_se_file'], LF,
|
||||
'--cmd', self.env['image'], LF,
|
||||
'--num-cpus', str(self.env['cpus']), LF,
|
||||
# We have to use cpu[0] here because on multi-cpu workloads,
|
||||
# cpu[1] and higher use workload as a proxy to cpu[0].workload.
|
||||
# as can be seen from the config.ini.
|
||||
@@ -498,10 +499,10 @@ Extra options to append at the end of the emulator command line.
|
||||
extra_emulator_args.extend(['-r', str(cpt_dirs_sorted_by_tick.index(cpt_dir) + 1)])
|
||||
cmd.extend([
|
||||
self.env['gem5_fs_file'], LF,
|
||||
'--num-cpus', str(self.env['cpus']), LF,
|
||||
'--disk-image', self.env['disk_image'], LF,
|
||||
'--kernel', self.env['image'], LF,
|
||||
'--mem-size', memory, LF,
|
||||
'--num-cpus', str(self.env['cpus']), LF,
|
||||
'--script', self.env['gem5_readfile_file'], LF,
|
||||
])
|
||||
if self.env['arch'] == 'x86_64':
|
||||
@@ -565,11 +566,11 @@ Extra options to append at the end of the emulator command line.
|
||||
'arm',
|
||||
'fs_bigLITTLE.py'
|
||||
), LF,
|
||||
'--big-cpus', '2', LF,
|
||||
'--big-cpus', str((self.env['cpus'] + 1) // 2), LF,
|
||||
'--cpu-type', cpu_type, LF,
|
||||
'--disk', self.env['disk_image'], LF,
|
||||
'--kernel', self.env['image'], LF,
|
||||
'--little-cpus', '2', LF,
|
||||
'--little-cpus', str(self.env['cpus'] // 2), LF,
|
||||
])
|
||||
if self.env['dtb']:
|
||||
cmd.extend([
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// https://cirosantilli.com/linux-kernel-module-cheat#cpp-multithreading
|
||||
//
|
||||
// http://stackoverflow.com/questions/7686939/c-simple-return-value-from-stdthread
|
||||
// http://stackoverflow.com/questions/28950835/c-error-no-type-named-type-in-class-stdresult-ofvoid-stdunordered
|
||||
// http://stackoverflow.com/questions/21048906/stdthread-pass-by-reference-calls-copy-constructor
|
||||
|
||||
Reference in New Issue
Block a user