All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Mode switches??
@ 2011-12-29 21:43 Terry Fryar
  2011-12-30  0:01 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Terry Fryar @ 2011-12-29 21:43 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

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??
 

[-- Attachment #2: Type: text/html, Size: 2431 bytes --]

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

end of thread, other threads:[~2012-01-02 17:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 21:43 [Xenomai-help] Mode switches?? Terry Fryar
2011-12-30  0:01 ` Gilles Chanteperdrix
2011-12-30 10:23   ` Gilles Chanteperdrix
2012-01-02 14:27     ` Terry Fryar
2012-01-02 15:02       ` Gilles Chanteperdrix
2012-01-02 17:58         ` Terry Fryar

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.