Discussion:
Question about Multitasking in Full System mode Single CPU
(too old to reply)
Taeklim Kim
2018-11-29 00:04:34 UTC
Permalink
Hi all,

I'm using the Full system mode to run 2 benchmarks(SPEC) in single core,
and I tried to check is there any context switch happens.

But I think Gem5 fs mode doesn't support multiple workload in single core,
because I saw that 'flushTLBs()' function in 'src/cpu/base.cc' didn't
called when I run two benchmarks.

Does the full system mode support multiple workloads in single core? Or,
let me know if my opinion is wrong. Also, I wish to know if there is
context switch, 'flushTLBs()' function called?


Best,

Taeklim
ᐧ
ᐧ
Jason Lowe-Power
2018-11-29 01:07:36 UTC
Permalink
Hi Taeklim,
Post by Taeklim Kim
Hi all,
I'm using the Full system mode to run 2 benchmarks(SPEC) in single core,
and I tried to check is there any context switch happens.
But I think Gem5 fs mode doesn't support multiple workload in single core,
because I saw that 'flushTLBs()' function in 'src/cpu/base.cc' didn't
called when I run two benchmarks.
In full system (FS) mode gem5 functions *exactly like a real system*. So,
the OS controls what process gets access to the CPU and when. There are
definitely context switches.
Post by Taeklim Kim
Does the full system mode support multiple workloads in single core? Or,
let me know if my opinion is wrong. Also, I wish to know if there is
context switch, 'flushTLBs()' function called?
Yes. If your OS supports multiple processes on a core, then it will context
switch between them on a single core in gem5. It looks like the flushTLB
method is only used by Python run scripts to clear the TLB (e.g., for
swapping CPU models). It is *not* used to emulate the instructions which
flush the TLB. For instance, in x86, when you write the CR3 the TLB should
be flushed (or not if you have ASIDs). I think the function you are looking
for is TLB::flushAll() which is called from many places in the
architecture-specific code. (see `grep -r flushAll src/`).

Cheers,
Jason
Post by Taeklim Kim
Best,
Taeklim
ᐧ
ᐧ
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Loading...