Skip to contentSkip to conversation

getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

PATCH In review 曾令钢 3 participants 9 messages Oct 10, 2013 – Oct 15, 2013 1 message not in the archive

lore
Share & tools
lore

曾令钢

author
#0 lore raw

PATCH 1/1 getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/getrusage/getrusage04.c index 96e24a4..41d0052 100644

testcases/kernel/syscalls/getrusage/getrusage04.c +1 -1
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
Signature · 15 lines
1.7.1




------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

----- Original Message -----

Quoted 7 lines

From: "曾令钢" <[email protected]>
To: [email protected]
Sent: Thursday, 10 October, 2013 7:56:05 AM
Subject: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Regards,
Jan

Quoted 26 lines
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +1 -2
index 96e24a4..41d0052 100644
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
--

1.7.1

Quoted 11 lines

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#2 lore raw
Quoted 11 lines

----- Original Message -----

Quoted 4 lines

From: "曾令钢" <[email protected]>
To: [email protected]
Sent: Thursday, 10 October, 2013 7:56:05 AM
Subject: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 ->

factor_nr = 5

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Yes. We have some problems in RHEL5.10GA.
It could not work as we expected. And I will be more careful. Thanks.

Quoted 30 lines

Regards,
Jan

Quoted 26 lines
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +1 -2
index 96e24a4..41d0052 100644
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
--

1.7.1

Quoted 13 lines
Quoted 7 lines

----------------------------------------------------------------------
-------- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >

http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c

Quoted 5 lines

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

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
In reply to Jan Stancek
Quoted 24 lines

-----Original Message-----
From: 曾令钢 [mailto:[email protected]]
Sent: Thursday, October 10, 2013 4:16 PM
To: 'Jan Stancek'
Cc: '[email protected]'
Subject: 答复: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

Quoted 12 lines

----- Original Message -----

Quoted 4 lines

From: "曾令钢" <[email protected]>
To: [email protected]
Sent: Thursday, 10 October, 2013 7:56:05 AM
Subject: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 ->

factor_nr = 5

Quoted 3 lines

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

Quoted 9 lines
Quoted 4 lines

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Yes. We have some problems in RHEL5.10GA.
It could not work as we expected. And I will be more careful. Thanks.

Maybe the case is not suit for xen kernel.
When kernel is vmlinuz-2.6.18-371.el5xen, the case will fail. But with vmlinuz-2.6.18-371.el5, it works well.

Regards,
Zeng

Quoted 39 lines
Quoted 30 lines

Regards,
Jan

Quoted 26 lines
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +1 -2
index 96e24a4..41d0052 100644
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
--

1.7.1

Quoted 9 lines
Quoted 8 lines

--------------------------------------------------------------------
--
-------- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >

Quoted 6 lines

http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c

Quoted 5 lines
Quoted 5 lines

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

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw

----- Original Message -----

Quoted 35 lines

From: "Zeng Linggang" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Friday, 11 October, 2013 12:19:19 PM
Subject: RE: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

Quoted 27 lines

-----Original Message-----
From: 曾令钢 [mailto:[email protected]]
Sent: Thursday, October 10, 2013 4:16 PM
To: 'Jan Stancek'
Cc: '[email protected]'
Subject: 答复: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

Quoted 16 lines

----- Original Message -----

Quoted 4 lines

From: "曾令钢" <[email protected]>
To: [email protected]
Sent: Thursday, 10 October, 2013 7:56:05 AM
Subject: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 ->

factor_nr = 5

Quoted 3 lines

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Quoted 8 lines
Quoted 4 lines

Yes. We have some problems in RHEL5.10GA.
It could not work as we expected. And I will be more careful. Thanks.

Maybe the case is not suit for xen kernel.
When kernel is vmlinuz-2.6.18-371.el5xen, the case will fail. But with vmlinuz-2.6.18-371.el5, it works well.

Can you send the output from failed run?

Quoted 52 lines

Regards,
Zeng

Quoted 45 lines
Quoted 30 lines

Regards,
Jan

Quoted 26 lines
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +1 -2
index 96e24a4..41d0052 100644
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
--

1.7.1

Quoted 9 lines
Quoted 8 lines

--------------------------------------------------------------------
--
-------- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >

http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c

Quoted 5 lines
Quoted 5 lines

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

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 57 lines

-----Original Message-----
From: Jan Stancek [mailto:[email protected]]
Sent: Friday, October 11, 2013 6:35 PM
To: Zeng Linggang
Cc: [email protected]
Subject: Re: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

----- Original Message -----

Quoted 5 lines

From: "Zeng Linggang" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Friday, 11 October, 2013 12:19:19 PM
Subject: RE: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 ->

factor_nr = 5

Quoted 36 lines
Quoted 35 lines

-----Original Message-----
From: 曾令钢 [mailto:[email protected]]
Sent: Thursday, October 10, 2013 4:16 PM
To: 'Jan Stancek'
Cc: '[email protected]'
Subject: 答复: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

Quoted 10 lines

----- Original Message -----

Quoted 5 lines

From: "曾令钢" <[email protected]>
To: [email protected]
Sent: Thursday, 10 October, 2013 7:56:05 AM
Subject: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 ->

factor_nr = 5

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

To make udelta or sdelta's values isnot great than expected, we change the factor_nr to 5.

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Yes. We have some problems in RHEL5.10GA.
It could not work as we expected. And I will be more careful. Thanks.

Quoted 5 lines
Quoted 3 lines

Maybe the case is not suit for xen kernel.
When kernel is vmlinuz-2.6.18-371.el5xen, the case will fail. But with vmlinuz-2.6.18-371.el5, it works well.

Can you send the output from failed run?

<<<test_start>>>
tag=getrusage04 stime=1381285379
cmdline="getrusage04"
contacts=""
analysis=exit
<<<test_output>>>

getrusage04    0  TINFO  :  CLOCK_REALTIME_COARSE not supported, using 4000 us
getrusage04    0  TINFO  :  Using 1 as multiply factor for max [us]time increment (1000+4000us)!
getrusage04    0  TINFO  :  utime:           0us; stime:        4000us
getrusage04    0  TINFO  :  utime:           0us; stime:       16001us
getrusage04    1  TFAIL  :  stime increased > 5000us:

<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no cutime=0 cstime=2
<<<test_end>>>

Regards,
Zeng

Quoted 47 lines
Quoted 47 lines

Regards,
Zeng

Quoted 41 lines
Quoted 40 lines

Regards,
Jan

Quoted 35 lines
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +1 -2
index 96e24a4..41d0052 100644
@@ -67,7 +67,7 @@ static long BIAS_MAX;
 
 static int opt_factor;
 static char *factor_str;
-static long factor_nr = 1;
+static long factor_nr = 5;
 
 option_t child_options[] = {
 	{"m:", &opt_factor, &factor_str},
--

1.7.1

----------------------------------------------------------------
----
--
-------- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >

Quoted 10 lines

http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg

Quoted 9 lines
Quoted 6 lines

.c

Quoted 5 lines
Quoted 5 lines

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

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
In reply to Zeng Linggang

----- Original Message -----

Quoted 11 lines

From: "Zeng Linggang" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Friday, 11 October, 2013 12:19:19 PM
Subject: RE: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

Quoted 6 lines
Quoted 5 lines

Note, that there is already a parameter -m to set factor_nr.

Can you share more details why this should be the default? On which system/architecture do you see it failing?

Quoted 7 lines
Quoted 4 lines

Yes. We have some problems in RHEL5.10GA.
It could not work as we expected. And I will be more careful. Thanks.

When kernel is vmlinuz-2.6.18-371.el5xen, the case will fail. But with vmlinuz-2.6.18-371.el5, it works well.

I'm seeing the same as you also with previous minor RHEL5 releases on dom0:
5.3 2.6.18-128.el5xen
5.6 2.6.18-238.el5xen
5.9 2.6.18-348.el5xen
5.10 2.6.18-371.el5xen

Quoted 1 line

Maybe the case is not suit for xen kernel.

It's possible, it doesn't look like regression to me so far.
The systems are definitely not "slow" ones, and test can pass on bare-metal kernel.

Regards,
Jan

Quoted 8 lines

Regards,
Zeng

Quoted 4 lines
Quoted 4 lines

Regards,
Jan

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#7 lore raw

Hi!

Quoted 9 lines
Quoted 2 lines

When kernel is vmlinuz-2.6.18-371.el5xen, the case will fail. But with vmlinuz-2.6.18-371.el5, it works well.

I'm seeing the same as you also with previous minor RHEL5 releases on dom0:
5.3 2.6.18-128.el5xen
5.6 2.6.18-238.el5xen
5.9 2.6.18-348.el5xen
5.10 2.6.18-371.el5xen

Quoted 4 lines
Quoted 1 line

Maybe the case is not suit for xen kernel.

It's possible, it doesn't look like regression to me so far.
The systems are definitely not "slow" ones, and test can pass on bare-metal kernel.

The problem with the test is that it tries to assert that granurality of gerusage CPU time accounting is as good as possible. The granularity itself depends on kernel config options, mainly on CONFIG_HZ. But as the kernel compilation options are not exported (by running kernel) in any reliable way the code I've added tries to guess them by side channel (the CLOCK_REALTIME_COARSE resolution). If CLOCK_REALTIME_COARSE is not supported it goes with 4ms which should correspond with CONFIG_HZ=250.

Now the accuracy on xen may be off for several reasons. It can have CONFIG_HZ=100. Or xen may not be able to account virtual CPU time with the same accuracy as on the real CPU...

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

#9 lore raw

Hi!

Quoted 8 lines
Quoted 8 lines

The problem with the test is that it tries to assert that granurality of gerusage CPU time accounting is as good as possible. The granularity itself depends on kernel config options, mainly on CONFIG_HZ. But as the kernel compilation options are not exported (by running kernel) in any reliable way the code I've added tries to guess them by side channel (the CLOCK_REALTIME_COARSE resolution). If CLOCK_REALTIME_COARSE is not supported it goes with 4ms which should correspond with CONFIG_HZ=250.

Quoted 8 lines
Quoted 3 lines

Now the accuracy on xen may be off for several reasons. It can have CONFIG_HZ=100. Or xen may not be able to account virtual CPU time with the same accuracy as on the real CPU...

Drew (from xen team) mentioned something along these lines as well.

Do we have some simple way to detect that test is running on xen (dom0/domU), so we could end test with TCONF in that case?

I'm not aware of any. But feel free to add a function into LTP lib/.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list