Skip to contentSkip to conversation

Out Of Memory when changing cpuset's mems on NUMA

PATCH Superseded [email protected] 2 participants 2 messages Nov 23, 2010 – Nov 25, 2010 1 message not in the archive

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/1 Out Of Memory when changing cpuset's mems on NUMA

In reply to a message not in the archive

There was a problem reported upstream that the allocator may see an empty nodemask when changing cpuset's mems.

http://lkml.org/lkml/2010/5/4/77
http://lkml.org/lkml/2010/5/4/79
http://lkml.org/lkml/2010/5/4/80

This test is based on the reproducers for the above issue.

---
v2: use LTP_ATTRIBUTE_*; merge a few functions.

 runtest/mm                             |    3 +
 testcases/kernel/mem/cpuset/Makefile   |   25 +++
 testcases/kernel/mem/cpuset/cpuset01.c |  366 ++++++++++++++++++++++++++++++++
 3 files changed, 394 insertions(+), 0 deletions(-)
 create mode 100644 testcases/kernel/mem/cpuset/Makefile
 create mode 100644 testcases/kernel/mem/cpuset/cpuset01.c
runtest/mm +3 -0
index 2f3f407..f6cedbd 100644
@@ -54,3 +54,6 @@ mmapstress08 mmapstress08
 mmapstress09 mmapstress09 -p 20 -t 0.2
 mmapstress10 mmapstress10 -p 20 -t 0.2
 
+ksm01 ksm01
+
+cpuset01 cpuset01 -I 3600
\ No newline at end of file
testcases/kernel/mem/cpuset/Makefile new file +25 -0
new file mode 100644
index 0000000..65d3aab
@@ -0,0 +1,25 @@
+#
+#  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., 51 Franklin Street, Fifth Floor, Boston, MA
+#  02110-1301, USA.
+#
+
+top_srcdir              ?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
+
+LDLIBS 			+= -lnuma -lm
testcases/kernel/mem/cpuset/cpuset01.c new file +366 -0

366 lines not on this page · raw message

Signature · 1 line
1.7.1

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

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

#2 lore raw

Hi!

...

testcases/kernel/mem/cpuset/cpuset01.c line 54

Quoted 4 lines
testcases/kernel/mem/cpuset/cpuset01.c new file +4 -0
+#define MAXNODES		512
+#define CPATH			"/dev/cpuset"
+#define CPATH_NEW		"/dev/cpuset/1"
+#define UNUSED			__attribute__ ((unused))

You are using both LTP_ATTRIBUTE_UNUSED and your UNUSED see sighandler below.

...

Quoted 4 lines
testcases/kernel/mem/cpuset/cpuset01.c new file +4 -0
+void sighandler(UNUSED int signo)
+{
+	end = 1;
+}

...

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list