Skip to contentSkip to conversation

mm/thp02: add runtest entry

PATCH In review Caspar Zhang 2 participants 3 messages Feb 2, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/2 mm/thp02: new testcase

thp02 - detect mremap bug when THP is enabled.

There was a bug in mremap THP support, sometimes crash happened due to the following reason according to developers:

"alloc_new_pmd was forcing the allocation of a pte before calling move_huge_page and that resulted in a VM_BUG_ON in move_huge_page because the pmd wasn't zero."

There are 4 cases to test this bug:

1) old_addr hpage aligned, old_end not hpage aligned, new_addr hpage aligned;
2) old_addr hpage aligned, old_end not hpage aligned, new_addr not hpage aligned;
3) old_addr not hpage aligned, old_end hpage aligned, new_addr hpage aligned;
4) old_addr not hpage aligned, old_end hpage aligned, new_addr not hpage aligned.

---
 testcases/kernel/mem/thp/Makefile |   20 ++++++
 testcases/kernel/mem/thp/thp02.c  |  136 +++++++++++++++++++++++++++++++++++++
 2 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 testcases/kernel/mem/thp/thp02.c
testcases/kernel/mem/thp/Makefile +20 -0
index d43511a..c8ac001 100644
@@ -20,4 +20,24 @@
 top_srcdir              ?= ../../../..
 
 include $(top_srcdir)/include/mk/testcases.mk
+
+LDLIBS			+= $(NUMA_LIBS) -lmem
+LIBDIR			:= ../lib
+LIB			:= $(LIBDIR)/libmem.a
+FILTER_OUT_DIRS		:= $(LIBDIR)
+LDFLAGS			+= -L$(LIBDIR)
+
+$(LIBDIR):
+	mkdir -p "$@"
+
+$(LIB): $(LIBDIR)
+	$(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
+
+MAKE_DEPS		:= $(LIB)
+
+trunk-clean:: | lib-clean
+
+lib-clean:: $(LIBDIR)
+	$(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/mem/thp/thp02.c new file +136 -0

136 lines not on this page · raw message

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

PATCH v2 2/2 mm/thp02: add runtest entry

adding thp02 entry to runtest/mm

---
 runtest/mm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
runtest/mm +1 -0
index 73fd13c..26fe534 100644
@@ -79,6 +79,7 @@ oom03 oom03
 oom04 oom04
 
 thp01 thp01 -I 120
+thp02 thp02
 
 vma01 vma01
 vma02 vma02

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw

Hi!
Both patches looks good, feel free to commit.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list