vl: Adjust the place of calling mlockall to speedup VM's startup
commit28d16f38d0d5881f95b074cc802dae8cacc1bf58
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Tue, 23 Sep 2014 10:42:24 +0000 (23 18:42 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Sep 2014 16:44:04 +0000 (29 19:44 +0300)
tree8d4e5bdacbf33c1645b83e4ce6b65d39e0edb9be
parentfc50ff0666315be5120c70ad00cd0b0097484b84
vl: Adjust the place of calling mlockall to speedup VM's startup

If we configure mlock=on and memory policy=bind at the same time,
It will consume lots of time for system to treat with memory,
especially when call mbind behind mlockall.

Adjust the place of calling mlockall, calling mbind before mlockall
can remarkably reduce the time of VM's startup.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vl.c