qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Vijaya Kumar K <vijayak@caviumnetworks.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	Juan Quintela <quintela@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
	Vijay Kilari <vijay.kilari@gmail.com>,
	Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
	Vijaya Kumar K <vijayak@cavium.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime
Date: Mon, 13 Jun 2016 12:06:20 +0200	[thread overview]
Message-ID: <fb4bf179-fc78-5540-53ee-d572148633e5@redhat.com> (raw)
In-Reply-To: <CAFEAcA_0HXxBO7c0UjxuWbYgQv+nmP6JO7pHKKK8O53CWdG_fg@mail.gmail.com>



On 13/06/2016 11:36, Peter Maydell wrote:
>>>  /* The bottom level has pointers to PageDesc */
>>> >> -static void *l1_map[V_L1_SIZE];
>>> >> +static void *l1_map;
>> >
>> > You can make this array have a static V_L2_SIZE * 16 size too.  Peter,
>> > what do you think?
> I don't know this code well enough to have an informed view,
> but we only allocate this once at startup, right? I'm not sure
> why making it a static array would be better?

It makes accesses faster by avoiding a pointer load.  On one hand it
might be just microoptimization, on the other hand... death by one
thousand papercuts...

Paolo

  reply	other threads:[~2016-06-13 10:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  9:08 [Qemu-devel] [RFC PATCH v1 0/4] ARM/AARCH64: Runtime page size computation vijayak
2016-06-13  9:08 ` [Qemu-devel] [RFC PATCH v1 1/4] migration: Remove static allocation of xzblre cache buffer vijayak
2016-06-13  9:08 ` [Qemu-devel] [RFC PATCH v1 2/4] exec.c: Remove static allocation of sub_section of sub_page vijayak
2016-06-13  9:32   ` Peter Maydell
2016-06-13  9:52   ` Paolo Bonzini
2016-06-17 10:14     ` Vijay Kilari
2016-06-17 10:29       ` Peter Maydell
2016-06-13  9:08 ` [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime vijayak
2016-06-13  9:25   ` Paolo Bonzini
2016-06-13  9:36     ` Peter Maydell
2016-06-13 10:06       ` Paolo Bonzini [this message]
2016-06-21 11:53     ` Peter Maydell
2016-06-21 11:57       ` Paolo Bonzini
2016-06-13  9:08 ` [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type vijayak
2016-06-13  9:25   ` Paolo Bonzini
2016-06-13  9:43   ` Peter Maydell
2016-06-13 10:10     ` Peter Maydell
2016-06-14 11:14       ` Vijay Kilari
2016-06-14 11:36         ` Peter Maydell
2016-06-16 19:42           ` Richard Henderson
2016-06-17 10:20             ` Vijay Kilari
2016-06-17 10:30               ` Peter Maydell
2016-06-17 10:39                 ` Vijay Kilari
2016-06-17 10:42                   ` Peter Maydell
2016-06-21 11:55               ` Peter Maydell

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=fb4bf179-fc78-5540-53ee-d572148633e5@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=Vijaya.Kumar@caviumnetworks.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=vijay.kilari@gmail.com \
    --cc=vijayak@cavium.com \
    --cc=vijayak@caviumnetworks.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).