qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Montes, Julio" <julio.montes@intel.com>
To: "sgarzare@redhat.com" <sgarzare@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>,
	"slp@redhat.com" <slp@redhat.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4 0/3] pc: mmap kernel (ELF image) and initrd
Date: Wed, 24 Jul 2019 16:35:23 +0000	[thread overview]
Message-ID: <0d7d1ba8b4da6021c7e05ce736f38df1d012e9c6.camel@intel.com> (raw)
In-Reply-To: <20190724143105.307042-1-sgarzare@redhat.com>

Hi Stefano

Here the results

https://pasteboard.co/Ipu3DO4.png
https://pasteboard.co/Ipu3L69.png

boot time with initrd is a little bit better

Thanks

-
Julio


On Wed, 2019-07-24 at 16:31 +0200, Stefano Garzarella wrote:
> In order to reduce the memory footprint when PVH kernel and initrd
> are used, we map them into memory instead of reading them.
> In this way we can share them between multiple instances of QEMU.
> 
> v4:
>   - Patch 1: fix the rom_add_elf_program() comment [Paolo]
>   - Patch 2:
>     ~ fix the missing of g_mapped_file_unref() in the success case
> [Paolo]
>     ~ fix the rom_add_elf_program() comment [Paolo]
> 
> v3: 
> https://patchew.org/QEMU/20190724112531.232260-1-sgarzare@redhat.com/
> v2: 
> https://patchew.org/QEMU/20190723140445.12748-1-sgarzare@redhat.com/
> 
> These are the results using a PVH kernel and initrd (cpio):
> - memory footprint (using smem) [MB]
>         QEMU              before                   now
>     # instances        USS      PSS            USS      PSS
>          1           102.0M   105.8M         102.3M   106.2M
>          2            94.6M   101.2M          72.3M    90.1M
>          4            94.1M    98.0M          72.0M    81.5M
>          8            94.0M    96.2M          71.8M    76.9M
>         16            93.9M    95.1M          71.6M    74.3M
> 
>     Initrd size: 3.0M
>     Kernel
>         image size: 28M
>         sections size [size -A -d vmlinux]:  18.9M
> 
> - boot time [ms]
>                           before                   now
>  qemu_init_end:           63.85                   55.91
>  linux_start_kernel:      82.11 (+18.26)          74.51 (+18.60)
>  linux_start_user:       169.94 (+87.83)         159.06 (+84.56)
> 
> QEMU command used:
> ./qemu-system-x86_64 -bios /path/to/seabios/out/bios.bin -no-hpet \
>     -machine
> q35,accel=kvm,kernel_irqchip,nvdimm,sata=off,smbus=off,vmport=off \
>     -cpu host -m 1G -smp 1 -vga none -display none -no-user-config
> -nodefaults \
>     -kernel /path/to/vmlinux -initrd /path/to/rootfs.cpio \
>     -append 'root=/dev/mem0 ro console=hvc0 pci=lastbus=0 nosmap'
> 
> Stefano Garzarella (3):
>   loader: Handle memory-mapped ELFs
>   elf-ops.h: Map into memory the ELF to load
>   hw/i386/pc: Map into memory the initrd
> 
>  hw/core/loader.c     | 38 +++++++++++++++++++-----
>  hw/i386/pc.c         | 17 ++++++++---
>  include/hw/elf_ops.h | 71 ++++++++++++++++++++++++++--------------
> ----
>  include/hw/i386/pc.h |  1 +
>  include/hw/loader.h  |  5 ++--
>  5 files changed, 89 insertions(+), 43 deletions(-)
> 

  parent reply	other threads:[~2019-07-24 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 14:31 [Qemu-devel] [PATCH v4 0/3] pc: mmap kernel (ELF image) and initrd Stefano Garzarella
2019-07-24 14:31 ` [Qemu-devel] [PATCH v4 1/3] loader: Handle memory-mapped ELFs Stefano Garzarella
2019-07-24 14:31 ` [Qemu-devel] [PATCH v4 2/3] elf-ops.h: Map into memory the ELF to load Stefano Garzarella
2019-07-24 14:31 ` [Qemu-devel] [PATCH v4 3/3] hw/i386/pc: Map into memory the initrd Stefano Garzarella
2019-07-24 14:37 ` [Qemu-devel] [PATCH v4 0/3] pc: mmap kernel (ELF image) and initrd Paolo Bonzini
2019-07-24 14:38 ` Dr. David Alan Gilbert
2019-07-24 16:35 ` Montes, Julio [this message]
2019-07-25  8:33   ` Stefano Garzarella

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=0d7d1ba8b4da6021c7e05ce736f38df1d012e9c6.camel@intel.com \
    --to=julio.montes@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sgarzare@redhat.com \
    --cc=slp@redhat.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).