From: "Emilio G. Cota" <cota@braap.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Chris Wulff <crwulff@gmail.com>,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
David Hildenbrand <david@redhat.com>,
James Hogan <jhogan@kernel.org>,
Anthony Green <green@moxielogic.com>,
Palmer Dabbelt <palmer@sifive.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Max Filippov <jcmvbkbc@gmail.com>, Michael Clark <mjc@sifive.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>, Marek Vasut <marex@denx.de>,
Alexander Graf <agraf@suse.de>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Pavel Dovgalyuk <dovgaluk@ispras.ru>,
Andrzej Zaborowski <balrogg@gmail.com>,
Artyom Tarasenko <atar4qemu@gmail.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Fabien Chouteau <chouteau@adacore.com>,
qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
Alistair Francis <alistair23@gmail.com>,
Stafford Horne <shorne@gmail.com>,
David Gibson <david@gibson.dropbear.id.au>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Cornelia Huck <cohuck@redhat.com>,
Laurent Vivier <laurent@vivier.eu>,
Michael Walle <michael@walle.cc>,
qemu-ppc@nongnu.org, Aleksandar Markovic <amarkovic@wavecomp.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [Qemu-arm] [RFC v4 00/71] per-CPU locks
Date: Mon, 29 Oct 2018 11:47:28 -0400 [thread overview]
Message-ID: <20181029154728.GA17805@flamenco> (raw)
In-Reply-To: <878t2j21ko.fsf@linaro.org>
On Sat, Oct 27, 2018 at 10:14:47 +0100, Alex Bennée wrote:
>
> Emilio G. Cota <cota@braap.org> writes:
>
> > [I forgot to add the cover letter to git send-email; here it is]
> >
> > v3: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg04179.html
> >
> > "Why is this an RFC?" See v3 link above. Also, see comment at
> > the bottom of this message regarding the last patch of this series.
>
> I'm also seeing his hang on check-tcg, specifically qemu-aarch64 ./tests/linux-test
Thanks for reporting. The last patch in the series is the one
that causes the hang. I didn't test that patch much, since I
did not intend to get it merged.
Over the weekend I had a bit of time to think about an actual fix, i.e.
how to reduce safe work calls for TLB invalidations. The idea is to check
whether the remote invalidation is necessary at all; we can take the remote
tlb's lock, and check whether the address we want to invalidate has been
read by the remote CPU since its latest flush. On some quick tests
booting an aarch64 system I measured that only up to ~2% of remote
invalidations are actually necessary.
I just did a search on google scholar and found a similar approach
to reduce remote TLB shootdowns on ARM, this time for hardware.
This paper
"TLB Shootdown Mitigation for Low-Power Many-Core Servers with
L1 Virtual Caches"
https://dl.acm.org/citation.cfm?id=3202975
addresses the issue by employing bloom filters in hardware to
determine whether an address has been accessed by a TLB before
performing an invalidation (and the corresponding icache flush).
In software, using a per-TLB hash table might be enough. I'll try
to have something ready for v5.
Thanks,
Emilio
next prev parent reply other threads:[~2018-10-29 15:47 UTC|newest]
Thread overview: 173+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 14:45 [Qemu-devel] [RFC v4 01/71] cpu: convert queued work to a QSIMPLEQ Emilio G. Cota
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 02/71] cpu: rename cpu->work_mutex to cpu->lock Emilio G. Cota
2018-10-29 15:22 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 03/71] cpu: introduce cpu_mutex_lock/unlock Emilio G. Cota
2018-10-26 14:40 ` Richard Henderson
2018-10-29 15:54 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 04/71] cpu: make qemu_work_cond per-cpu Emilio G. Cota
2018-10-26 14:45 ` Richard Henderson
2018-10-30 12:27 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 05/71] cpu: move run_on_cpu to cpus-common Emilio G. Cota
2018-10-29 16:34 ` Alex Bennée
2018-10-29 21:39 ` Emilio G. Cota
2018-10-30 8:28 ` Paolo Bonzini
2018-10-30 12:23 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 06/71] cpu: introduce process_queued_cpu_work_locked Emilio G. Cota
2018-10-29 16:35 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 07/71] tcg-runtime: define helper_cpu_halted_set Emilio G. Cota
2018-10-26 14:57 ` Richard Henderson
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 08/71] ppc: convert to helper_cpu_halted_set Emilio G. Cota
2018-10-26 14:57 ` Richard Henderson
2018-10-31 11:35 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 09/71] cris: " Emilio G. Cota
2018-10-26 14:58 ` Richard Henderson
2018-10-31 11:42 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 10/71] hppa: " Emilio G. Cota
2018-10-26 14:58 ` Richard Henderson
2018-10-31 11:43 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 11/71] m68k: " Emilio G. Cota
2018-10-26 14:59 ` Richard Henderson
2018-10-31 11:43 ` Alex Bennée
2018-10-31 12:27 ` Laurent Vivier
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 12/71] alpha: " Emilio G. Cota
2018-10-26 15:00 ` Richard Henderson
2018-10-31 11:45 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 13/71] microblaze: " Emilio G. Cota
2018-10-26 15:00 ` Richard Henderson
2018-10-31 11:47 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 14/71] cpu: define cpu_halted helpers Emilio G. Cota
2018-10-31 12:04 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 15/71] tcg-runtime: convert to cpu_halted_set Emilio G. Cota
2018-10-26 15:01 ` Richard Henderson
2018-10-31 11:56 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 16/71] arm: convert to cpu_halted Emilio G. Cota
2018-10-31 12:15 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 17/71] ppc: " Emilio G. Cota
2018-10-26 15:02 ` Richard Henderson
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 18/71] sh4: " Emilio G. Cota
2018-10-31 13:54 ` Alex Bennée
2018-10-31 16:26 ` Emilio G. Cota
2018-10-31 16:38 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 19/71] i386: " Emilio G. Cota
2018-10-31 14:20 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 20/71] lm32: " Emilio G. Cota
2018-10-31 14:20 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 21/71] m68k: " Emilio G. Cota
2018-10-31 12:29 ` Laurent Vivier
2018-10-31 16:14 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 22/71] mips: " Emilio G. Cota
2018-10-31 14:22 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 23/71] riscv: " Emilio G. Cota
2018-10-26 15:03 ` Richard Henderson
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 24/71] s390x: " Emilio G. Cota
2018-10-31 16:13 ` Alex Bennée
2018-10-31 16:38 ` Emilio G. Cota
2018-10-31 16:56 ` Alex Bennée
2018-11-09 13:47 ` Cornelia Huck
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 25/71] sparc: " Emilio G. Cota
2018-10-31 16:13 ` Alex Bennée
2018-10-25 14:45 ` [Qemu-devel] [RFC v4 26/71] xtensa: " Emilio G. Cota
2018-10-31 16:13 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 27/71] gdbstub: " Emilio G. Cota
2018-10-31 16:14 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 28/71] openrisc: " Emilio G. Cota
2018-10-31 16:14 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 29/71] cpu-exec: " Emilio G. Cota
2018-10-26 15:04 ` Richard Henderson
2018-10-31 16:16 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 30/71] cpu: define cpu_interrupt_request helpers Emilio G. Cota
2018-10-26 15:07 ` Richard Henderson
2018-10-31 16:21 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 31/71] ppc: use cpu_reset_interrupt Emilio G. Cota
2018-10-31 16:21 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 32/71] exec: " Emilio G. Cota
2018-10-26 15:07 ` Richard Henderson
2018-10-31 16:33 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 33/71] i386: " Emilio G. Cota
2018-10-31 16:34 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 34/71] s390x: " Emilio G. Cota
2018-10-31 16:34 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 35/71] openrisc: " Emilio G. Cota
2018-10-31 16:35 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 36/71] arm: convert to cpu_interrupt_request Emilio G. Cota
2018-10-26 13:39 ` Alex Bennée
2018-10-26 16:31 ` Emilio G. Cota
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 37/71] i386: " Emilio G. Cota
2018-10-26 15:08 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 38/71] i386/kvm: " Emilio G. Cota
2018-10-26 15:10 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 39/71] i386/hax-all: " Emilio G. Cota
2018-10-26 15:11 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 40/71] i386/whpx-all: " Emilio G. Cota
2018-10-26 15:12 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 41/71] i386/hvf: convert to cpu_request_interrupt Emilio G. Cota
2018-10-26 15:12 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 42/71] ppc: convert to cpu_interrupt_request Emilio G. Cota
2018-10-26 15:45 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 43/71] sh4: " Emilio G. Cota
2018-10-31 16:36 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 44/71] cris: " Emilio G. Cota
2018-10-31 16:36 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 45/71] hppa: " Emilio G. Cota
2018-10-31 16:36 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 46/71] lm32: " Emilio G. Cota
2018-10-31 16:36 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 47/71] m68k: " Emilio G. Cota
2018-10-31 12:32 ` Laurent Vivier
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 48/71] mips: " Emilio G. Cota
2018-10-26 15:45 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 49/71] nios: " Emilio G. Cota
2018-10-31 16:37 ` Alex Bennée
2018-10-31 16:38 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 50/71] s390x: " Emilio G. Cota
2018-10-31 16:39 ` Alex Bennée
2018-11-09 13:49 ` Cornelia Huck
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 51/71] alpha: " Emilio G. Cota
2018-10-31 16:39 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 52/71] moxie: " Emilio G. Cota
2018-10-31 16:39 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 53/71] sparc: " Emilio G. Cota
2018-10-31 16:40 ` Alex Bennée
2018-10-31 16:42 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 54/71] openrisc: " Emilio G. Cota
2018-10-31 16:43 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 55/71] unicore32: " Emilio G. Cota
2018-10-31 16:44 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 56/71] microblaze: " Emilio G. Cota
2018-10-31 16:44 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 57/71] accel/tcg: " Emilio G. Cota
2018-10-26 15:48 ` Richard Henderson
2018-10-31 16:46 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 58/71] cpu: call .cpu_has_work with the CPU lock held Emilio G. Cota
2018-10-26 15:48 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 59/71] cpu: introduce cpu_has_work_with_iothread_lock Emilio G. Cota
2018-10-26 15:51 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 60/71] ppc: convert to cpu_has_work_with_iothread_lock Emilio G. Cota
2018-10-26 15:53 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 61/71] mips: " Emilio G. Cota
2018-10-26 15:54 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 62/71] s390x: " Emilio G. Cota
2018-10-26 15:54 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 63/71] riscv: " Emilio G. Cota
2018-10-26 15:54 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 64/71] sparc: " Emilio G. Cota
2018-10-26 15:54 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 65/71] xtensa: " Emilio G. Cota
2018-10-26 15:54 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 66/71] cpu: protect most CPU state with cpu->lock Emilio G. Cota
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 67/71] cpus-common: release BQL earlier in run_on_cpu Emilio G. Cota
2018-10-26 15:59 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 68/71] cpu: add async_run_on_cpu_no_bql Emilio G. Cota
2018-10-26 16:00 ` Richard Henderson
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 69/71] cputlb: queue async flush jobs without the BQL Emilio G. Cota
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 70/71] cpus-common: move exclusive_idle higher in the file Emilio G. Cota
2018-10-26 16:06 ` Richard Henderson
2018-10-29 15:21 ` Alex Bennée
2018-10-25 14:46 ` [Qemu-devel] [RFC v4 71/71] cpus-common: wait on the CPU lock for exclusive work completion Emilio G. Cota
2018-10-29 15:31 ` Alex Bennée
2018-10-25 15:11 ` [Qemu-devel] [RFC v4 00/71] per-CPU locks Emilio G. Cota
2018-10-27 9:14 ` [Qemu-devel] [Qemu-arm] " Alex Bennée
2018-10-29 15:47 ` Emilio G. Cota [this message]
2018-10-29 16:00 ` Alex Bennée
2018-10-29 15:39 ` [Qemu-devel] [RFC v4 01/71] cpu: convert queued work to a QSIMPLEQ Alex Bennée
2018-10-29 15:55 ` Emilio G. Cota
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=20181029154728.GA17805@flamenco \
--to=cota@braap.org \
--cc=agraf@suse.de \
--cc=alex.bennee@linaro.org \
--cc=alistair23@gmail.com \
--cc=amarkovic@wavecomp.com \
--cc=atar4qemu@gmail.com \
--cc=aurelien@aurel32.net \
--cc=balrogg@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=chouteau@adacore.com \
--cc=cohuck@redhat.com \
--cc=crwulff@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=dovgaluk@ispras.ru \
--cc=ehabkost@redhat.com \
--cc=green@moxielogic.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=jcmvbkbc@gmail.com \
--cc=jhogan@kernel.org \
--cc=kbastian@mail.uni-paderborn.de \
--cc=laurent@vivier.eu \
--cc=marex@denx.de \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=mjc@sifive.com \
--cc=palmer@sifive.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sagark@eecs.berkeley.edu \
--cc=shorne@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).