From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OtGMU-0002t7-6D for ltp-list@lists.sourceforge.net; Wed, 08 Sep 2010 08:50:34 +0000 Received: from e23smtp06.au.ibm.com ([202.81.31.148]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OtGMS-0006d3-Co for ltp-list@lists.sourceforge.net; Wed, 08 Sep 2010 08:50:34 +0000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id o888oMPo024162 for ; Wed, 8 Sep 2010 18:50:22 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o888oOKb2216076 for ; Wed, 8 Sep 2010 18:50:24 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o888oOWj028122 for ; Wed, 8 Sep 2010 18:50:24 +1000 Received: from [9.124.158.52] ([9.124.158.52]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o888oNx0028104 for ; Wed, 8 Sep 2010 18:50:24 +1000 Message-ID: <4C874E4F.7080506@linux.vnet.ibm.com> Date: Wed, 08 Sep 2010 14:20:23 +0530 From: Shubham MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050604080402080902060906" Subject: [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh'. List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-list-bounces@lists.sourceforge.net To: ltp-list@lists.sourceforge.net This is a multi-part message in MIME format. --------------050604080402080902060906 Content-Type: multipart/alternative; boundary="------------050108030507050807060404" --------------050108030507050807060404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, We have found out a cgroup test case issue with 'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. The sniff of test case function is as below:- Note: - Below code sniff is taken from latest LTP August month release. run_stress() { do_mount; for i in $(seq 0 $(($1-1))) do mkdir /dev/memcg/$i 2> /dev/null ./memcg_process_stress $2 $3 & eval pid$i=$! eval echo \$pid$i > /dev/memcg/$i/tasks done for i in $(seq 0 $(($1-1))) do eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null done sleep $4 for i in $(seq 0 $(($1-1))) do eval /bin/kill -s SIGINT \$pid$i 2> /dev/null *<----send SIGINT signal for a pid * eval wait \$pid$i rmdir /dev/memcg/$i 2> /dev/null done cleanup; } Basically, the test case is not doing a proper cleanup using SIGINT.It seems that the current test runs for much longer time than expected, thus affecting test performance. During this course of time, other dependent tests were also not proceeding further and system seemed to be in a process hang state. However we have found that SIGKILL does a better cleanup job compared to SIGINT, to overcome this situation. So, I have created a patch to fix above test case issue. Kindly review this patch and acknowledge. I think this patch can be merged into latest LTP code to avoid this problem. Please let me know if you need any clarifications. Regards, Shubham --------------050108030507050807060404 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,
     We have found out a cgroup test case issue with 'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. The sniff of test case function is as below:-

Note: - Below code sniff is taken from latest LTP August month release.

run_stress()
{
        do_mount;

        for i in $(seq 0 $(($1-1)))
        do
                mkdir /dev/memcg/$i 2> /dev/null
                ./memcg_process_stress $2 $3 &
                eval pid$i=$!

                eval echo \$pid$i > /dev/memcg/$i/tasks
        done

        for i in $(seq 0 $(($1-1)))
        do
                eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
        done

        sleep $4

        for i in $(seq 0 $(($1-1)))
        do
                eval /bin/kill -s SIGINT \$pid$i 2> /dev/null    <----send  SIGINT signal for a pid
                eval wait \$pid$i

                rmdir /dev/memcg/$i 2> /dev/null
        done

        cleanup;
}


Basically, the test case is not doing a proper cleanup using SIGINT.It seems that the current test runs for much longer time than expected, thus affecting test performance. During this course of time, other dependent tests were also not proceeding further and system seemed to be in a process hang state. However we have found that SIGKILL does a better cleanup job compared to SIGINT, to overcome this situation.

So, I have created a patch to fix above test case issue. Kindly review this patch and acknowledge. I think this patch can be merged into latest LTP code to avoid this problem.

Please let me know if you need any clarifications.

Regards,
Shubham

--------------050108030507050807060404-- --------------050604080402080902060906 Content-Type: text/plain; name="patch_memcg_stress_test" Content-Disposition: attachment; filename="patch_memcg_stress_test" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by e23smtp06.au.ibm.com id o888oMPo024162 --- memcg_stress_test.sh 2010-09-01 01:04:22.000000000 +0530 +++ memcg_stress_test_latest.sh 2010-09-01 01:10:47.000000000 +0530 @@ -1,4 +1,4 @@ -#! /bin/sh +=EF=BB=BF#! /bin/sh =20 ########################################################################= ######## ## = ## @@ -85,7 +85,7 @@ =20 for i in $(seq 0 $(($1-1))) do - eval /bin/kill -s SIGINT \$pid$i 2> /dev/null + eval /bin/kill -s SIGKILL \$pid$i 2> /dev/null eval wait \$pid$i =20 rmdir /dev/memcg/$i 2> /dev/null --------------050604080402080902060906 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd --------------050604080402080902060906 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list --------------050604080402080902060906--