On 07/01/2010 04:30 PM, Lucas Meneghel Rodrigues wrote: > On Thu, 2010-07-01 at 16:08 +0300, Michael Goldish wrote: >> On 07/01/2010 04:00 PM, [email protected] wrote: >>> From: Amos Kong <[email protected]> >>> >>> After testing with hugepages, memory is not released, it will cause the >>> memory >>> lack in host. This will make the host running extremely slow and will >>> influence >>> other tests to be executed. >>> >>> Signed-off-by: Yiqiao Pu <[email protected]> >>> Signed-off-by: Amos Kong <[email protected]> >>> --- >>> client/tests/kvm/tests_base.cfg.sample | 1 + >>> 1 files changed, 1 insertions(+), 0 deletions(-) >>> >>> diff --git a/client/tests/kvm/tests_base.cfg.sample >>> b/client/tests/kvm/tests_base.cfg.sample >>> index 7f59bfc..1ed5237 100644 >>> --- a/client/tests/kvm/tests_base.cfg.sample >>> +++ b/client/tests/kvm/tests_base.cfg.sample >>> @@ -1452,6 +1452,7 @@ variants: >>> - @smallpages: >>> - hugepages: >>> pre_command += " scripts/hugepage.py /mnt/kvm_hugepage;" >>> + post_command += " echo 0 > /proc/sys/vm/nr_hugepages; umount >>> /mnt/kvm_hugepage;" >>> extra_params += " -mem-path /mnt/kvm_hugepage" >>> >>> >> >> post_command is executed after every test. This means that at the end of >> the boot test for example, while the VM is still alive, the command will >> be executed. Won't that bother the VM? > > Oops, I guess I was too hasty again. Indeed, I think at least we'll have > trouble unmounting the hugepage directory. We might think of another > solution instead of this one. > >
If umount is supposed to fail that's a good thing. Can we reverse the order of the commands? If we can, we can try: post_command += " umount /mnt/kvm_hugepage && echo 0 > /proc/sys/vm/nr_hugepages;" so at the end of each test umount will be attempted, and only if it succeeds, echo 0 ... will be executed. If there are living VMs umount will fail (hopefully) and no harm will be done. Of course this post_command has to be made noncritical. _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
