xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Corneliu ZUZU <czuzu@bitdefender.com>, xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] x86: shrink 'struct domain', was already PAGE_SIZE
Date: Mon, 1 Feb 2016 11:07:09 +0000	[thread overview]
Message-ID: <56AF3C5D.1010508@citrix.com> (raw)
In-Reply-To: <1454312541-12422-1-git-send-email-czuzu@bitdefender.com>

On 01/02/16 07:42, Corneliu ZUZU wrote:
> The X86 domain structure already occupied PAGE_SIZE (4096).
>
> Looking @ the memory layout of the structure, we could see that
> overall most was occupied by (used the pahole tool on domain.o):
>  * sizeof(domain.arch) = sizeof(arch_domain) = 3328 bytes.
>  * sizeof(domain.arch.hvm_domain) = 2224 bytes.
>  * sizeof(domain.arch.hvm_domain.pl_time) = 1088 bytes.
> This patch attempts to free some space, by making the pl_time
> field in hvm_domain dynamically allocated.
> We xzalloc/xfree it @ hvm_domain_initialise/hvm_domain_destroy.
>
> After this change, the domain structure shrunk w/ 1152 bytes (>1K!).
>
> Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thankyou for doing this - it is exactly the kind of change I had in mind.

~Andrew

  parent reply	other threads:[~2016-02-01 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  7:42 [PATCH] x86: shrink 'struct domain', was already PAGE_SIZE Corneliu ZUZU
2016-02-01 10:47 ` Jan Beulich
2016-02-01 10:58   ` Corneliu ZUZU
2016-02-01 11:07 ` Andrew Cooper [this message]
2016-02-01 11:28   ` Corneliu ZUZU

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=56AF3C5D.1010508@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=czuzu@bitdefender.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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).