Skip to contentSkip to conversation

more geode issues

Xenomai-help Steven Seeger 2 participants 7 messages Nov 11, 2007 – Nov 27, 2007

lore
Share & tools
lore
#0 lore raw

I'm trying to get 2.6.23 to work with rc5. I've also tried trunk. I'm noticing the following behavior:

I'm using a geode GX1 board. The following relevant settings work with 2.6.22-2 and rc3:

Tickless system, one shot, TSC, geode 2cx200hr timer, and high res timers.

Everything is great with 2.6.22-2 and this config. The same settings on 2.6.23, however, yield an extremely fast blinking cursor in the framebuffer when xeno_nucleus is loaded. When xeno_native is loaded, the system runs fine except the timer interrupt is messed up for linux and the realtime tasks. A sleep 1 may take a couple minutes to return. If I switch to another VT and do a cat /lib/* or something, then it runs fine. I have a realtime task that acts as a sound driver.

I've talked to Philippe about this problem privately, and there's no real solution yet. I'm just posting it on the list now.

Also, I'm having an issue with select() locking up the system with pipes. I saw there was a change made to pipe in trunk and am going to try and get that going with 2.6.22-2 now. If anyone knows anything about these two issues, please let me know.

Thanks,

Steven

PS - It's good to finally be back on the list. I was hoping to not have to use this email address... but oh well. :-)

#1 lore raw

Just to let everyone know, select() still locks up on me with 2.6.22.2 and revision 3169.

All I'm doing is opening up a pipe in linux and select() on it for reading, and then opening up that pipe on the realtime side. Then, I hit control-C. I load the program again and it locks up when I hit control-C again. This won't happen the 2nd time if I unload and reload the nucleus.

Steven

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Steven Seeger
Sent: Saturday, November 10, 2007 5:36 PM
To: [email protected]
Subject: [Xenomai-help] more geode issues

I'm trying to get 2.6.23 to work with rc5. I've also tried trunk. I'm noticing the following behavior:

I'm using a geode GX1 board. The following relevant settings work with 2.6.22-2 and rc3:

Tickless system, one shot, TSC, geode 2cx200hr timer, and high res timers.

Everything is great with 2.6.22-2 and this config. The same settings on 2.6.23, however, yield an extremely fast blinking cursor in the framebuffer when xeno_nucleus is loaded. When xeno_native is loaded, the system runs fine except the timer interrupt is messed up for linux and the realtime tasks. A sleep 1 may take a couple minutes to return. If I switch to another VT and do a cat /lib/* or something, then it runs fine. I have a realtime task that acts as a sound driver.

I've talked to Philippe about this problem privately, and there's no real solution yet. I'm just posting it on the list now.

Also, I'm having an issue with select() locking up the system with pipes. I saw there was a change made to pipe in trunk and am going to try and get that going with 2.6.22-2 now. If anyone knows anything about these two issues, please let me know.

Thanks,

Steven

PS - It's good to finally be back on the list. I was hoping to not have to use this email address... but oh well. :-)

#2 lore raw
Quoted 10 lines · Steven Seeger

Just to let everyone know, select() still locks up on me with 2.6.22.2 and revision 3169.

All I’m doing is opening up a pipe in linux and select() on it for reading, and then opening up that pipe on the realtime side. Then, I hit control-C. I load the program again and it locks up when I hit control-C again. This won’t happen the 2^nd time if I unload and reload the nucleus.

The way we were handling the poll handler was broken. Fixed in both v2.3.x and trunk branches. The attached patch is on top of commit #3166.

Signature · 1 line
Philippe.
nucleus/pipe.h +0 -1
Index: include/nucleus/pipe.h
===================================================================
@@ -101,7 +101,6 @@
     struct fasync_struct *asyncq;
     wait_queue_head_t readq;		/* open/read/poll waiters */
     wait_queue_head_t syncq;		/* sync waiters */
-    unsigned int nwait;
     size_t ionrd;
 
 } xnpipe_state_t;
nucleus/pipe.c +3 -9
Index: ksrc/nucleus/pipe.c
===================================================================
@@ -97,8 +97,6 @@
 		__setbits(state->status, mask);
 	}
 
-	state->nwait++;
-
 	xnlock_put_irqrestore(&nklock, s);
 }
 
@@ -135,7 +133,7 @@
 
 	xnlock_get_irqsave(&nklock, s);
 
-	if (--state->nwait == 0) {
+	if (testbits(state->status, mask)) {
 		__clrbits(state->status, mask);
 		removeq(&xnpipe_sleepq, &state->slink);
 	}
@@ -635,7 +633,6 @@
 	file->private_data = state;
 	init_waitqueue_head(&state->readq);
 	init_waitqueue_head(&state->syncq);
-	state->nwait = 0;
 
 	__clrbits(state->status,
 		  XNPIPE_USER_ALL_WAIT | XNPIPE_USER_ALL_READY | XNPIPE_USER_SIGIO);
@@ -699,12 +696,9 @@
 
 	xnlock_get_irqsave(&nklock, s);
 
-	if (testbits(state->status, XNPIPE_USER_WREAD))
-		xnpipe_dequeue_wait(state, XNPIPE_USER_WREAD);
+	if (testbits(state->status, XNPIPE_USER_WREAD|XNPIPE_USER_WSYNC))
+		xnpipe_dequeue_wait(state, XNPIPE_USER_WREAD|XNPIPE_USER_WSYNC);
 
-	if (testbits(state->status, XNPIPE_USER_WSYNC))
-		xnpipe_dequeue_wait(state, XNPIPE_USER_WSYNC);
-
 	if (testbits(state->status, XNPIPE_KERN_CONN)) {
 		int minor = xnminor_from_state(state);
 
#3 lore raw

The select problem is now fixed running 2.6.22.2 and trunk (3174.) However, I now notice that with this combination I see that the cursor blinks very fast when I load the nucleus. However, when I load native it runs fine. I am not saying that this is a new condition... I may have not tested it by only loading nucleus.

On 2.6.22.2, if I load native it fixes the fast interrupt problem. On 2.6.23, the interrupts slow down by a factor of 10. Unloading xeno_native on both systems yields correct interrupt behavior even with the nucleus loaded.

Steven

#4 lore raw
Quoted 7 lines · Steven Seeger

On 2.6.22.2, if I load native it fixes the fast interrupt problem. On 2.6.23, the interrupts slow down by a factor of 10. Unloading xeno_native on both systems yields correct interrupt behavior even with the nucleus loaded.

From your description, I understand that:

...boot...

# modprobe xeno_nucleus => fast timer
# modprobe xeno_native => slow timer
# rmmod xeno_native => timer ticks normally

Is that correct?

Signature · 1 line
Philippe.
#5 lore raw
In reply to Steven Seeger
Quoted 14 lines · Steven Seeger

I’m trying to get 2.6.23 to work with rc5. I’ve also tried trunk. I’m noticing the following behavior:

I’m using a geode GX1 board. The following relevant settings work with 2.6.22-2 and rc3:

Tickless system, one shot, TSC, geode 2cx200hr timer, and high res timers.

Quoted 8 lines

Everything is great with 2.6.22-2 and this config. The same settings on 2.6.23, however, yield an extremely fast blinking cursor in the framebuffer when xeno_nucleus is loaded. When xeno_native is loaded, the system runs fine except the timer interrupt is messed up for linux and the realtime tasks. A sleep 1 may take a couple minutes to return. If I switch to another VT and do a cat /lib/* or something, then it runs fine. I have a realtime task that acts as a sound driver.

Since you still have access to a shell, could you send the output of a couple of "cat /proc/interrupts /proc/xenomai/irq" with roughly a one-second delay between them? I'd like to know how many timer interrupts are reported during this period.

Quoted 5 lines

I’ve talked to Philippe about this problem privately, and there’s no real solution yet. I’m just posting it on the list now.

It's a matter of being able to reproduce this behaviour, as usual. Your .config for 2.6.23 would help too.

Quoted 6 lines

Also, I’m having an issue with select() locking up the system with pipes. I saw there was a change made to pipe in trunk and am going to try and get that going with 2.6.22-2 now. If anyone knows anything about these two issues, please let me know.

The latest change is meant to have the real-time side receive a zero byte count when the channel is closed by the Linux-side peer while reading from it. I'll have a look at the select() issue once -rc6 is out.

--
Philippe.

#6 lore raw
Quoted 4 lines

Since you still have access to a shell, could you send the output of a couple of "cat /proc/interrupts /proc/xenomai/irq" with roughly a one-second delay between them? I'd like to know how many timer interrupts are reported during this period.

In Linux without any loaded xenomai modules, it's 1000 per second as expected.

When I load the nucleus, it's about 3000. The cursor is blinking faster and everything is faster. When I load xeno_native, it's 100.

Weird.

Please find my .config attached.

Thank you,
Steven