Message-ID: Date: Sat, 11 Feb 2006 20:58:51 +0200 From: Dmitry Adamushko In-Reply-To: <43EDDF9E.4030309@domain.hid> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7313_7695940.1139684331117" References: <43ECD570.5000704@domain.hid> <43EDDF9E.4030309@domain.hid> Subject: [Xenomai-core] Re: [shirq] first test results List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai@xenomai.org ------=_Part_7313_7695940.1139684331117 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/02/06, Jan Kiszka wrote: > > Dmitry Adamushko wrote: > > And as an additional option, > > it could be interesting to print out to the log if not all "counter" > values > > then min,max,average (the same like for the latency :) per second or pe= r > > 1000 interrupts; so to see whether tweaking the MAX_EDGEIRQ_COUNTER may > make > > the things better. > > Yes, maybe it's too small. But this also depends on the absolute time > required for so many loops, something we should see in the traces then. > I'm afraid that we will finally have to move the UART's read-from-fifo > to task context to reduce the time spent in IRQ context. Good. Keep me informed as before. > Maybe we'd better go for 1, just in case somebody would like to know > > the actual number of virq occuried. Although, I can imagine that only > > for debugging reasons and of no avail for the normal users, so maybe 2 > :) > > I have no final opinion yet. Having some names also behind the virtual > IRQs would be really nice for debugging, but it would also break another > bulk of API calls. Just marking those IRQs virtual would render the > related output of /proc/xenomai/irq not very useful in my eye - as long > as you do not know what's behind it. Just dropping this information is > then likely better. Yep. Let's just avoid printing it. >> Then I stumbled over the xnintr structure. Why do you keep a copy of the > >> device name? > >> A "const char *" should be enough, we just have to demand > >> that it will remain valid as long as the xnintr structure itself (i.e. > >> during the IRQ being attached). Saves a few bytes. :) > > > > Could be if all the users of it are initially kernel-mode entities. > > > > But e.g. there is a version of rt_intr_create() that may be called by > > user-space > > apps and I extended it to support the "name" parameter too : > > > > int rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, int > mode); > > > > In such a case, the kernel-side rt_intr_create() is called with the > "name" > > allocated on the stack in skins/native/syscall.c : __rt_intr_create()) > > so the initial copy of the name can not remain valid. > > But you could create buffer space for a copy of the name in the same > block already allocated for RT_INTR. Should be straightforward. RT_INTR does not have the "name" field any more. I have removed it after adding the same field to the xnintr_t as it became redundant. To access the "name", any code in native skin does "intr->intr_base.name" (intr_base is of "xnintr_t" type). Jan > > > > -- Best regards, Dmitry Adamushko ------=_Part_7313_7695940.1139684331117 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On 11/02/06, Jan Kiszka <jan.kiszka@domain.hid= .de> wrote:
Dmitry Adamushko wrote:
> And as an additional option,
> it cou= ld be interesting to print out to the log if not all "counter" va= lues
> then min,max,average (the same like for the latency :) per sec= ond or per
> 1000 interrupts; so to see whether tweaking the MAX_EDGEIRQ_COUNTE= R may make
> the things better.

Yes, maybe it's too small. But= this also depends on the absolute time
required for so many loops, some= thing we should see in the traces then.
I'm afraid that we will finally have to move the UART's read-from-fifo<= br>to task context to reduce the time spent in IRQ context.


Good. Keep me informed as before.

> Maybe = we'd better go for 1, just in case somebody would like to know
> the = actual number of virq occuried. Although, I can imagine that only
> for debugging reasons and of no avail for the normal users, so may= be 2 :)

I have no final opinion yet. Having some names also behind t= he virtual
IRQs would be really nice for debugging, but it would also br= eak another
bulk of API calls. Just marking those IRQs virtual would render the
= related output of /proc/xenomai/irq not very useful in my eye - as long
= as you do not know what's behind it. Just dropping this information is
then likely better.

Yep. Let's just avoid printing it.
 

&= gt;> Then I stumbled over the xnintr structure. Why do you keep a copy o= f the
>> device name?
>> A "const char *" should be = enough, we just have to demand
>> that it will remain valid as lon= g as the xnintr structure itself (i.e.
>> during the IRQ being att= ached). Saves a few bytes. :)
>
> Could be if all the users of it are initially kernel-mode = entities.
>
> But e.g. there is a version of rt_intr_create() t= hat may be called by
> user-space
> apps and I extended it to s= upport the "name" parameter too :
>
> int rt_intr_create(RT_INTR *intr, const char *name, unsign= ed irq, int mode);
>
> In such a case, the kernel-side rt_intr_= create() is called with the "name"
> allocated on the stack= in skins/native/syscall.c : __rt_intr_create())
> so the initial copy of the name can not remain valid.

But y= ou could create buffer space for a copy of the name in the same
block al= ready allocated for RT_INTR. Should be straightforward.

RT_INTR does not have the "name" field any more. I have removed i= t after adding the same field to the xnintr_t as it became redundant.

To access the "name", any code in native skin does "intr->= ;intr_base.name" (intr_base is of "xnintr_t" type).
 

Jan
=




--
Best regards, Dmitry Adamushko ------=_Part_7313_7695940.1139684331117--