From: "Alex Bennée" <alex.bennee@linaro.org>
To: Frederic Konrad <fred.konrad@greensocs.com>
Cc: mttcg@listserver.greensocs.com,
Peter Maydell <peter.maydell@linaro.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Alexander Graf <agraf@suse.de>,
qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] CPU TLB flush with multithread TCG.
Date: Wed, 11 Feb 2015 03:33:22 +0000 [thread overview]
Message-ID: <87pp9hrukd.fsf@linaro.org> (raw)
In-Reply-To: <54D885A0.3080609@greensocs.com>
Frederic Konrad <fred.konrad@greensocs.com> writes:
> Hi everybody,
>
> In multithread tlb_flush is broken as CPUA can flush an other CPUB and
> CPUB can be
> executing code, and fixing this can be quite hard:
> * We need to exit the CPU which is flushed.
> * Makes sure the CPU is stopped.
> * Then we can flush tlb.
> The big issues are:
> * Two threads can be doing a flush at the same time.
> * Something can restart the CPU during the flush.
>
> A better idea I think is that instead of flushing tlb we can put a flag
> in CPUState such
> as flush_request and ask the cpu to exit.
> Then later once the CPU is exited we can flush tlbs if flush_request is set.
> It will ensure that the CPU won't execute code as it's associated thread
> will be
> flushing.
>
> Can this work?
Does this imply deferring the work? Surely if we don't flush when
instructed things could break down very quickly?
>
> Thanks,
> Fred
--
Alex Bennée
next prev parent reply other threads:[~2015-02-11 3:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 10:02 [Qemu-devel] CPU TLB flush with multithread TCG Frederic Konrad
2015-02-11 3:33 ` Alex Bennée [this message]
2015-02-11 8:35 ` Mark Burton
2015-02-11 8:42 ` Frederic Konrad
2015-02-11 17:17 ` Frederic Konrad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp9hrukd.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=agraf@suse.de \
--cc=fred.konrad@greensocs.com \
--cc=jan.kiszka@siemens.com \
--cc=mttcg@listserver.greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.