All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Jitter-test
@ 2012-07-28 21:24 Uttamkumar Sinojia
  2012-07-28 21:26 ` Gilles Chanteperdrix
  2012-07-28 21:27 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 7+ messages in thread
From: Uttamkumar Sinojia @ 2012-07-28 21:24 UTC (permalink / raw)
  To: xenomai




> wake-up time of more than one task is same, in such case which task
> will wake-up first can not be predicted. But as per the output (shown
> below), the task with higher priority  is woken-up first----WHY
> SO??????



Sorry, the statement is like this...

Here as all the task are having same priority. So when expected wake-up time of more than one task is same, in such case which task will wake-up first can not be predicted. But as per the output, the task with higher period is woken-up first----WHY SO?????? 

Let me tell more...
Here (as per the code) all task are having same priority(5).
But configured periodic in such a way that all will wake-up at the same time(say t1).(ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_n);)
PERIOD_n  task1->1ms, task2->2ms, task3->3ms, task4->4ms, task5->5ms.

So, 
with respect to t1 after 1ms of time my first task (task1) will wake-up.

And again with respect to t1 after 2ms of time there will be two task going to wake-up(task1-1ms, task2-2ms). So in this case (as priority of both the task are same), which task will wake-up first should be non-deterministic. But i am getting deterministic behavior. Task with higher period (Here task2) is woken-up first than after task1 is woken-up ???

In short i want to tell that, 
I have given same priority to all the task, but output it is behaving like
 task5 is having highest priority
 task4's priority is lower than task5 but higher than task3

 task3's priority is lower than task4 but higher than task2 

 task2's priority is lower than task3 but higher than task1 

 task1 is having lowest priority 

??????????

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

* Re: [Xenomai] Jitter-test
  2012-07-28 21:24 [Xenomai] Jitter-test Uttamkumar Sinojia
@ 2012-07-28 21:26 ` Gilles Chanteperdrix
  2012-07-28 21:27 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-07-28 21:26 UTC (permalink / raw)
  To: Uttamkumar Sinojia; +Cc: xenomai

On 07/28/2012 11:24 PM, Uttamkumar Sinojia wrote:

> Here (as per the code) all task are having same priority(5).
> But configured periodic in such a way that all will wake-up at the same time(say t1).(ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_n);)


No, no, no, read my answer again.


-- 
                                                                Gilles.


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

* Re: [Xenomai] Jitter-test
  2012-07-28 21:24 [Xenomai] Jitter-test Uttamkumar Sinojia
  2012-07-28 21:26 ` Gilles Chanteperdrix
@ 2012-07-28 21:27 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-07-28 21:27 UTC (permalink / raw)
  To: Uttamkumar Sinojia; +Cc: xenomai

On 07/28/2012 11:24 PM, Uttamkumar Sinojia wrote:

> 
> 
> 
>> wake-up time of more than one task is same, in such case which task
>> will wake-up first can not be predicted. But as per the output (shown
>> below), the task with higher priority  is woken-up first----WHY
>> SO??????
> 
> 
> 
> Sorry, the statement is like this...
> 
> Here as all the task are having same priority. So when expected wake-up time of more than one task is same, in such case which task will wake-up first can not be predicted. But as per the output, the task with higher period is woken-up first----WHY SO?????? 
> 
> Let me tell more...
> Here (as per the code) all task are having same priority(5).
> But configured periodic in such a way that all will wake-up at the same time(say t1).(ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_n);)
> PERIOD_n  task1->1ms, task2->2ms, task3->3ms, task4->4ms, task5->5ms.


Also, when you "reply" to a mail, could you use the button "reply" of
your MUA, in order to generate a mail with proper references?

-- 
                                                                Gilles.


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

* Re: [Xenomai] jitter-test
  2012-07-28 18:49 [Xenomai] jitter-test Uttamkumar Sinojia
@ 2012-07-28 19:17 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-07-28 19:17 UTC (permalink / raw)
  To: Uttamkumar Sinojia; +Cc: xenomai

On 07/28/2012 08:49 PM, Uttamkumar Sinojia wrote:> Here as all the task
are having same priority. So when expected

> wake-up time of more than one task is same, in such case which task
> will wake-up first can not be predicted. But as per the output (shown
> below), the task with higher priority  is woken-up first----WHY
> SO??????


Unless you configured xenomai in periodic mode, the wake up time of the
tasks is not the same. Also, I do not understand your sentence:
you say that all tasks have the same priority, but you wonder why the
task with the highest priority wakes up. Errr seems you contradict
yourself, if there is a task with highest priority, then all tasks do
not have the same priority. And vice-versa.

> Here regarding to the task wake-up, i am not getting any relation
> like in previous case which was with respect to the period but the
> any number of time i load the module it is giving same seuence which
> should not happen as all the task are having same priority?????


Xenomai is deterministic, it will behave the same way given the same
events at the same time. Again, Xenomai is not tick based, but has an
aperiodic tic, so, each time you call "rt_task_set_periodic", you create
a periodic event that is not synchronized with the previous one.

-- 
                                                                Gilles.


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

* Re: [Xenomai] jitter-test
@ 2012-07-28 18:49 Uttamkumar Sinojia
  2012-07-28 19:17 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Uttamkumar Sinojia @ 2012-07-28 18:49 UTC (permalink / raw)
  To: xenomai



Please post the test code, tell us which version of xenomai you use, and
post the kernel configuration. And explain with the code what you would
expect and what you get.

-- 
                                                                Gilles.


Test code.........

Version XENOMAI 2.5.6


First setup with task periods 1ms, 2ms, 3ms, 4ms, 5ms.


#include <native/task.h>
#include <native/timer.h>


#define NO_TASK5//number of task descripter
#define TASK_STKSZ4096
#define TASK_MODE(T_FPU | T_CPU(0))


#define u_NSEC 1000//one microsecond in nanoseconds
#define m_NSEC 1000000//one millisecond in nanoseconds 
#define s_NSEC1000000000//one second in nanoseconds

#define SETUP_TICK_NSEC               1000000         //one millisecond timer tick - can be reasonably 
                                                //modified (increased or decreased)


#define PERIOD_1(m_NSEC*1)
#define PERIOD_2(m_NSEC*2)
#define PERIOD_3(m_NSEC*3)
#define PERIOD_4(m_NSEC*4)
#define PERIOD_5(m_NSEC*5)

/*
#define PERIOD_1(u_NSEC*100)
#define PERIOD_2(u_NSEC*200)
#define PERIOD_3(u_NSEC*300)
#define PERIOD_4(u_NSEC*400)
#define PERIOD_5(u_NSEC*500)
*/


#define WAKE_TIME(m_NSEC*200)
#define NO_ITERATION10

#define ONE_SHOT_MODE1//if it is define 1 then then select oneshot mode otherwise select 
                            //periodic mode


RT_TASK task_desc[NO_TASK];


int ret;

RTIME tmp=0;
RTIME task_pstart_time=0, systime1=0,systime2=0;

void rt_task_1(void *cookie)
{
RT_TASK_INFO rttinfo;
RTIME reltime;//to store wokenup time
RTIME  expected_time=0,cur_sys_time=0,jitter=0;
int i;
int tmp_ret;
systime2 = rt_timer_read();//read the current system time
        xnprintf("1->initial task system time ....value                 %llu \n", systime2);
        
        
        xnprintf("1->expected initial task wake up time ..value         %llu \n",task_pstart_time);
        
ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_1);
if(ret<0) { xnprintf("1->error in rt_task_set_periodic()  %d ...\n",ret); return ;}

systime2 = rt_timer_read();//read the current system time
        xnprintf("1->actual system time after first task wake-up...value%llu \n", 
                  systime2);
        
        xnprintf("1->initial jitter after first task wake-up....value   %lld \n", 
                  systime2-task_pstart_time);


for(i=1; i<=NO_ITERATION; ++i){
rt_task_wait_period(NULL);

             cur_sys_time = rt_timer_read();//read the sys_time
             expected_time = task_pstart_time + i*PERIOD_1;

             xnprintf("1->iteration %d ..expected task wake-up....value         %llu \n",i,expected_time);
  
             xnprintf("1->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             jitter = cur_sys_time - expected_time;
         //    xnprintf("1->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             xnprintf("1->iteration %d jitter after task wake-up....value %lld \n\n", i, jitter );
}//end of while
END:ret = 0;

}//end of rt_task_1 function





void rt_task_2(void *cookie)
{
RT_TASK_INFO rttinfo;
RTIME reltime;//to store wokenup time
RTIME  expected_time=0,cur_sys_time=0,jitter=0;
int i;
int tmp_ret;
systime2 = rt_timer_read();//read the current system time
        xnprintf("2->initial task system time ....value                 %llu \n", systime2);
        
        
        xnprintf("2->expected initial task wake up time ..value         %llu \n",task_pstart_time);
        
ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_2);
if(ret<0) { xnprintf("2->error in rt_task_set_periodic()  %d ...\n",ret); return ;}

systime2 = rt_timer_read();//read the current system time
        xnprintf("2->actual system time after first task wake-up...value%llu \n", 
                  systime2);
        
        xnprintf("2->initial jitter after first task wake-up....value   %lld \n", 
                  systime2-task_pstart_time);


for(i=1; i<=NO_ITERATION; ++i){
rt_task_wait_period(NULL);

             cur_sys_time = rt_timer_read();//read the sys_time
             expected_time = task_pstart_time + i*PERIOD_2;
             xnprintf("2->iteration %d ..expected task wake-up....value         %llu \n",i,expected_time);
      
             xnprintf("2->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             jitter = cur_sys_time - expected_time;
             xnprintf("2->iteration %d jitter after task wake-up....value %lld \n\n", i, jitter );
}//end of while
END:ret = 0;

}//end of rt_task_2 function



void rt_task_3(void *cookie)
{
RT_TASK_INFO rttinfo;
RTIME reltime;//to store wokenup time
RTIME  expected_time=0,cur_sys_time=0,jitter=0;
int i;
int tmp_ret;
systime2 = rt_timer_read();//read the current system time
        xnprintf("3->initial task system time ....value                 %llu \n", systime2);
        
        
        xnprintf("3->expected initial task wake up time ..value         %llu \n",task_pstart_time);
        
ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_3);
if(ret<0) { xnprintf("3->error in rt_task_set_periodic()  %d ...\n",ret); return ;}

systime2 = rt_timer_read();//read the current system time
        xnprintf("3->actual system time after first task wake-up...value%llu \n", 
                  systime2);
        
        xnprintf("3->initial jitter after first task wake-up....value   %lld \n", 
                  systime2-task_pstart_time);


for(i=1; i<=NO_ITERATION; ++i){
rt_task_wait_period(NULL);

             cur_sys_time = rt_timer_read();//read the sys_time
             expected_time = task_pstart_time + i*PERIOD_3;

             xnprintf("3->iteration %d ..expected task wake-up....value         %llu \n",i,expected_time);
 
             xnprintf("3->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             jitter = cur_sys_time - expected_time;
            xnprintf("3->iteration %d jitter after task wake-up....value %lld \n\n", i, jitter );
}//end of while
END:ret = 0;

}//end of rt_task_3 function



void rt_task_4(void *cookie)
{
RT_TASK_INFO rttinfo;
RTIME reltime;//to store wokenup time
RTIME  expected_time=0,cur_sys_time=0,jitter=0;
int i;
int tmp_ret;
systime2 = rt_timer_read();//read the current system time
        xnprintf("4->initial task system time ....value                 %llu \n", systime2);
        
        
        xnprintf("4->expected initial task wake up time ..value         %llu \n",task_pstart_time);
        
ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_4);
if(ret<0) { xnprintf("4->error in rt_task_set_periodic()  %d ...\n",ret); return ;}

systime2 = rt_timer_read();//read the current system time
        xnprintf("4->actual system time after first task wake-up...value%llu \n", 
                  systime2);
        
        xnprintf("4->initial jitter after first task wake-up....value   %lld \n", 
                  systime2-task_pstart_time);


for(i=1; i<=NO_ITERATION; ++i){
rt_task_wait_period(NULL);

             cur_sys_time = rt_timer_read();//read the sys_time
            expected_time = task_pstart_time + i*PERIOD_4;
             xnprintf("4->iteration %d ..expected task wake-up....value         %llu \n",i,expected_time);
 
             xnprintf("4->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             jitter = cur_sys_time - expected_time;
             xnprintf("4->iteration %d jitter after task wake-up....value %lld \n\n", i, jitter );
}//end of while
END:ret = 0;

}//end of rt_task_4 function



void rt_task_5(void *cookie)
{
RT_TASK_INFO rttinfo;
RTIME reltime;//to store wokenup time
RTIME  expected_time=0,cur_sys_time=0,jitter=0;
int i;
int tmp_ret;
systime2 = rt_timer_read();//read the current system time
        xnprintf("5->initial task system time ....value                 %llu \n", systime2);
        
        
        xnprintf("5->expected initial task wake up time ..value         %llu \n",task_pstart_time);
        
ret = rt_task_set_periodic(NULL, task_pstart_time, PERIOD_5);
if(ret<0) { xnprintf("5->error in rt_task_set_periodic()  %d ...\n",ret); return ;}

systime2 = rt_timer_read();//read the current system time
        xnprintf("5->actual system time after first task wake-up...value%llu \n", 
                  systime2);
        
        xnprintf("5->initial jitter after first task wake-up....value   %lld \n", 
                  systime2-task_pstart_time);


for(i=1; i<=NO_ITERATION; ++i){
rt_task_wait_period(NULL);

             cur_sys_time = rt_timer_read();//read the sys_time
             expected_time = task_pstart_time + i*PERIOD_5;
             xnprintf("5->iteration %d ..expected task wake-up....value         %llu \n",i,expected_time);

             xnprintf("5->iteration %d ..actual task wake-up....value           %llu \n", i, cur_sys_time);
             jitter = cur_sys_time - expected_time;
             xnprintf("5->iteration %d jitter after task wake-up....value %lld \n\n", i, jitter );
}//end of while
END:ret = 0;

}//end of rt_task_5 function





char *rt_task_name[NO_TASK]={"rt_task_1", "rt_task_2", "rt_task_3", "rt_task_4", "rt_task_5"};
int rt_task_prio[NO_TASK] = {5, 5, 5, 5, 5};//set the priority for each task
void(*rt_task_body[NO_TASK])(void *cookie) = {rt_task_1, rt_task_2, rt_task_3, rt_task_4, rt_task_5};
int init_module()
{
int i;
ret = 0;
#if ONE_SHOT_MODE == 1
ret = rt_timer_set_mode(TM_ONESHOT);
xnprintf("timer base in one-shot mode  ***********");
#else
ret = rt_timer_set_mode(SETUP_TICK_NSEC);
xnprintf("timer base in periodic mode  *********");
#endif
if(ret<0) {
xnprintf("error in rt_timer_set_mode()...\n");
return ret;
}
                
        systime1 = rt_timer_read();  //get system time 
task_pstart_time = systime1+WAKE_TIME;
        xnprintf("init...system time value  %llu \n", systime1);

for(i=0; i<NO_TASK; ++i) {
//create task
                //
ret = rt_task_create(&task_desc[i], rt_task_name[i], TASK_STKSZ, rt_task_prio[i], TASK_MODE);
if(ret<0) {xnprintf("error in rt_task_create()_1...\n"); return ret;}
                //start task
                //
ret = rt_task_start(&task_desc[i], rt_task_body[i], NULL);
if(ret<0) {
                            xnprintf("error in rt_task_start()_1...\n"); 
                            rt_task_delete(&task_desc[i]); 
                            return ret;
                        }
}//end of for_loop

xnprintf("end of init_module()...\n");
return 0;
}//end of init_module

void cleanup_module()
{
int i;
for(i=0; i<NO_TASK; ++i)
{
ret = rt_task_delete(&task_desc[i]);
if(ret<0 && ret!= -EINVAL) 
xnprintf("error in rt_task_delete()_1...\n");
}


}//end of cleanup_module


---End of code

Here as all the task are having same priority. So when expected wake-up time of more than one task is same, in such case which task will wake-up first can not be predicted. But as per the output (shown below), the task with higher priority  is woken-up first----WHY SO??????


Output of above code (I have shown here few of the iterations)


[ 1021.907885] Xenomai: timer base in one-shot mode  ***********
[ 1021.907888] Xenomai: init...system time value  1343517552907502766 
[ 1021.907902] Xenomai: 1->initial task system time ....value                 1343517552907513332 
[ 1021.907904] Xenomai: 1->expected initial task wake up time ..value         1343517553107502766 
[ 1021.907910] Xenomai: 2->initial task system time ....value                 1343517552907523652 
[ 1021.907912] Xenomai: 2->expected initial task wake up time ..value         1343517553107502766 
[ 1021.907918] Xenomai: 3->initial task system time ....value                 1343517552907531443 
[ 1021.907920] Xenomai: 3->expected initial task wake up time ..value         1343517553107502766 
[ 1021.907926] Xenomai: 4->initial task system time ....value                 1343517552907539224 
[ 1021.907928] Xenomai: 4->expected initial task wake up time ..value         1343517553107502766 
[ 1021.907933] Xenomai: 5->initial task system time ....value                 1343517552907546834 
[ 1021.907935] Xenomai: 5->expected initial task wake up time ..value         1343517553107502766 
[ 1021.907937] Xenomai: end of init_module()...
[ 1022.107903] Xenomai: 1->actual system time after first task wake-up...value1343517553107504736 
[ 1022.107906] Xenomai: 1->initial jitter after first task wake-up....value   1970 
[ 1022.107909] Xenomai: 2->actual system time after first task wake-up...value1343517553107508839 
[ 1022.107911] Xenomai: 2->initial jitter after first task wake-up....value   6073 
[ 1022.107913] Xenomai: 3->actual system time after first task wake-up...value1343517553107510938 
[ 1022.107916] Xenomai: 3->initial jitter after first task wake-up....value   8172 
[ 1022.107918] Xenomai: 4->actual system time after first task wake-up...value1343517553107512833 
[ 1022.107920] Xenomai: 4->initial jitter after first task wake-up....value   10067 
[ 1022.107923] Xenomai: 5->actual system time after first task wake-up...value1343517553107514827 
[ 1022.107925] Xenomai: 5->initial jitter after first task wake-up....value   12061 
[ 1022.108889] Xenomai: 1->iteration 1 ..expected task wake-up....value         1343517553108502766 
[ 1022.108892] Xenomai: 1->iteration 1 ..actual task wake-up....value           1343517553108501087 
[ 1022.108893] Xenomai: 1->iteration 1 jitter after task wake-up....value -1679 
[ 1022.108894] <--Here first task2(2ms) than task1(1ms)??
[ 1022.109894] Xenomai: 2->iteration 1 ..expected task wake-up....value         1343517553109502766 
[ 1022.109897] Xenomai: 2->iteration 1 ..actual task wake-up....value           1343517553109501863 
[ 1022.109900] Xenomai: 2->iteration 1 jitter after task wake-up....value -903 
[ 1022.109901] 
[ 1022.109903] Xenomai: 1->iteration 2 ..expected task wake-up....value         1343517553109502766 
[ 1022.109905] Xenomai: 1->iteration 2 ..actual task wake-up....value           1343517553109505481 
[ 1022.109908] Xenomai: 1->iteration 2 jitter after task wake-up....value 2715 
[ 1022.109909]  <--Here first task3(3ms) than task1(1ms)??
[ 1022.110894] Xenomai: 3->iteration 1 ..expected task wake-up....value         1343517553110502766 
[ 1022.110897] Xenomai: 3->iteration 1 ..actual task wake-up....value           1343517553110501886 
[ 1022.110899] Xenomai: 3->iteration 1 jitter after task wake-up....value -880 
[ 1022.110901] 
[ 1022.110903] Xenomai: 1->iteration 3 ..expected task wake-up....value         1343517553110502766 
[ 1022.110905] Xenomai: 1->iteration 3 ..actual task wake-up....value           1343517553110505324 
[ 1022.110907] Xenomai: 1->iteration 3 jitter after task wake-up....value 2558 
[ 1022.110909]  <--Here first task4(4ms), task2(2ms) than task1(1ms)??
[ 1022.111897] Xenomai: 4->iteration 1 ..expected task wake-up....value         1343517553111502766 
[ 1022.111900] Xenomai: 4->iteration 1 ..actual task wake-up....value           1343517553111501967 
[ 1022.111902] Xenomai: 4->iteration 1 jitter after task wake-up....value -799 
[ 1022.111903] 
[ 1022.111905] Xenomai: 2->iteration 2 ..expected task wake-up....value         1343517553111502766 
[ 1022.111907] Xenomai: 2->iteration 2 ..actual task wake-up....value           1343517553111505589 
[ 1022.111910] Xenomai: 2->iteration 2 jitter after task wake-up....value 2823 
[ 1022.111911] 
[ 1022.111913] Xenomai: 1->iteration 4 ..expected task wake-up....value         1343517553111502766 
[ 1022.111915] Xenomai: 1->iteration 4 ..actual task wake-up....value           1343517553111508100 
[ 1022.111918] Xenomai: 1->iteration 4 jitter after task wake-up....value 5334 
[ 1022.111919] 
[ 1022.112891] Xenomai: 5->iteration 1 ..expected task wake-up....value         1343517553112502766 
[ 1022.112893] Xenomai: 5->iteration 1 ..actual task wake-up....value           1343517553112501104 
[ 1022.112895] Xenomai: 5->iteration 1 jitter after task wake-up....value -1662 
[ 1022.112896] 
[ 1022.112897] Xenomai: 1->iteration 5 ..expected task wake-up....value         1343517553112502766 
[ 1022.112899] Xenomai: 1->iteration 5 ..actual task wake-up....value           1343517553112503723 
[ 1022.112901] Xenomai: 1->iteration 5 jitter after task wake-up....value 957 
[ 1022.112902] 





For second setup.....
Task period 100us, 200us, 300us, 400us, 500us

In the first code modify the task period as below

/*
#define PERIOD_1(m_NSEC*1)
#define PERIOD_2(m_NSEC*2)
#define PERIOD_3(m_NSEC*3)
#define PERIOD_4(m_NSEC*4)
#define PERIOD_5(m_NSEC*5)
*/

#define PERIOD_1(u_NSEC*100)
#define PERIOD_2(u_NSEC*200)
#define PERIOD_3(u_NSEC*300)
#define PERIOD_4(u_NSEC*400)
#define PERIOD_5(u_NSEC*500)


Here regarding to the task wake-up, i am not getting any relation like in previous case which was with respect to the period but the any number of time i load the module it is giving same seuence which should not happen as all the task are having same priority?????



[ 1304.914062] Xenomai: timer base in one-shot mode  ***********
[ 1304.914066] Xenomai: init...system time value  1343517835913573705 
[ 1304.914079] Xenomai: 1->initial task system time ....value                 1343517835913584110 
[ 1304.914081] Xenomai: 1->expected initial task wake up time ..value         1343517836113573705 
[ 1304.914088] Xenomai: 2->initial task system time ....value                 1343517835913594547 
[ 1304.914090] Xenomai: 2->expected initial task wake up time ..value         1343517836113573705 
[ 1304.914096] Xenomai: 3->initial task system time ....value                 1343517835913602454 
[ 1304.914097] Xenomai: 3->expected initial task wake up time ..value         1343517836113573705 
[ 1304.914103] Xenomai: 4->initial task system time ....value                 1343517835913610031 
[ 1304.914105] Xenomai: 4->expected initial task wake up time ..value         1343517836113573705 
[ 1304.914111] Xenomai: 5->initial task system time ....value                 1343517835913617629 
[ 1304.914112] Xenomai: 5->expected initial task wake up time ..value         1343517836113573705 
[ 1304.914114] Xenomai: end of init_module()...
[ 1305.114082] Xenomai: 1->actual system time after first task wake-up...value1343517836113575411 
[ 1305.114085] Xenomai: 1->initial jitter after first task wake-up....value   1706 
[ 1305.114088] Xenomai: 2->actual system time after first task wake-up...value1343517836113580708 
[ 1305.114090] Xenomai: 2->initial jitter after first task wake-up....value   7003 
[ 1305.114093] Xenomai: 3->actual system time after first task wake-up...value1343517836113582777 
[ 1305.114095] Xenomai: 3->initial jitter after first task wake-up....value   9072 
[ 1305.114097] Xenomai: 4->actual system time after first task wake-up...value1343517836113584717 
[ 1305.114100] Xenomai: 4->initial jitter after first task wake-up....value   11012 
[ 1305.114102] Xenomai: 5->actual system time after first task wake-up...value1343517836113586696 
[ 1305.114104] Xenomai: 5->initial jitter after first task wake-up....value   12991 
[ 1305.114167] Xenomai: 1->iteration 1 ..expected task wake-up....value         1343517836113673705 
[ 1305.114170] Xenomai: 1->iteration 1 ..actual task wake-up....value           1343517836113671710 
[ 1305.114172] Xenomai: 1->iteration 1 jitter after task wake-up....value -1995 
[ 1305.114173] 
[ 1305.114269] Xenomai: 1->iteration 2 ..expected task wake-up....value         1343517836113773705 
[ 1305.114272] Xenomai: 1->iteration 2 ..actual task wake-up....value           1343517836113771737 
[ 1305.114274] Xenomai: 1->iteration 2 jitter after task wake-up....value -1968 
[ 1305.114275] 
[ 1305.114277] Xenomai: 2->iteration 1 ..expected task wake-up....value         1343517836113773705 
[ 1305.114280] Xenomai: 2->iteration 1 ..actual task wake-up....value           1343517836113774504 
[ 1305.114282] Xenomai: 2->iteration 1 jitter after task wake-up....value 799 
[ 1305.114283] 
[ 1305.114369] Xenomai: 1->iteration 3 ..expected task wake-up....value         1343517836113873705 
[ 1305.114371] Xenomai: 1->iteration 3 ..actual task wake-up....value           1343517836113871673 
[ 1305.114374] Xenomai: 1->iteration 3 jitter after task wake-up....value -2032 
[ 1305.114375] 
[ 1305.114377] Xenomai: 3->iteration 1 ..expected task wake-up....value         1343517836113873705 
[ 1305.114379] Xenomai: 3->iteration 1 ..actual task wake-up....value           1343517836113874284 
[ 1305.114382] Xenomai: 3->iteration 1 jitter after task wake-up....value 579 
[ 1305.114383] 
[ 1305.114471] Xenomai: 1->iteration 4 ..expected task wake-up....value         1343517836113973705 
[ 1305.114474] Xenomai: 1->iteration 4 ..actual task wake-up....value           1343517836113971733 
[ 1305.114476] Xenomai: 1->iteration 4 jitter after task wake-up....value -1972 
[ 1305.114478] 
[ 1305.114479] Xenomai: 4->iteration 1 ..expected task wake-up....value         1343517836113973705 
[ 1305.114482] Xenomai: 4->iteration 1 ..actual task wake-up....value           1343517836113974325 
[ 1305.114484] Xenomai: 4->iteration 1 jitter after task wake-up....value 620 
[ 1305.114485] 
[ 1305.114487] Xenomai: 2->iteration 2 ..expected task wake-up....value         1343517836113973705 
[ 1305.114490] Xenomai: 2->iteration 2 ..actual task wake-up....value           1343517836113976729 
[ 1305.114492] Xenomai: 2->iteration 2 jitter after task wake-up....value 3024 
[ 1305.114493] 
[ 1305.114569] Xenomai: 1->iteration 5 ..expected task wake-up....value         1343517836114073705 
[ 1305.114572] Xenomai: 1->iteration 5 ..actual task wake-up....value           1343517836114071663 
[ 1305.114574] Xenomai: 1->iteration 5 jitter after task wake-up....value -2042 
[ 1305.114575] 
[ 1305.114577] Xenomai: 5->iteration 1 ..expected task wake-up....value         1343517836114073705 
[ 1305.114580] Xenomai: 5->iteration 1 ..actual task wake-up....value           1343517836114074334 
[ 1305.114582] Xenomai: 5->iteration 1 jitter after task wake-up....value 629 
[ 1305.114583] 
[ 1305.114669] Xenomai: 1->iteration 6 ..expected task wake-up....value         1343517836114173705 
[ 1305.114671] Xenomai: 1->iteration 6 ..actual task wake-up....value           1343517836114171632 
[ 1305.114673] Xenomai: 1->iteration 6 jitter after task wake-up....value -2073 
[ 1305.114674] 



So can you help me understand the wake-up of task for both cases.

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

* Re: [Xenomai] Jitter-test
  2012-07-14 22:54 [Xenomai] Jitter-test Uttamkumar Sinojia
@ 2012-07-20 18:39 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-07-20 18:39 UTC (permalink / raw)
  To: Uttamkumar Sinojia; +Cc: xenomai

On 07/15/2012 12:54 AM, Uttamkumar Sinojia wrote:
> 
> 
> Respected sir,
> 
> I have prepared a setup for checking the scheduling jitter
> values(current time - expected wake-up time) among five periodic task
> having same priority.
> 
> I have created 5 periodic real-time tasks with equal priority(say, 5)
> and wake them at the same time. Choosen task periods of 100us, 200us,
> 300us, 400us and 500us , respectively. Here in this case when more
> than one tasks are going to wake-up at same expected time, which
> process will be scheduled should be non-deterministic and i was
> getting it.
> 
> In another case, I have created 5 periodic real-time tasks with equal
> priority(say, 5) and wake them at the same time. Choosen task periods
> of 1ms, 2ms, 3ms, 4ms and 5ms , respectively. In this case i was
> getting the deterministic behavior in scheduling of the task(When
> expected time for more than one task was same, task with larger
> period was woken-up first). So, i was not getting the reason for this
> deterministic behavior.

Please post the test code, tell us which version of xenomai you use, and
post the kernel configuration. And explain with the code what you would
expect and what you get.

-- 
                                                                Gilles.


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

* [Xenomai] Jitter-test
@ 2012-07-14 22:54 Uttamkumar Sinojia
  2012-07-20 18:39 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Uttamkumar Sinojia @ 2012-07-14 22:54 UTC (permalink / raw)
  To: xenomai



Respected sir,

I have prepared a setup for checking the scheduling jitter values(current time - expected wake-up time) among five periodic task having same priority.

I have created 5 periodic real-time tasks with equal priority(say, 5) and wake them at the same time.
Choosen task periods of 100us, 200us, 300us, 400us and 500us , respectively. Here in this case when more than one tasks are going to wake-up at same expected time, which process will be scheduled should be non-deterministic and i was getting it. 

In another case, I have created 5 periodic real-time tasks with equal priority(say, 5) and wake them at the same time. Choosen task periods of 1ms, 2ms, 3ms, 4ms and 5ms , respectively. In this case i was getting the deterministic behavior in scheduling of the task(When expected time for more than one task was same, task with larger period was woken-up first). So, i was not getting the reason for this deterministic behavior.



[ 4530.480198] Xenomai: 1->iteration 1 ..expected task wake-up....value         1339875162478491464 
[ 4530.480200] Xenomai: 1->iteration 1 ..actual task wake-up....value              1339875162478491498 
[ 4530.480202] Xenomai: 1->1 th jitter initial jitter after first task wake-up....value 34 
[ 4530.480206] 


[ 4530.481206] Xenomai: 2->iteration 1 ..expected task wake-up....value         1339875162479491464 

[ 4530.481209] Xenomai: 2->iteration 1 ..actual task wake-up....value              1339875162479492503 
[ 4530.481211] Xenomai: 2->1 th jitter initial jitter after first task wake-up....value 1039 
[ 4530.481216] 
[ 4530.481220] Xenomai: 1->iteration 2 ..expected task wake-up....value         1339875162479491464 

[ 4530.481223] Xenomai: 1->iteration 2 ..actual task wake-up....value              1339875162479496632 
[ 4530.481225] Xenomai: 1->2 th jitter initial jitter after first task wake-up....value 5168 
[ 4530.481230] 


[ 4530.482201] Xenomai: 3->iteration 1 ..expected task wake-up....value         1339875162480491464 

[ 4530.482203] Xenomai: 3->iteration 1 ..actual task wake-up....value              1339875162480491406 
[ 4530.482205] Xenomai: 3->1 th jitter initial jitter after first task wake-up....value -58 
[ 4530.482208] 

[ 4530.482211] Xenomai: 1->iteration 3 ..expected task wake-up....value         1339875162480491464 

[ 4530.482213] Xenomai: 1->iteration 3 ..actual task wake-up....value              1339875162480494531 
[ 4530.482215] Xenomai: 1->3 th jitter initial jitter after first task wake-up....value 3067 
[ 4530.482218] 


[ 4530.483204] Xenomai: 4->iteration 1 ..expected task wake-up....value         1339875162481491464 

[ 4530.483206] Xenomai: 4->iteration 1 ..actual task wake-up....value              1339875162481491620 
[ 4530.483208] Xenomai: 4->1 th jitter initial jitter after first task wake-up....value 156 
[ 4530.483211] 

[ 4530.483215] Xenomai: 2->iteration 2 ..expected task wake-up....value         1339875162481491464 

[ 4530.483216] Xenomai: 2->iteration 2 ..actual task wake-up....value              1339875162481494697 
[ 4530.483218] Xenomai: 2->2 th jitter initial jitter after first task wake-up....value 3233 
[ 4530.483221] 

[ 4530.483224] Xenomai: 1->iteration 4 ..expected task wake-up....value         1339875162481491464 

[ 4530.483226] Xenomai: 1->iteration 4 ..actual task wake-up....value              1339875162481497647 
[ 4530.483228] Xenomai: 1->4 th jitter initial jitter after first task wake-up....value 6183 

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

end of thread, other threads:[~2012-07-28 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 21:24 [Xenomai] Jitter-test Uttamkumar Sinojia
2012-07-28 21:26 ` Gilles Chanteperdrix
2012-07-28 21:27 ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2012-07-28 18:49 [Xenomai] jitter-test Uttamkumar Sinojia
2012-07-28 19:17 ` Gilles Chanteperdrix
2012-07-14 22:54 [Xenomai] Jitter-test Uttamkumar Sinojia
2012-07-20 18:39 ` Gilles Chanteperdrix

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.