Re: [lng-odp] [RFC] cunit: Add tests for scheduler API

2014-12-01 Thread Anders Roxell
On 2014-11-26 19:51, Ciprian Barbu wrote: Signed-off-by: Ciprian Barbu ciprian.ba...@linaro.org --- I started from scratch this time trying to follow the list Taras proposed. This patch covers the first 4 bullets on his lists. One thing I need to mention is that the

[lng-odp] [RFC] cunit: Add tests for scheduler API

2014-11-26 Thread Ciprian Barbu
Signed-off-by: Ciprian Barbu ciprian.ba...@linaro.org --- I started from scratch this time trying to follow the list Taras proposed. This patch covers the first 4 bullets on his lists. One thing I need to mention is that the schedule_mq_mt_prio_atomic would not work (at least on linux-generic)

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-24 Thread Bala Manoharan
Hi, The concern I had with the above testing scenario is that IMO this scenario does not match perfectly with an application usecase. The testing for ORDERED queue in my opinion could be, 1. Dequeue work W1-W10 from ORDERED queue Q1 2. Enqueue work W1-W5 to ORDERED queue Q2 3. Enqueue work

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-23 Thread Alexandru Badicioiu
If I understand correctly, this is the scenario Ciprian described: Core : enqueue 1..n q1 (ORDERED) -- Core : dequeue 1..n, enqueue n..1 -- q2 - Core : dequeue 1..n. This scenario matches the definition of ORDERED queues, as proposed by Petri, regardless of what kind of queue

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-22 Thread Bill Fischofer
The semantics of ordered queues still need to be fully (and rigorously) defined. Otherwise it's impossible to ensure that different implementations will yield the same results. Once we get past the sunny day tests, its the job of the test writer to be devious in trying to trick implementations

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Taras Kondratiuk
On 11/21/2014 12:18 PM, Alexandru Badicioiu wrote: Hi, the scheduling tests in odp_example were discussed some time ago and there was an agreement, at least for FSL and TI platforms, that fair scheduling assumed by the following loop: for (i = 0; i QUEUE_ROUNDS; i++) { buf =

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Taras Kondratiuk
On 11/20/2014 09:02 PM, Ciprian Barbu wrote: Signed-off-by: Ciprian Barbu ciprian.ba...@linaro.org --- The testcases are based almost entirely on the odp_example. There are no alloc tests and I added a test case for odp_schedule_wait_time. The major differencs between the odp_example and this

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Ciprian Barbu
On Fri, Nov 21, 2014 at 12:18 PM, Alexandru Badicioiu alexandru.badici...@linaro.org wrote: Hi, the scheduling tests in odp_example were discussed some time ago and there was an agreement, at least for FSL and TI platforms, that fair scheduling assumed by the following loop: for (i = 0; i

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Alexandru Badicioiu
I think multithreading should be kept, to test the essential ability of the scheduler to deliver to multiple cores. The thing that should IMO be dropped is the fairness assumption (each core get as many buffers as it enqueued). The most general thing that should be tested for the scheduler is that

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Ciprian Barbu
On Fri, Nov 21, 2014 at 3:45 PM, Alexandru Badicioiu alexandru.badici...@linaro.org wrote: I think multithreading should be kept, to test the essential ability of the scheduler to deliver to multiple cores. The thing that should IMO be dropped is the fairness assumption (each core get as many

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Taras Kondratiuk
On 11/21/2014 03:44 PM, Ciprian Barbu wrote: On Fri, Nov 21, 2014 at 1:31 PM, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 11/20/2014 09:02 PM, Ciprian Barbu wrote: Signed-off-by: Ciprian Barbu ciprian.ba...@linaro.org --- The testcases are based almost entirely on the odp_example.

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Alexandru Badicioiu
On 21 November 2014 16:25, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 11/21/2014 03:44 PM, Ciprian Barbu wrote: On Fri, Nov 21, 2014 at 1:31 PM, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 11/20/2014 09:02 PM, Ciprian Barbu wrote: Signed-off-by: Ciprian Barbu

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Alexandru Badicioiu
I think is not OK to hardcode time intervals like 500ms, not even for a single given platform. I would imagine a basic test like this, based on pktio example - core 0 (which does not run a schedule loop) allocates buffer from a pool and enqueues a given number of buffers to one or more scheduled

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Taras Kondratiuk
On 11/21/2014 04:38 PM, Alexandru Badicioiu wrote: On 21 November 2014 16:25, Taras Kondratiuk taras.kondrat...@linaro.org 7. Two queues one of them ORDERED, several threads. Verify that buffers scheduled from ORDERED queue are enqueue into the second queue in correct

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Bala Manoharan
Few points, * Inorder to check ordered state of buffers from second queue they should be dequeued by a single thread as scheduler will despatch the buffers from ORDERED queue in initial order but more than one thread can get the buffer from the same queue at the same time. Begards, Bala On 21

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Ciprian Barbu
+ +static void schedule_multi_hi(void) +{ + test_case_args_t args; IMO, We should avoid using variables allocated from stack to share the data between different execution context. It will work in linux threaded run-time environment.But it will have issues in different run-time

Re: [lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-21 Thread Taras Kondratiuk
On 11/21/2014 06:16 PM, Ciprian Barbu wrote: On Fri, Nov 21, 2014 at 5:54 PM, Bala Manoharan bala.manoha...@linaro.org wrote: Few points, * Inorder to check ordered state of buffers from second queue they should be dequeued by a single thread as scheduler will despatch the buffers from

[lng-odp] [RFC] cunit: add tests for scheduler API

2014-11-20 Thread Ciprian Barbu
Signed-off-by: Ciprian Barbu ciprian.ba...@linaro.org --- The testcases are based almost entirely on the odp_example. There are no alloc tests and I added a test case for odp_schedule_wait_time. The major differencs between the odp_example and this cunit is the partition into testcases, the