qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modification to single Threaded Multi-Core emulation in TCG


From: Arnabjyoti Kalita
Subject: Re: Modification to single Threaded Multi-Core emulation in TCG
Date: Fri, 14 Jan 2022 00:50:30 +0530

Dear Alex,

Thank you for your answer.

The gist of what I'm trying to do is to perform replay of a multi-core
system (where-in I use KVM mode in QEMU to record TSC values for each
core). I use the recorded TSC values to make decisions on which CPU
should go first, as well as keep the round-robin implementation going.
Whenever the rdtsc instruction executes for a CPU, I read the next
recorded TSC values for each CPU and make the next scheduling
decision. I try to ensure that the TSC values are read in sequence.

Best Regards,
Arnabjyoti Kalita



On Tue, Jan 11, 2022 at 11:03 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Arnabjyoti Kalita <akalita@cs.stonybrook.edu> writes:
>
> > Hello all,
> >
> > I have a requirement to use the single-threaded implementation of
> > multi-core emulation in TCG. This schedules the multiple cores in a
> > round robin fashion from what I understand, at the end of a set timer
> > interval.
>
> --accel tcg,thread=single will force the round robin scheduling you need.
>
> > I want to make a modification to this approach. I would like to
> > schedule the vCPUs in a round-robin fashion but at the end of every
> > Translation Block (TB)'s execution.  So, instead of having a timer to
> > switch the vCPU, I would like to forcefully switch the vCPU when a
> > translation block has been executed.
>
> as a gross hack you can run with -d nochain and then ensure cpu_tb_exec
> does the equivalent of rr_kick_next_cpu after you execute the block.
>
> However before you go down this route I do have to ask why? What is it
> you are trying to achieve with this running mode?
>
> > What would be the best way to implement this approach? Do I need to
> > raise an interrupt at the end of the execution of every TB ? Where in
> > code should I start making changes ? I do not want the functionality
> > of the original TCG execution driver to change.
> >
> > Best Regards,
> > Arnabjyoti Kalita
>
>
> --
> Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]