On 12/30/2011 01:01 AM, Gilles Chanteperdrix wrote:
> On 12/29/2011 10:43 PM, Terry Fryar wrote:
>> Using 2.6.0, I am have trouble understanding the results of the
>> rt_task_info() call?
>>  
>> Have a very simple kernel module that fires off an ISR routine and a xenomai
>> task.  The IRQ is not firing for these tests, so it's not doing anything.
>> Here's the xenomai rt task created using rt_create_task():
>>  
>> void irqdrv_task(void *args)
>> {
>>     while (!irqdrv_terminated)
>>      {
>>           rt_task_sleep(10000000);
>>      }
>> }
>>  
>> So, in the driver "exit" code, right before I delete this task I do a
>> rt_task_info() and I see no context switches and very little exec time for
>> this task.  However, it's showing 1,000,000 mode switches in just 5 or 10
>> seconds of exec time??
>>  
>> The info.modeswitches is the number of times the task switches between
>> primary and secondary mode, yes??  Why in the world are there so many for a
>> small task doing nothing but call a xenomai function, and in a kernel driver
>> to boot!!
>>  
>> Am I missing something here....shouldn't mode switches be zero???  I'm not
>> calling any linux kernel functions...it shouldn't have switched ever??
> 
> mode switches do not exist for kernel-space tasks. So, reading the
> modeswitch member of the task info structure for a kernel space task
> does not really make sense. Which is why probably nobody else noticed
> (that, and the fact that the native API in kernel-space is not very much
> in use, these days).
> 
the mode switches count should still be zero. Could you show us the full
test code?

-- 
                                                                Gilles.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to