From: Denys Vlasenko <dvlasenk@redhat.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: LKML <linux-kernel@vger.kernel.org>, "Radim Krčmář" <rkrcmar@redhat.com>
Subject: Can avic_vm_id_bitmap be made smaller? 2 mbytes feels too large
Date: Wed, 21 Jun 2017 20:28:48 +0200 [thread overview]
Message-ID: <238915be-22f4-4ea3-addf-0e06700f3c1e@redhat.com> (raw)
#define AVIC_VM_ID_BITS 24
#define AVIC_VM_ID_NR (1 << AVIC_VM_ID_BITS)
...
static DECLARE_BITMAP(avic_vm_id_bitmap, AVIC_VM_ID_NR);
The above results in a data object which is 2 megabytes large.
avic_vm_init() -> avic_get_next_vm_id() allocates a new vm_id
by looking for a free bit there. That's the whole purpose
for that bitmap existing.
Is there a way to do this less wastefully? Say, such as
iterating over all existing VMs and picking an id which is
not taken.
I imagine VM creation operation is not that frequent, no need
to make new vm_id selection super fast.
reply other threads:[~2017-06-21 18:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=238915be-22f4-4ea3-addf-0e06700f3c1e@redhat.com \
--to=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
--cc=suravee.suthikulpanit@amd.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
all inboxes | Powered by JetHome®