[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] thread switching problem (SCHED_RR)
> Brettschneider Falk wrote:
> >I did the tricky step and extracted the problem stuff from
> >our app and put
> >it together in a small test user app where you can easily
> >see what is going
> >on. Is someone interested in trying it and help to fix the
> >uclinux/microblaze bug? The code also compiles on
> >SuSE-PC-Linux and runs
> >with SCHED_OTHER there.
> >
> >
> Yes, post it on the mailing list.
> Cheers,
> Claudio Lanconelli
Cool!!!
Here's the link to download:
ftp://ftp.baumeroptronic.com/linux-mail/test.tgz
Set your 2 pathes to 'uclinux_dist' and 'toolchain' in the file "config".
Also configure there whether you use µLinux or PC-Linux. Last but not least
look there what I do to generate the target file by calling elf2flt etc..
Then just call 'make' to build, the Makefile is ready to use.
The console output here is:
000003:588746: : mutexlock_MAIN
000003:598470: Thr: call pfRunFunc for 'IO'
000003:600677: Thr: IO: policy: 2, prio: 9, timeslice: sec=0 nsec=60000000,
PID: 0, TID: 1026
000003:608170: IO : opened device (id=5)
000003:614148: Thr: call pfRunFunc for 'IPStarter'
000003:616219: Thr: IPStarter: policy: 2, prio: 10, timeslice: sec=0
nsec=60000000, PID: 0, TID: 2051
000003:624947: : enter join
000003:627411: IO : loop2
000003:629396: Thr: call pfRunFunc for 'IP'
000003:631874: Thr: IP: policy: 2, prio: 8, timeslice: sec=0 nsec=60000000,
PID: 3076, TID: 3076
000003:635373: IP : calling ip_run()
000003:637417: IP : before sem_wait
000003:640359: : ===> global wake up
000003:642402: : mutex_unlock_MAIN
000003:645071: IO : mutexlock_IO
000003:647212: IO : mutexunlock_IO
000003:649175: IO : calling run_io()
000003:651455: IO : enter poll() (ms=1000)
000004:660683: IO : left poll()
000004:662425: IO : enter poll() (ms=1000)
000005:670689: IO : left poll()
000005:672414: IO : wakeup IP
000005:674575: IO : enter poll() (ms=1000)
000005:677778: IP : IP awaking
You can see that poll() never returns although its thread "IO" has the
higher priority than thread "IP". If you replace poll() with usleep(), it
shows the same bug.
Can you help?
Cheers
F@lk
PS: I hope you like the thread function set.
___________________________
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/