basic mlock() testcase from lkml
PATCH 1/1 basic mlock() testcase from lkml
This is a reproducer copied from one of LKML patch submission, which subject is
[PATCH] mlock: revert the optimization for dirtying pages and triggering writeback.
"In 5ecfda0, we do some optimization in mlock, but it causes a very basic test case(attached below) of mlock to fail. So this patch revert it with some tiny modification so that it apply successfully with the lastest 38-rc2 kernel."
--- runtest/mm | 1 + testcases/kernel/mem/mlock/Makefile | 23 ++++++++ testcases/kernel/mem/mlock/mlock01.c | 102 ++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/mlock/Makefile create mode 100644 testcases/kernel/mem/mlock/mlock01.c
runtest/mm +1 -0
@@ -76,6 +76,7 @@ hugemmap05_3 hugemmap05 -s -m cpuset01 cpuset01 -I 3600 +mlock01 mlock01 mlock03 mlock03 -i 20 mbind01 mbind01
testcases/kernel/mem/mlock/Makefile new file +23 -0
@@ -0,0 +1,23 @@ +# +# 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
testcases/kernel/mem/mlock/mlock01.c new file +102 -0
102 lines not on this page · raw message
Signature · 12 lines
1.7.1 ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 10 lines · Han Pingtian
This is a reproducer copied from one of LKML patch submission, which subject is
[PATCH] mlock: revert the optimization for dirtying pages and triggering writeback.
"In 5ecfda0, we do some optimization in mlock, but it causes a very basic test case(attached below) of mlock to fail. So this patch revert it with some tiny modification so that it apply successfully with the lastest 38-rc2 kernel."
The open / ftruncate should be moved to setup and the close should
be moved to cleanup. Other than that, looks fine.
Thanks,
-Garrett
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Han Pingtian
This is a reproducer copied from one of LKML patch submission, which subject is
[PATCH] mlock: revert the optimization for dirtying pages and triggering writeback.
Quoted 7 lines
Quoted 4 lines
"In 5ecfda0, we do some optimization in mlock, but it causes a very basic test case(attached below) of mlock to fail. So this patch revert it with some tiny modification so that it apply successfully with the lastest 38-rc2 kernel."
The open / ftruncate should be moved to setup and the close should
be moved to cleanup. Other than that, looks fine.
Updated as required. Please review. Thanks.
Quoted 2 lines
Thanks,
-Garrett
Signature · 5 lines
Han Pingtian Quality Engineer hpt @ #kernel-qe Red Hat, Inc Freedom ... courage ... Commitment ... ACCOUNTABILITY
From a4071d84f31ed5af8203935dc95855a024ef8315 Mon Sep 17 00:00:00 2001
From: Han Pingtian <[email protected]>
Date: Thu, 24 Feb 2011 17:25:03 +0800
Subject: [PATCH] basic mlock() testcase from lkml
This is a reproducer copied from one of LKML patch submission, which subject is
[PATCH] mlock: revert the optimization for dirtying pages and triggering writeback.
"In 5ecfda0, we do some optimization in mlock, but it causes a very basic test case(attached below) of mlock to fail. So this patch revert it with some tiny modification so that it apply successfully with the lastest 38-rc2 kernel."
--- runtest/mm | 1 + testcases/kernel/mem/mlock/Makefile | 23 +++++++ testcases/kernel/mem/mlock/mlock01.c | 105 ++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/mlock/Makefile create mode 100644 testcases/kernel/mem/mlock/mlock01.c
runtest/mm +1 -0
@@ -76,6 +76,7 @@ hugemmap05_3 hugemmap05 -s -m cpuset01 cpuset01 -I 3600 +mlock01 mlock01 mlock03 mlock03 -i 20 mbind01 mbind01
testcases/kernel/mem/mlock/Makefile new file +23 -0
@@ -0,0 +1,23 @@ +# +# 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
testcases/kernel/mem/mlock/mlock01.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
On Thu, Feb 24, 2011 at 6:51 PM, Han Pingtian <[email protected]> wrote:
...
Quoted 1 line
Updated as required. Please review. Thanks.
close should be under TEST_CLEANUP. Other than that it's fine.
Thanks!
-Garrett
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 7 lines · Garrett Cooper
On Thu, Feb 24, 2011 at 6:51 PM, Han Pingtian <[email protected]> wrote:
...
Quoted 1 line
Updated as required. Please review. Thanks.
close should be under
TEST_CLEANUP. Other than that it's fine.
Updated. Thanks.
Quoted 2 lines
Thanks!
-Garrett
Signature · 5 lines
Han Pingtian Quality Engineer hpt @ #kernel-qe Red Hat, Inc Freedom ... courage ... Commitment ... ACCOUNTABILITY
From 4c92e20058b0349910b309e891d92c60d1f15cad Mon Sep 17 00:00:00 2001
From: Han Pingtian <[email protected]>
Date: Thu, 24 Feb 2011 17:25:03 +0800
Subject: [PATCH] basic mlock() testcase from lkml
This is a reproducer copied from one of LKML patch submission, which subject is
[PATCH] mlock: revert the optimization for dirtying pages and triggering writeback.
"In 5ecfda0, we do some optimization in mlock, but it causes a very basic test case(attached below) of mlock to fail. So this patch revert it with some tiny modification so that it apply successfully with the lastest 38-rc2 kernel."
--- runtest/mm | 1 + testcases/kernel/mem/mlock/Makefile | 23 +++++++ testcases/kernel/mem/mlock/mlock01.c | 105 ++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/mlock/Makefile create mode 100644 testcases/kernel/mem/mlock/mlock01.c
runtest/mm +1 -0
@@ -76,6 +76,7 @@ hugemmap05_3 hugemmap05 -s -m cpuset01 cpuset01 -I 3600 +mlock01 mlock01 mlock03 mlock03 -i 20 mbind01 mbind01
testcases/kernel/mem/mlock/Makefile new file +23 -0
@@ -0,0 +1,23 @@ +# +# 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
testcases/kernel/mem/mlock/mlock01.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 9 lines · Han Pingtian
Quoted 7 lines · Garrett Cooper
On Thu, Feb 24, 2011 at 6:51 PM, Han Pingtian <[email protected]> wrote:
...
Quoted 1 line
Updated as required. Please review. Thanks.
close should be under
TEST_CLEANUP. Other than that it's fine.Updated. Thanks.
Committed -- thanks!
-Garrett
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
testcases/kernel/mem/mlock/mlock01.c line 65
Quoted 5 lines
testcases/kernel/mem/mlock/mlock01.c new file +5
-0+static void setup (void ) +{ +tst_tmpdir (); + + fd =open (testfile,O_CREAT |O_RDWR );
Sorry for not exposing this earlier. But you should specify mode for open with O_CREAT. That's part of the open() inteface that is kind of badly engineered...
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Thanks - Commited.
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list