2009-02-05 14:18:48     Xenomai and CONFIG_PREEMPT

2009-02-05 14:18:48     Xenomai and CONFIG_PREEMPT

Michael McTernan (UNITED KINGDOM)

Message: 68931   

Hi,

I've found that if I configure for preemption with Xenomai from the 2008R1 branch, the latency test trips lots and lots of bugs like "BUG: scheduling while atomic: sampling-140/0x00000001/143".  It seems to be one per line output from the test.

The config items that make this happen are:

# CONFIG_PREEMPT_VOLUNTARY is not set

CONFIG_PREEMPT=y

PREEMPT_BKL on or off has no effect.  The output from the bugs is very similar, and like this:

BUG: scheduling while atomic: display-140/0x00000001/142

Hardware Trace:

   0 Target : <0x000049ac> { _dump_stack + 0x0 }

     Source : <0xffa01dd4> { _schedule + 0x760 }

   1 Target : <0xffa01dca> { _schedule + 0x756 }

     Source : <0x0000e76a> { _printk + 0x5a }

   2 Target : <0x0000e760> { _printk + 0x50 }

     Source : <0x0000e5c0> { _vprintk + 0x214 }

   3 Target : <0x0000e5b4> { _vprintk + 0x208 }

     Source : <0x0000e6a0> { _vprintk + 0x2f4 }

   4 Target : <0x0000e6a0> { _vprintk + 0x2f4 }

     Source : <0x0013ed52> { _preempt_schedule + 0x2a }

   5 Target : <0x0013ed4c> { _preempt_schedule + 0x24 }

     Source : <0x0013ed3c> { _preempt_schedule + 0x14 }

   6 Target : <0x0013ed28> { _preempt_schedule + 0x0 }

     Source : <0x0000e69c> { _vprintk + 0x2f0 }

   7 Target : <0x0000e69c> { _vprintk + 0x2f0 }

     Source : <0x0000e5b2> { _vprintk + 0x206 }

   8 Target : <0x0000e5a0> { _vprintk + 0x1f4 }

     Source : <0x0002f0cc> { ___ipipe_unstall_root + 0x40 }

   9 Target : <0x0002f0bc> { ___ipipe_unstall_root + 0x30 }

     Source : <0x0002f110> { ___ipipe_unstall_root + 0x84 }

  10 Target : <0x0002f110> { ___ipipe_unstall_root + 0x84 }

     Source : <0x0002eb50> { ___ipipe_sync_stage + 0xb4 }

  11 Target : <0x0002eb42> { ___ipipe_sync_stage + 0xa6 }

     Source : <0x0002eb30> { ___ipipe_sync_stage + 0x94 }

  12 Target : <0x0002eb0e> { ___ipipe_sync_stage + 0x72 }

     Source : <0x0002eca6> { ___ipipe_sync_stage + 0x20a }

  13 Target : <0x0002ec98> { ___ipipe_sync_stage + 0x1fc }

     Source : <0x0002ed40> { ___ipipe_sync_stage + 0x2a4 }

  14 Target : <0x0002ed36> { ___ipipe_sync_stage + 0x29a }

     Source : <0x0002ed56> { ___ipipe_sync_stage + 0x2ba }

  15 Target : <0x0002ed56> { ___ipipe_sync_stage + 0x2ba }

     Source : <0x0000b84e> { _try_to_wake_up + 0x46 }

Stack from 001ede18:

        ffa01dca ffa01dd8 079c061c 007d0124 000396d6 00000000 07992eec 00000001

        0000008e 001ede74 0000af88 001ec000 007d0124 007d009c 00000000 00100000

        00000100 0000af90 0019cd60 000396d6 079c061c 007d0124 007d009c 001ec000

        00100000 00000100 00000008 00000000 00000000 00000000 000397d4 001edf24

        007d00a4 00000006 00000000 00000100 007ccde4 0002f81c 007ccde0 007ccde4

        007ccde0 00100000 00100000 00000000 0000ffff 00000000 80000000 00000000

Call Trace:

[<00008230>] ___ipipe_syscall_root+0x40/0x108

[<00004455>] _decode_address+0x1f5/0x244

[<00008000>] ___ipipe_handle_irq+0x120/0x13c

[<00002000>] _get_cclk+0x18/0x68

[<00004455>] _decode_address+0x1f5/0x244

I kinda though Xenomai + PREEMPT would be a common config, was I wrong to expect this to work?  If not, is it interesting here or on the Xenomai mailing lists (where they will rightfully complain that this is with Xenomai 2.4.0).

Regards,

Mike

QuoteReplyEditDelete

2009-02-05 14:35:39     Re: Xenomai and CONFIG_PREEMPT

Mike Frysinger (UNITED STATES)

Message: 68932   

CONFIG_PREEMPT_VOLUNTARY is the only one we've tested (regardless of anything else).  i dont think we've investigated any other preempt mode and whether they'll even work with our core arch code.

QuoteReplyEditDelete

2009-02-05 15:04:28     Re: Xenomai and CONFIG_PREEMPT

Michael McTernan (UNITED KINGDOM)

Message: 68936   

okay.  Then voluntary preempt is what I shall use.

Is it worth transplanting this as a bug and/or adding a note to the docs page about Xenomai?

QuoteReplyEditDelete

2009-02-05 15:08:06     Re: Xenomai and CONFIG_PREEMPT

Mike Frysinger (UNITED STATES)

Message: 68938   

i dont think there are any tracker items open for validating preempt ... so yes, it'd be good to have one

QuoteReplyEditDelete

2009-02-05 22:12:33     Re: Xenomai and CONFIG_PREEMPT

Sonic Zhang (CHINA)

Message: 68941   

preemption options except voluntary preempt are not supported by blackfin. So, this is not a bug.

QuoteReplyEditDelete

2009-02-05 22:38:44     Re: Xenomai and CONFIG_PREEMPT

Mike Frysinger (UNITED STATES)

Message: 68942   

it's a bug that we dont support other preempt options.  it's a known failure that they dont currently work.

QuoteReplyEditDelete

2009-02-06 15:03:59     Re: Xenomai and CONFIG_PREEMPT

Michael McTernan (UNITED KINGDOM)

Message: 69011   

That's interesting.  We've been using fully pre-emtive on the 2008R1 branch for a while and seeing no problems...  maybe we've been lucky.

QuoteReplyEditDelete

2009-02-06 15:09:38     Re: Xenomai and CONFIG_PREEMPT

Michael McTernan (UNITED KINGDOM)

Message: 69012   

Done, see https://blackfin.uclinux.org/gf/tracker/4865

  • Created
Was this helpful?

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.