lkml.org 
[lkml]   [2017]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectCan avic_vm_id_bitmap be made smaller? 2 mbytes feels too large
Date
#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.

\
 
 \ /
  Last update: 2017-06-21 20:29    [W:0.055 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site