Hi Taeklim,

On Wed, Nov 28, 2018 at 4:04 PM Taeklim Kim <[email protected]> wrote:

> 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.


> 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


>
>
> Best,
>
> Taeklim
> ᐧ
> ᐧ
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to