Jayneel recently submitted a patch that allows se.py to handle
multi-threading. I have a couple more ideas for some patches related
to multi-threading in se mode.

1. Most people probably use the m5threads library to do multithreading
in syscall emulation mode. There is a comment in the README
distributed with m5threads that basically says it should be built such
that it avoids making futex system calls (see below). At AMD, where
I'm currently interning, we have a patch of code that Dan Sanchez (the
m5threads author) wrote that basically implements the futex system
call. It seems like it would be beneficial to push this to the public
repo so that m5threads will work with or without futexes.

"This library should compile with GNU toolchains implementing
LinuxThreads (Linux <=2.4 or 2.6) or NPTL (2.6 only) pthreads. If you
compile it with an NPTL glibc, you may get futex() system calls if you
try to do concurrent calls to multithreaded-safe glibc functions (e.g.
printf). These are unimplemented in M5. To avoid them, enclose these
calls in a global lock. Additionally, NPTL apps tend to use more
system calls, so it is recommended to use M5 with a glibc compiled
with LinuxThreads. Performance should be practically identical with
both versions, as we are substituting the threading library."

2. There are regression tests for m5threads that run on the SPARC ISA.
It would be nice to have a regression test for m5threads that runs on
x86. Also, if people are amenable to adding the futex system call, it
would be nice if the m5threads regression tester tested that as well.

Thanks,
Marc
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to