functional testing for Kernel Samepage Merging
A message that is not in the archive (sent off-list or not yet received): 91982603.253001291706928092.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH v7 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.
---
v7: more code cleanup
v6: code cleanup
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 | 2 + testcases/kernel/mem/ksm/Makefile | 22 ++ testcases/kernel/mem/ksm/ksm01.c | 540 +++++++++++++++++++++++++++++++++++++ 3 files changed, 564 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/ksm/Makefile create mode 100644 testcases/kernel/mem/ksm/ksm01.c
runtest/mm +2 -0
@@ -59,3 +59,5 @@ mmap10_1 mmap10 -a mmap10_2 mmap10 -s mmap10_3 mmap10 -a -s mmap10_4 mmap10 -a -s -c 60 + +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 +540 -0
540 lines not on this page · raw message
Signature · 1 line
1.7.3.2
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.
---
v7: more code cleanup
v6: code cleanup
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 | 2 + testcases/kernel/mem/ksm/Makefile | 22 ++ testcases/kernel/mem/ksm/ksm01.c | 540 +++++++++++++++++++++++++++++++++++++ 3 files changed, 564 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/ksm/Makefile create mode 100644 testcases/kernel/mem/ksm/ksm01.c
runtest/mm +2 -0
@@ -59,3 +59,5 @@ mmap10_1 mmap10 -a mmap10_2 mmap10 -s mmap10_3 mmap10 -a -s mmap10_4 mmap10 -a -s -c 60 + +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 +540 -0
540 lines not on this page · raw message
Signature · 1 line
1.7.3.2
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 9 lines · On Mon, Dec 6, 2010 at 11:28 PM, <[email protected]> wrote:
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.
Committed.
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list