From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg8k5-0002ZK-PT for qemu-devel@nongnu.org; Thu, 09 Apr 2015 05:27:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yg8k1-0007dg-Lh for qemu-devel@nongnu.org; Thu, 09 Apr 2015 05:27:21 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:35886 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg8k1-0007cf-GC for qemu-devel@nongnu.org; Thu, 09 Apr 2015 05:27:17 -0400 References: <1428055432-12120-1-git-send-email-zhaoshenglong@huawei.com> <1428055432-12120-5-git-send-email-zhaoshenglong@huawei.com> <871tju4qmi.fsf@linaro.org> <20150408203836-mutt-send-email-mst@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <20150408203836-mutt-send-email-mst@redhat.com> Date: Thu, 09 Apr 2015 10:27:25 +0100 Message-ID: <87egnt1wjm.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 04/20] hw/acpi/aml-build: Add aml_memory32_fixed() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, imammedo@redhat.com, a.spyridakis@virtualopensystems.com, msalter@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, hanjun.guo@linaro.org, Shannon Zhao , pbonzini@redhat.com, lersek@redhat.com, christoffer.dall@linaro.org, shannon.zhao@linaro.org Michael S. Tsirkin writes: > On Wed, Apr 08, 2015 at 03:54:45PM +0100, Alex Bennée wrote: >> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c >> > index 8d01959..fefe7c7 100644 >> > --- a/hw/acpi/aml-build.c >> > +++ b/hw/acpi/aml-build.c >> > @@ -505,6 +505,28 @@ Aml *aml_call4(const char *method, Aml *arg1, Aml *arg2, Aml *arg3, Aml *arg4) >> > return var; >> > } >> > >> > +/* >> > + * ACPI 1.0: 6.4.3.4 Memory32Fixed (Memory Resource Descriptor Macro) >> > + */ >> > +Aml *aml_memory32_fixed(uint64_t addr, uint64_t size, uint8_t rw_flag) >> > +{ >> > + Aml *var = aml_alloc(); >> >> This is more aimed at the ACPI maintainers but I wonder if there should >> be an aml_alloc_sized that pre-allocates the GArray? Otherwise we spend >> a lot of time realloc'ing while building these entries up. Or even a >> varidac build_append_bytes? > > Can you show measureable VM boot speedup from this? > If not, it's not worth bothering with. Fair enough, this is a start-up thing and I guess you could probably only measure a difference in a highly targeted pathaological test case. -- Alex Bennée