All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [Xenomai-help] my tick takes a break !!
@ 2006-04-24  9:49 Thomas, Brieuc (GE Healthcare)
  2006-04-24 13:27 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas, Brieuc (GE Healthcare) @ 2006-04-24  9:49 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai


 > -----Message d'origine-----
 > De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
 > Envoyé : dimanche 23 avril 2006 14:54
 > À : Thomas, Brieuc (GE Healthcare)
 > Cc : xenomai@xenomai.org
 > Objet : RE: [Xenomai-help] my tick takes a break !! 
 > 
 > Thomas, Brieuc \(GE Healthcare\) wrote:
 >  > I tried it, but there isn't any change !
 >  > I've got the same behaviour.
 > 
 > I could reproduce your bug here. The uvm-timer thread is blocked in W state, just as if the interrupts were locked.
 > 
 > -- 
 > 
 > 
 > 					    Gilles Chanteperdrix.
 > 

Yes but, I've allowed the interrupts from the compile, and I never used intLock() or something like that!
By the way, I made some test: and if I add a taskLock() before the heavy while() and a taskUnlock() just after this while, my tick number is updated. But the task behaviour is the same; the task doesn't give the priority to the other task.
The second test is: I've added a takdelay() before the heavy while(). The tick counter work's, the task behaviour is fine, but evidently the workout takes a long time!  

In fact, I think than I never seen working the schedule without delay() (like taskdelay() or msqReceive(WAIT)...)  I've got probably a bad configuration somewhere!
Then I tried the trunk version, and I've got an error message during the launch, either:    

When I compile a periodic timer mode:
Xenomai: UVM skin init failed, code -16
Xenomai: starting Vxworks services
Or, in aperiodic mode:
Xenomai: starting UVM services
Xenomai: incompatible timer mode(aperiodic found, need periodic).
Xenomai: Vxworks skin init failed, code -16

Perhaps my first problem, come from to the timer mode? Normally my configuration is status=oneshot:setup=202:tickval=1... 

Any idea?
 
	Brieuc THOMAS.


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: [Xenomai-help] my tick takes a break !!
@ 2006-04-21 16:16 Thomas, Brieuc (GE Healthcare)
  2006-04-23 12:53 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas, Brieuc (GE Healthcare) @ 2006-04-21 16:16 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

I tried it, but there isn't any change !
I've got the same behaviour.

Brieuc.

-----Message d'origine-----
De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Envoyé : vendredi 21 avril 2006 15:57
À : Thomas, Brieuc (GE Healthcare)
Cc : xenomai@xenomai.org
Objet : RE: [Xenomai-help] my tick takes a break !! 

Thomas, Brieuc \(GE Healthcare\) wrote:
 > Oh no! Sorry, I mean the real-time tick counter!

Could you try the attached patch ?

-- 


					    Gilles Chanteperdrix.



^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: [Xenomai-help] my tick takes a break !!
@ 2006-04-20  9:23 Thomas, Brieuc (GE Healthcare)
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas, Brieuc (GE Healthcare) @ 2006-04-20  9:23 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

> > Thomas, Brieuc \(GE Healthcare\) wrote:
> >  > Hi every one !
> >  >
> >  > I really don't understand, my porting of application works very
well
> >  > (under vxworks skin), message, semaphore, timer... Except the
task !!
> >  > I've got a curious behaviour, when I've got a heavy task, the
kernel
> >  > tick counter stop during the process!!
> >  >
> >  > And take back when this one is finish.
> >  >
> >  > Therefore the other tasks are freeze and my application crash.
> >  >
> >  >
> >  >
> >  > have You already seen this case?
> >
> > I do not know if it is what you mean, but when running Xenomai, your
>> tasks are supposed to suspend sufficiently frequently to leave Linux
> > tick normally. This means that if you configured CONFIG_HZ=100, your
> > real-time activity (including kernel-space tasks and user-space
tasks in > > primary mode) is supposed to take a break at least once
every 1/100 > > second.
> >
> > --
> >
> > 
> > 					    Gilles Chanteperdrix.
> >
> > Oh no! Sorry, I mean the real-time tick counter!
>
>If the heavy task is using intLock() then yes, it will prevent the
timer from ticking. If >you are observing something else, could you send
to this mailing list a minimal test case >illustrating what you are
observing?
>
> > But if my real-time activity don't take a break during a while (more
> than 1/100 >second), Is it dangerous for my real-time activity? 
>
>If you do not let Linux run often enough, it will crash, and this is
dangerous for your >real-time activity. 
>I do not know exactly how much is "often enough", and it probably
depends on many >factors, but if you want Linux timed services to work
normally, you should let Linux timer >tick regularly.
>-- 
>
>					    Gilles Chanteperdrix.
>

No I don't use intLock().
I use this test to observe the tasks behaviour, with two same priority
tasks.
The first task "testRun1" print the tick number, the number of the task
changed and if it's the same task (between my task) since last
timeslice.
The second one is the heavy task, it's print the tick number, the number
of the task changed and if it's the same task (between my task) since
last timeslice. And also some information about the progression task
(here the number of the loop with the tick number).

void testRun1()
{	printf("Start testRun1 %d taskChanged %d\n", (int)tickGet(),
taskChanged);
	const unsigned int taskId = 1;
	unsigned int startTime1 = tickGet();

	while(1)
	{	taskDelay(100);
		
		if(taskRunning != taskId)
		{
			taskRunning = taskId;
			taskChanged++;
			printf("Run testRun1 %d taskChanged %d\n",
(int)tickGet(), taskChanged);
		}
		else printf("Run testRun1 %d No changed\n",
(int)tickGet());
	}
	printf("End testRun1 %d taskChanged %d\n", (int)tickGet(),
taskChanged);
}

void testRun2()
{	printf("Start testRun2 %d taskChanged %d\n", (int)tickGet(),
taskChanged);
	const unsigned int taskId = 2;
	unsigned int startTime1 = tickGet();
	taskDelay(100);

	while( //ten times for example )
	{	
		printf("Start while tick: %d \n",(int)tickGet());
		while(//var)	// take around one second
		{	// workout
			if(taskRunning != taskId)
			{
				taskRunning = taskId;
				taskChanged++;
				printf("Run testRun2 %d taskChanged
%d\n", (int)tickGet(), taskChanged);
			}
		}
	}
	printf("End testRun2 %d taskChanged %d\n", (int)tickGet(),
taskChanged); 
}
***
The result see below:
***
Start testRun1 0 taskChanged 0    <--
Start testRun2 0 taskChanged 0      |
Run testRun1 100 taskChanged 1      |
Start while 1 tick: 100 NO changed  |- Changing OK, every 100ms
Run testRun2 100 taskChanged 2      |
Run testRun1 200 taskChanged 3      |
Run testRun2 200 taskChanged 4    <--  
Start while 2 tick: 200     <--
Start while 3 tick: 200       |
Start while 4 tick: 200       |
Start while 5 tick: 200       |- ticks break, while 10 second 
Start while 6 tick: 200       | 
Start while 7 tick: 200       | 
Start while 8 tick: 200       |
Start while 9 tick: 200     <--       |
End testRun2 200 taskChanged 4
Run testRun1 300 taskChanged 5
End testRun2 30010 taskChanged 5



^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: [Xenomai-help] my tick takes a break !!
@ 2006-04-19 16:55 Thomas, Brieuc (GE Healthcare)
  2006-04-19 20:34 ` Gilles Chanteperdrix
  2006-04-21 13:56 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 15+ messages in thread
From: Thomas, Brieuc (GE Healthcare) @ 2006-04-19 16:55 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

 
Thomas, Brieuc \(GE Healthcare\) wrote:
 > Hi every one !
 >
 > I really don't understand, my porting of application works very well
> (under vxworks skin), message, semaphore, timer... Except the task !!
 > I've got a curious behaviour, when I've got a heavy task, the kernel
> tick counter stop during the process!!
 >
 > And take back when this one is finish.
 >
 > Therefore the other tasks are freeze and my application crash.
 >
 >
 >
 > have You already seen this case?

I do not know if it is what you mean, but when running Xenomai, your
tasks are supposed to suspend sufficiently frequently to leave Linux
tick normally. This means that if you configured CONFIG_HZ=100, your
real-time activity (including kernel-space tasks and user-space tasks in
primary mode) is supposed to take a break at least once every 1/100
second.

-- 


					    Gilles Chanteperdrix.

Oh no! Sorry, I mean the real-time tick counter!
But if my real-time activity don't take a break during a while (more
than 1/100 second), Is it dangerous for my real-time activity? 

Brieuc THOMAS.


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [Xenomai-help] my tick takes a break !!
@ 2006-04-19 15:05 Thomas, Brieuc (GE Healthcare)
  2006-04-19 15:18 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas, Brieuc (GE Healthcare) @ 2006-04-19 15:05 UTC (permalink / raw)
  To: xenomai

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

Hi every one !

I really don't understand, my porting of application works very well
(under vxworks skin), message, semaphore, timer... Except the task !!
I've got a curious behaviour, when I've got a heavy task, the kernel
tick counter stop during the process!!

And take back when this one is finish.

Therefore the other tasks are freeze and my application crash.

 

have You already seen this case?

 

Ps: I use xenomai-2.1.0 & kernel2.6.14-6


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

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

end of thread, other threads:[~2006-04-24 14:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-24  9:49 [Xenomai-help] my tick takes a break !! Thomas, Brieuc (GE Healthcare)
2006-04-24 13:27 ` Gilles Chanteperdrix
2006-04-24 13:37   ` Philippe Gerum
2006-04-24 13:44     ` Gilles Chanteperdrix
2006-04-24 14:06       ` Philippe Gerum
2006-04-24 14:16         ` Gilles Chanteperdrix
2006-04-24 14:32           ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2006-04-21 16:16 Thomas, Brieuc (GE Healthcare)
2006-04-23 12:53 ` Gilles Chanteperdrix
2006-04-20  9:23 Thomas, Brieuc (GE Healthcare)
2006-04-19 16:55 Thomas, Brieuc (GE Healthcare)
2006-04-19 20:34 ` Gilles Chanteperdrix
2006-04-21 13:56 ` Gilles Chanteperdrix
2006-04-19 15:05 Thomas, Brieuc (GE Healthcare)
2006-04-19 15:18 ` 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.