SMT implementation on gem5 in SE mode #282
Closed
ishitachaturvedi
started this conversation in
gem5-dev
Replies: 1 comment
-
This is really more of an issue, or potential issue, so I opened up one here: #338. SMT should work in gem5 SE mode. I'm going to close this discussion and try to replicate the issue as highlighted in #338, so let's continue discussion there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement SMT on gem5. Gem5 currently supports pthreads in SE mode, where each core runs one thread.
I did the following tests:
The run command I used was:
build/X86/gem5.opt se_SMT.py --cmd=test_codes/single_thread --caches --l1d_size=32kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8 --l2cache --cpu-type=DerivO3CPU --mem-type=DDR4_2400_16x4 --mem-size=64GB --mem-channels=2 --num-cpus=7 --smt
To attach 2 workloads to 2 threads I did:
This test ran fine, and the output was expected.
The run command I used was:
build/X86/gem5.opt se_2_SMT_1_workload.py --cmd=test_codes/hello_pthreads --caches --l1d_size=32kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8 --l2cache --cpu-type=DerivO3CPU --mem-type=DDR4_2400_16x4 --mem-size=64GB --mem-channels=2 --num-cpus=7 --smt
To give 2 SMT threads the same workload I did:
On running this, I got the error: build/X86/sim/process.cc:142: fatal: fatal condition !ret_pair.second occurred: _pid 100 is already used
build/X86/gem5.opt se_1_workload.py --cmd=test_codes/hello_pthreads --caches --l1d_size=32kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8 --l2cache --cpu-type=DerivO3CPU --mem-type=DDR4_2400_16x4 --mem-size=64GB --mem-channels=2 --num-cpus=7 --smt
While this run had no errors, I think pthers_join is ignored, because the output looks like:
Core0:
SMT0: Workload A
SMT1: Workload B
Core1:
SMT0: Workload A
SMT1: Workload B
The run command I used was:
build/X86/gem5.opt se_SMT.py --cmd=test_codes/hello_pthreads --caches --l1d_size=32kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8 --l2cache --cpu-type=DerivO3CPU --mem-type=DDR4_2400_16x4 --mem-size=64GB --mem-channels=2 --num-cpus=7 --smt
I made the following change to the config file to do this:
This configuration did not support pthread_exit and pthread_join. When these are commented out all the print statements are displayed but the simulation gets stuck after the print statements.
I want to fix case 2 and have 1 workload be processed by 2 SMT threads on 1 core and case 4, for pthreads processes not to get stuck.
I am attaching the test files and all the config files. Please let me know how I can fix this. Thanks! @powerjg
Pthreads_error.zip
Beta Was this translation helpful? Give feedback.
All reactions