functional testing for Kernel Samepage Merging
A message that is not in the archive (sent off-list or not yet received): 1953644009.2209371289381583892.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH v5 1/1 functional testing for Kernel Samepage Merging
Basic tests were to start several programs with same and different memory contents and ensure only to merge the ones with the same contents. When changed the content of one of merged pages in a process and to the mode "unmerging", it should discard all merged pages there. Also tested it is possible to disable KSM. There are also command-line options to specify the memory allocation size, and number of processes have same memory contents so it is possible to test more advanced things like KSM + OOM etc. KSM statistics numbers look like hard to predict, so only check the ranges.
---
v5: fixed in group_check() that pages_volatile was mistakenly written
in pages_sharing caused the test failure.
v4: various of fixes from feedback by Garrett.
v3: fixed expected values based on the feedback from KSM developers;
fixed madvise return code; replaced malloc with mmap calls to better align page boundaries; added additional memory content verification after each run.
v2: fixed stupid mistakes about memory content assignment.
runtest/mm | 1 + testcases/kernel/mem/ksm/Makefile | 22 ++ testcases/kernel/mem/ksm/ksm01.c | 618 +++++++++++++++++++++++++++++++++++++ 3 files changed, 641 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/ksm/Makefile create mode 100644 testcases/kernel/mem/ksm/ksm01.c
runtest/mm +1 -0
@@ -54,3 +54,4 @@ mmapstress08 mmapstress08 mmapstress09 mmapstress09 -p 20 -t 0.2 mmapstress10 mmapstress10 -p 20 -t 0.2 +ksm01 ksm01
testcases/kernel/mem/ksm/Makefile new file +22 -0
@@ -0,0 +1,22 @@ +# +# Copyright (C) 2010 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +# the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk +include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/mem/ksm/ksm01.c new file +618 -0
618 lines not on this page · raw message
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list