[Top][All Lists]

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

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page tab

From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

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


reply via email to

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