[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Heavy packet load and the sigaction..



Yes, this is a regular pattern. As soon as i kill the test code and
re-run it, it comes ok for few secs under heavy load and the first
occurence of calling signal handler in the IRQ context, i start to
observe the signal handler running with the interrupts disabled.

(PS: I used setitimer to start a periodic timer. I tried with both
sigaction/signal to register for  function to capture the SIGALRM.
Both behaves identically)

- prasad


On 11/16/06, John Williams <jwilliams@xxxxxxxxxxxxxx> wrote:
Hi Prasad,

Prasad wrote:

> ==================================================
>  /* Signal handler args: */
>    regs->gpr[GPR_ARG0] = signal; /* Arg 0: signum */
>    regs->gpr[GPR_ARG1] = &frame->sc; /* arg 1: sigcontext */
>
>   __asm__ __volatile__("mfs %0, rmsr; nop;" : "=r" (flags));
>
>    printk ("inside do_signal: are 0x%08x\n", flags);
>    regs->pc = ((unsigned long)ka->sa.sa_handler);
> ===================================================
>
> and the output i got is this when i send  a packet burst..
> =======================================================
> inside setup_frame: are 0x000000aa
> flags are 0x000000a2
> inside setup_frame: are 0x000000aa
> flags are 0x000000a2
> inside setup_frame: are 0x000000aa
> flags are 0x000000a2
> inside setup_frame: are 0x000000aa

0xaa shows BIP and EI are set - setup_frame is called during a syscall (brki)
context.

> flags are 0x000000a2
> inside setup_frame: are 0x000000a2

0xa2 means BIP is not set - we are in IRQ context.

> flags are 0x000000a2
> inside setup_frame: are 0x000000aa
> flags are 0x000000a0
> inside setup_frame: are 0x000000aa
> flags are 0x000000a0

This is interesting, it's like the first time the sighandler runs after
setup_frame occurs in IRQ context, it's fine.  Then the next time after
setup_frame runs in syscall context, the handler runs with interrupts disabled.

Is this a regular pattern?

> I am not sure whether this points to something significant to debug.
> If so, please let me know what else i can debug.

A useful thing you can do is try to identify any patterns in sequences like
above.  Unfortunately I won't have any time to look at this until next week at
the earliest, so the clearer picture you can give me on what's going on, the
better it will be when I do get to it.

Cheers,

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/