All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] poll02 threshold overruns
@ 2016-03-21 21:23 Kshitij Malik
  2016-03-22  9:27 ` Cyril Hrubis
  0 siblings, 1 reply; 5+ messages in thread
From: Kshitij Malik @ 2016-03-21 21:23 UTC (permalink / raw)
  To: ltp

Hi,

I'm working on PowerPc based board MPC8360 and we are running 4.1.13 kernel. During our LTP run, we saw the following failure with poll02 test.

poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 115ms, expected 100ms, threshold 12

The log file is attached to this mail.

Please note that I'm running the latest LTP code.

I understand that threshold value overruns the relax limit. I try changing the threshold value to 20 as below (to give more relaxing time)

testcases/kernel/syscalls/poll/poll02.c, line 61

- treshold = sleep_ms / 100 + 10;
+treshold = sleep_ms / 10 + 10;

I ran the test in a loop until it fails and the test failed after 3 mins at attempt number 240 with the timer value 121ms. Error as below:

poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 121ms, expected 100ms, threshold 20


Can you please look into this and explain the behaviour and a possible solution? Is it a architecture constraint?

Please let me know if you need any other information.

Thanks
KK
________________________________
NOTE: This e-mail (including any attachments) is for the sole use of the intended recipient(s) and may contain information that is confidential and/or protected by legal privilege. Any unauthorized review, use, copy, disclosure or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please notify Mitel immediately and destroy all copies of this e-mail. Mitel does not accept any liability for breach of security, error or virus that may result from the transmission of this message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ltp_console_output_poll02.log
Type: application/octet-stream
Size: 2709 bytes
Desc: Ltp_console_output_poll02.log
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160321/6ae4596f/attachment-0001.obj>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] poll02 threshold overruns
  2016-03-21 21:23 [LTP] poll02 threshold overruns Kshitij Malik
@ 2016-03-22  9:27 ` Cyril Hrubis
  2016-03-22 14:28   ` Kshitij Malik
  0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2016-03-22  9:27 UTC (permalink / raw)
  To: ltp

Hi!
> I'm working on PowerPc based board MPC8360 and we are running 4.1.13 kernel. During our LTP run, we saw the following failure with poll02 test.
> 
> poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 115ms, expected 100ms, threshold 12
> 
> The log file is attached to this mail.
> 
> Please note that I'm running the latest LTP code.
> 
> I understand that threshold value overruns the relax limit. I try changing the threshold value to 20 as below (to give more relaxing time)
> 
> testcases/kernel/syscalls/poll/poll02.c, line 61
> 
> - treshold = sleep_ms / 100 + 10;
> +treshold = sleep_ms / 10 + 10;
> 
> I ran the test in a loop until it fails and the test failed after 3 mins at attempt number 240 with the timer value 121ms. Error as below:
> 
> poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 121ms, expected 100ms, threshold 20
> 
> 
> Can you please look into this and explain the behaviour and a possible solution? Is it a architecture constraint?

The thresholds were set up by trial and error on older PC. The timer
overruns have no real upper cap and they depends on CPU speed, kernel
.config parameters and system load.

So it possibly may fail on slow embedded machines. I guess that what we
should do is to move the treshold computation into the test library so
that we can tweak the value in one place and either do some heuristic or
provide a way to override it by user.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] poll02 threshold overruns
  2016-03-22  9:27 ` Cyril Hrubis
@ 2016-03-22 14:28   ` Kshitij Malik
  2016-03-22 14:44     ` Cyril Hrubis
  0 siblings, 1 reply; 5+ messages in thread
From: Kshitij Malik @ 2016-03-22 14:28 UTC (permalink / raw)
  To: ltp

Thank you Cyril for the reply.

What kernel configurations are we talking about here?

Is there a formula to calculate threshold based on CPU speed and kernel parameters?

Thanks
KK
________________________________________
From: Cyril Hrubis <chrubis@suse.cz>
Sent: Tuesday, March 22, 2016 05:27
To: Kshitij Malik
Cc: ltp@lists.linux.it
Subject: Re: poll02 threshold overruns

Hi!
> I'm working on PowerPc based board MPC8360 and we are running 4.1.13 kernel. During our LTP run, we saw the following failure with poll02 test.
>
> poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 115ms, expected 100ms, threshold 12
>
> The log file is attached to this mail.
>
> Please note that I'm running the latest LTP code.
>
> I understand that threshold value overruns the relax limit. I try changing the threshold value to 20 as below (to give more relaxing time)
>
> testcases/kernel/syscalls/poll/poll02.c, line 61
>
> - treshold = sleep_ms / 100 + 10;
> +treshold = sleep_ms / 10 + 10;
>
> I ran the test in a loop until it fails and the test failed after 3 mins at attempt number 240 with the timer value 121ms. Error as below:
>
> poll02      1  TFAIL  :  poll02.c:92: poll() slept too long 121ms, expected 100ms, threshold 20
>
>
> Can you please look into this and explain the behaviour and a possible solution? Is it a architecture constraint?

The thresholds were set up by trial and error on older PC. The timer
overruns have no real upper cap and they depends on CPU speed, kernel
.config parameters and system load.

So it possibly may fail on slow embedded machines. I guess that what we
should do is to move the treshold computation into the test library so
that we can tweak the value in one place and either do some heuristic or
provide a way to override it by user.

--
Cyril Hrubis
chrubis@suse.cz
________________________________
NOTE: This e-mail (including any attachments) is for the sole use of the intended recipient(s) and may contain information that is confidential and/or protected by legal privilege. Any unauthorized review, use, copy, disclosure or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please notify Mitel immediately and destroy all copies of this e-mail. Mitel does not accept any liability for breach of security, error or virus that may result from the transmission of this message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] poll02 threshold overruns
  2016-03-22 14:28   ` Kshitij Malik
@ 2016-03-22 14:44     ` Cyril Hrubis
  2016-03-22 15:26       ` Kshitij Malik
  0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2016-03-22 14:44 UTC (permalink / raw)
  To: ltp

Hi!
> What kernel configurations are we talking about here?

I'm afraid that there is quite a lot, starting at scheduller choice,
support for hardware hrtimers or CONFIG_HZ, etc. I'm not expert on
kernel timers to make an exhaustive list.

> Is there a formula to calculate threshold based on CPU speed and kernel parameters?

I doubt that there is one. The problem is quite complex and the result
wouldn't be worth of the work.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] poll02 threshold overruns
  2016-03-22 14:44     ` Cyril Hrubis
@ 2016-03-22 15:26       ` Kshitij Malik
  0 siblings, 0 replies; 5+ messages in thread
From: Kshitij Malik @ 2016-03-22 15:26 UTC (permalink / raw)
  To: ltp

Thank you Cyril for the clarification.

I understand what you mean. I guess I just have to ignore this particular test for our platform. We know polling works as poll01 test passes without any issue and hence it is not an issue with our BSP or kernel.

Thank you for your support.

KK
________________________________________
From: Cyril Hrubis <chrubis@suse.cz>
Sent: Tuesday, March 22, 2016 10:44
To: Kshitij Malik
Cc: ltp@lists.linux.it
Subject: Re: poll02 threshold overruns

Hi!
> What kernel configurations are we talking about here?

I'm afraid that there is quite a lot, starting at scheduller choice,
support for hardware hrtimers or CONFIG_HZ, etc. I'm not expert on
kernel timers to make an exhaustive list.

> Is there a formula to calculate threshold based on CPU speed and kernel parameters?

I doubt that there is one. The problem is quite complex and the result
wouldn't be worth of the work.

--
Cyril Hrubis
chrubis@suse.cz
________________________________
NOTE: This e-mail (including any attachments) is for the sole use of the intended recipient(s) and may contain information that is confidential and/or protected by legal privilege. Any unauthorized review, use, copy, disclosure or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please notify Mitel immediately and destroy all copies of this e-mail. Mitel does not accept any liability for breach of security, error or virus that may result from the transmission of this message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-22 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 21:23 [LTP] poll02 threshold overruns Kshitij Malik
2016-03-22  9:27 ` Cyril Hrubis
2016-03-22 14:28   ` Kshitij Malik
2016-03-22 14:44     ` Cyril Hrubis
2016-03-22 15:26       ` Kshitij Malik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.