Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-30 Thread Dmitry Adamushko
Hello Jan, I appologize for the huge reply latency. Yeah, that might explain while already trying to parse it manually failed: What is xnintr_sync_stat_references? :) yeah.. it was supposed to be xnintr_sync_stat_refs() 'prev = xnstat_get_current()' reference is also tracked as reference

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-25 Thread Jan Kiszka
Hi Dmitry, Dmitry Adamushko wrote: Hello Jan, well, take it with 2 huge grains of salt.. it's even not compile-tested :-) Yeah, that might explain while already trying to parse it manually failed: What is xnintr_sync_stat_references? :) I don't think I've got it really nicer than your

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-22 Thread Dmitry Adamushko
On 22/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ ... ] Only compile-tested under various .configs. Any comment welcome. @@ -76,7 +102,7 @@ static inline void xnintr_stat_counter_d static void xnintr_irq_handler(unsigned irq, void *cookie) { xnsched_t *sched =

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-22 Thread Jan Kiszka
Jan Kiszka wrote: Dmitry Adamushko wrote: On 21/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ .. ] surprise-surprise.. sure, one way or another it must be fixed. heh.. too many bugs (and I don't even want to say who's responsible) :-/ I wouldn't accept all the responsibility if I were you. I

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Dmitry Adamushko
On 20/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ ... ] xnintr_attach/detach()).. your approach does increase a worst case length of the lock(intrlock) -- unlock(intrlock) section... but that's unlikely to be critical. I think, the patch I sent before addresses a reported earlier case

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Jan Kiszka
Dmitry Adamushko wrote: On 20/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ ... ] xnintr_attach/detach()).. your approach does increase a worst case length of the lock(intrlock) -- unlock(intrlock) section... but that's unlikely to be critical. I think, the patch I sent before addresses

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Dmitry Adamushko
On 21/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ ... ] Unfortunately, that whole thing make me meditate about the whole issue again. And now I wonder why we make such a fuss about locking for shared IRQs (where it should be correct with any of the new patches) while we do not care about

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Jan Kiszka
Dmitry Adamushko wrote: On 21/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ ... ] Unfortunately, that whole thing make me meditate about the whole issue again. And now I wonder why we make such a fuss about locking for shared IRQs (where it should be correct with any of the new patches) while

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Dmitry Adamushko
On 21/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ .. ] surprise-surprise.. sure, one way or another it must be fixed. heh.. too many bugs (and I don't even want to say who's responsible) :-/ I wouldn't accept all the responsibility if I were you. I have no problems in this respect. I was

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Jan Kiszka
Dmitry Adamushko wrote: On 21/06/07, Jan Kiszka [EMAIL PROTECTED] wrote: [ .. ] surprise-surprise.. sure, one way or another it must be fixed. heh.. too many bugs (and I don't even want to say who's responsible) :-/ I wouldn't accept all the responsibility if I were you. I have no

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Philippe Gerum
On Thu, 2007-06-21 at 13:05 +0200, Jan Kiszka wrote: Jan Kiszka wrote: Well, and I wonder what this xnarch_memory_barrier() at each handler entry is for. Seems to be there for ages, don't see why right now. AFAICT, this probably dates back to Xenomai 1.x, when we used to have a threaded

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-21 Thread Jan Kiszka
Philippe Gerum wrote: On Thu, 2007-06-21 at 13:05 +0200, Jan Kiszka wrote: Jan Kiszka wrote: Well, and I wonder what this xnarch_memory_barrier() at each handler entry is for. Seems to be there for ages, don't see why right now. AFAICT, this probably dates back to Xenomai 1.x, when we used

Re: [Xenomai-core] [RFC][PATCH] shirq locking rework

2007-06-20 Thread Dmitry Adamushko
Hello Jan, Well, I hate nested locks when it comes to real-time, but in this case I really found no simpler approach. There is the risk of deadlocks via IRQ:xnintr_shirq::lock - handler - nklock vs. Application:nklock - xnintr_attach/detach - xnintr_shirq::lock, it's also