Jeff Webb wrote:
Gilles Chanteperdrix wrote:
Ok, could you try one last thing: keep try_module_get and module_put in
ksrc/drivers/testing/switchtest.c and apply the attached patch to
src/testsuite/switchtest/switchtest.c
This does not seem to fix the problem completely. Output stops after
pressing ctrl-c one time, and I get:
[root xeno-build-r1749p5]# ps a -T
PID SPID TTY STAT TIME COMMAND
19878 19878 pts/1 SLl+ 0:00 ./switchtest
19878 19884 pts/1 SLl+ 0:00 ./switchtest
19878 19885 pts/1 SLl+ 0:00 ./switchtest
19878 19886 pts/1 SLl+ 0:00 ./switchtest
19878 19887 pts/1 SLl+ 0:00 ./switchtest
[root xeno-build-r1749p5]# cat /proc/xenomai/sched
CPU PID PRI PERIOD TIMEOUT STAT NAME
0 0 -1 0 0 R ROOT/0
1 0 -1 0 0 R ROOT/1
0 19878 0 0 0 X switchtest
0 0 1 0 0 W rtk1/0
0 0 1 0 0 W rtk2/0
0 0 1 0 0 Wf rtk3/0
0 0 1 0 0 Wf rtk4/0
0 0 1 0 0 Wf rtk5/0
0 0 1 0 0 Wf rtk6/0
0 19884 1 0 0 R rtus0-11
0 19885 1 0 0 R rtus0-12
0 19886 1 0 0 R rtus_ufps0-13
0 19887 1 0 0 R rtus_ufps0-14
1 0 1 0 0 W rtk1/1
1 0 1 0 0 W rtk2/1
1 0 1 0 0 Wf rtk3/1
1 0 1 0 0 Wf rtk4/1
1 0 1 0 0 Wf rtk5/1
1 0 1 0 0 Wf rtk6/1
After pressing ctrl-c a second time, switchtest exits leaving a clean
'ps', but I get:
[root xeno-build-r1749p5]# cat /proc/xenomai/sched
CPU PID PRI PERIOD TIMEOUT STAT NAME
0 0 -1 0 0 R ROOT/0
1 0 -1 0 0 R ROOT/1
0 0 1 0 0 W rtk1/0
0 0 1 0 0 W rtk2/0
0 0 1 0 0 Wf rtk3/0
0 0 1 0 0 Wf rtk4/0
0 0 1 0 0 Wf rtk5/0
0 0 1 0 0 Wf rtk6/0
1 0 1 0 0 W rtk1/1
1 0 1 0 0 W rtk2/1
1 0 1 0 0 Wf rtk3/1
1 0 1 0 0 Wf rtk4/1
1 0 1 0 0 Wf rtk5/1
1 0 1 0 0 Wf rtk6/1
Removing the module then fails:
[root switchtest]# /sbin/rmmod xeno_switchtest
ERROR: Module xeno_switchtest is in use
[root switchtest]#
I can run switchtest multiple times, but I get more and more leftover
threads in /proc/xenomai/stat.
Ok, thanks, I will commit yesterday version then.
--
Gilles Chanteperdrix
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help