gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Emulating sleep system call in Gem5 SE mode

VP
VIPIN PATEL
Wed, Jul 13, 2022 7:11 AM

Hi all,

The Gem5 v20 does not emulate sleep system calls in SE mode.
A few applications in my experiment use sleep call.
Emulating the system call requires modification to  "syscall_emul.cc" file
(implementation of system call) and "syscall_tbl64.cc" ( update the mapping
for emulated function).

Is it a good choice to emulate the system call or switch to FS mode for
these applications?

Regards,
Vipin

Hi all, The Gem5 v20 does not emulate sleep system calls in SE mode. A few applications in my experiment use sleep call. Emulating the system call requires modification to "syscall_emul.cc" file (implementation of system call) and "syscall_tbl64.cc" ( update the mapping for emulated function). Is it a good choice to emulate the system call or switch to FS mode for these applications? Regards, Vipin
BB
Bobby Bruce
Wed, Jul 13, 2022 10:03 PM

Hey Vipin,

I'm stating the obvious here but you really only have two choices here:

  1. Implement the Syscall/Syscalls you need (if you do this, please share
    the implemented syscalls with the community:
    https://www.gem5.org/contributing ).
  2. Use Full-System (FS) mode instead of Syscall Emulation (SE) mode.

Not knowing exactly what you're wanting to do here, I can't tell you which
would be better for your work. FS-mode will be more accurate regardless as
to what you're trying to emulate but it's considerably slower than SE mode.
SE mode is faster but it's only useful when you don't need to emulate OS
level behavior (for example, generating random traffic to test a simulated
memory system).

Kind regards,
Bobby

Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL patelvipin11@gmail.com wrote:

Hi all,

The Gem5 v20 does not emulate sleep system calls in SE mode.
A few applications in my experiment use sleep call.
Emulating the system call requires modification to  "syscall_emul.cc" file
(implementation of system call) and "syscall_tbl64.cc" ( update the mapping
for emulated function).

Is it a good choice to emulate the system call or switch to FS mode for
these applications?

Regards,
Vipin


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hey Vipin, I'm stating the obvious here but you really only have two choices here: 1) Implement the Syscall/Syscalls you need (if you do this, please share the implemented syscalls with the community: https://www.gem5.org/contributing ). 2) Use Full-System (FS) mode instead of Syscall Emulation (SE) mode. Not knowing exactly what you're wanting to do here, I can't tell you which would be better for your work. FS-mode will be more accurate regardless as to what you're trying to emulate but it's considerably slower than SE mode. SE mode is faster but it's only useful when you don't need to emulate OS level behavior (for example, generating random traffic to test a simulated memory system). Kind regards, Bobby -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL <patelvipin11@gmail.com> wrote: > Hi all, > > The Gem5 v20 does not emulate sleep system calls in SE mode. > A few applications in my experiment use sleep call. > Emulating the system call requires modification to "syscall_emul.cc" file > (implementation of system call) and "syscall_tbl64.cc" ( update the mapping > for emulated function). > > Is it a good choice to emulate the system call or switch to FS mode for > these applications? > > Regards, > Vipin > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
VP
VIPIN PATEL
Thu, Jul 14, 2022 7:08 AM

Hi Bobby,

I am using the Synchrobench benchmark suite (
https://github.com/gramoli/synchrobench).
The application in the benchmark uses nanosleep call (
https://github.com/gramoli/synchrobench/blob/f25adff34dde3053be4874a6a9abad049a76ec70/c-cpp/src/hashtables/lockbased-ht/test.c#L526
).

Regards,
Vipin

On Thu, Jul 14, 2022 at 3:33 AM Bobby Bruce bbruce@ucdavis.edu wrote:

Hey Vipin,

I'm stating the obvious here but you really only have two choices here:

  1. Implement the Syscall/Syscalls you need (if you do this, please share
    the implemented syscalls with the community:
    https://www.gem5.org/contributing ).
  2. Use Full-System (FS) mode instead of Syscall Emulation (SE) mode.

Not knowing exactly what you're wanting to do here, I can't tell you which
would be better for your work. FS-mode will be more accurate regardless as
to what you're trying to emulate but it's considerably slower than SE mode.
SE mode is faster but it's only useful when you don't need to emulate OS
level behavior (for example, generating random traffic to test a simulated
memory system).

Kind regards,
Bobby

Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL patelvipin11@gmail.com
wrote:

Hi all,

The Gem5 v20 does not emulate sleep system calls in SE mode.
A few applications in my experiment use sleep call.
Emulating the system call requires modification to  "syscall_emul.cc"
file (implementation of system call) and "syscall_tbl64.cc" ( update the
mapping for emulated function).

Is it a good choice to emulate the system call or switch to FS mode for
these applications?

Regards,
Vipin


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi Bobby, I am using the Synchrobench benchmark suite ( https://github.com/gramoli/synchrobench). The application in the benchmark uses nanosleep call ( https://github.com/gramoli/synchrobench/blob/f25adff34dde3053be4874a6a9abad049a76ec70/c-cpp/src/hashtables/lockbased-ht/test.c#L526 ). Regards, Vipin On Thu, Jul 14, 2022 at 3:33 AM Bobby Bruce <bbruce@ucdavis.edu> wrote: > Hey Vipin, > > I'm stating the obvious here but you really only have two choices here: > > 1) Implement the Syscall/Syscalls you need (if you do this, please share > the implemented syscalls with the community: > https://www.gem5.org/contributing ). > 2) Use Full-System (FS) mode instead of Syscall Emulation (SE) mode. > > Not knowing exactly what you're wanting to do here, I can't tell you which > would be better for your work. FS-mode will be more accurate regardless as > to what you're trying to emulate but it's considerably slower than SE mode. > SE mode is faster but it's only useful when you don't need to emulate OS > level behavior (for example, generating random traffic to test a simulated > memory system). > > Kind regards, > Bobby > -- > > Dr. Bobby R. Bruce > Room 3050, > Kemper Hall, UC Davis > Davis, > CA, 95616 > > web: https://www.bobbybruce.net > > > On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL <patelvipin11@gmail.com> > wrote: > >> Hi all, >> >> The Gem5 v20 does not emulate sleep system calls in SE mode. >> A few applications in my experiment use sleep call. >> Emulating the system call requires modification to "syscall_emul.cc" >> file (implementation of system call) and "syscall_tbl64.cc" ( update the >> mapping for emulated function). >> >> Is it a good choice to emulate the system call or switch to FS mode for >> these applications? >> >> Regards, >> Vipin >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-leave@gem5.org >> > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
BB
Bobby Bruce
Thu, Jul 14, 2022 6:06 PM

I'm not sure what research you're trying to undertake so I can't make the
decision for you. Though, when in doubt, use FS mode. SE mode simulates
less stuff less accurately.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Thu, Jul 14, 2022 at 12:11 AM VIPIN PATEL patelvipin11@gmail.com wrote:

Hi Bobby,

I am using the Synchrobench benchmark suite (
https://github.com/gramoli/synchrobench).
The application in the benchmark uses nanosleep call (
https://github.com/gramoli/synchrobench/blob/f25adff34dde3053be4874a6a9abad049a76ec70/c-cpp/src/hashtables/lockbased-ht/test.c#L526
).

Regards,
Vipin

On Thu, Jul 14, 2022 at 3:33 AM Bobby Bruce bbruce@ucdavis.edu wrote:

Hey Vipin,

I'm stating the obvious here but you really only have two choices here:

  1. Implement the Syscall/Syscalls you need (if you do this, please share
    the implemented syscalls with the community:
    https://www.gem5.org/contributing ).
  2. Use Full-System (FS) mode instead of Syscall Emulation (SE) mode.

Not knowing exactly what you're wanting to do here, I can't tell you
which would be better for your work. FS-mode will be more accurate
regardless as to what you're trying to emulate but it's considerably slower
than SE mode. SE mode is faster but it's only useful when you don't need to
emulate OS level behavior (for example, generating random traffic to test a
simulated memory system).

Kind regards,
Bobby

Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL patelvipin11@gmail.com
wrote:

Hi all,

The Gem5 v20 does not emulate sleep system calls in SE mode.
A few applications in my experiment use sleep call.
Emulating the system call requires modification to  "syscall_emul.cc"
file (implementation of system call) and "syscall_tbl64.cc" ( update the
mapping for emulated function).

Is it a good choice to emulate the system call or switch to FS mode for
these applications?

Regards,
Vipin


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

I'm not sure what research you're trying to undertake so I can't make the decision for you. Though, when in doubt, use FS mode. SE mode simulates less stuff less accurately. -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Thu, Jul 14, 2022 at 12:11 AM VIPIN PATEL <patelvipin11@gmail.com> wrote: > Hi Bobby, > > I am using the Synchrobench benchmark suite ( > https://github.com/gramoli/synchrobench). > The application in the benchmark uses nanosleep call ( > https://github.com/gramoli/synchrobench/blob/f25adff34dde3053be4874a6a9abad049a76ec70/c-cpp/src/hashtables/lockbased-ht/test.c#L526 > ). > > Regards, > Vipin > > On Thu, Jul 14, 2022 at 3:33 AM Bobby Bruce <bbruce@ucdavis.edu> wrote: > >> Hey Vipin, >> >> I'm stating the obvious here but you really only have two choices here: >> >> 1) Implement the Syscall/Syscalls you need (if you do this, please share >> the implemented syscalls with the community: >> https://www.gem5.org/contributing ). >> 2) Use Full-System (FS) mode instead of Syscall Emulation (SE) mode. >> >> Not knowing exactly what you're wanting to do here, I can't tell you >> which would be better for your work. FS-mode will be more accurate >> regardless as to what you're trying to emulate but it's considerably slower >> than SE mode. SE mode is faster but it's only useful when you don't need to >> emulate OS level behavior (for example, generating random traffic to test a >> simulated memory system). >> >> Kind regards, >> Bobby >> -- >> >> Dr. Bobby R. Bruce >> Room 3050, >> Kemper Hall, UC Davis >> Davis, >> CA, 95616 >> >> web: https://www.bobbybruce.net >> >> >> On Wed, Jul 13, 2022 at 12:15 AM VIPIN PATEL <patelvipin11@gmail.com> >> wrote: >> >>> Hi all, >>> >>> The Gem5 v20 does not emulate sleep system calls in SE mode. >>> A few applications in my experiment use sleep call. >>> Emulating the system call requires modification to "syscall_emul.cc" >>> file (implementation of system call) and "syscall_tbl64.cc" ( update the >>> mapping for emulated function). >>> >>> Is it a good choice to emulate the system call or switch to FS mode for >>> these applications? >>> >>> Regards, >>> Vipin >>> _______________________________________________ >>> gem5-users mailing list -- gem5-users@gem5.org >>> To unsubscribe send an email to gem5-users-leave@gem5.org >>> >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-leave@gem5.org >> > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >