All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Should posix threads show up in /proc/xenomai/sched.
@ 2012-03-14 17:59 Chris Stone
  2012-03-14 18:07 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Stone @ 2012-03-14 17:59 UTC (permalink / raw)
  To: xenomai@xenomai.org

[-- Attachment #1: Type: text/plain, Size: 9167 bytes --]

Using the "Porting POSIX applications to Xenomai" document I have ported an existing application to Xenomai. We create multiple threads in our application and I have the following questions related to posix threads (I could not find an answer in a search of xenomai-help):

If the threads are running in primary mode, should they be listed in /proc/xenomai/sched? My threads show up, with the correct real time priorities, when I do a top -H, but they are not in /proc/xenomai/sched, so does that mean they are all running in secondary mode?

# top -H -b -n 1
top - 17:00:45 up 0 min,  2 users,  load average: 0.04, 0.01, 0.01
Tasks: 104 total,   1 running, 103 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.6%us,  5.0%sy,  0.0%ni, 88.1%id,  2.1%wa,  0.0%hi,  1.1%si,  0.0%st
Mem:    254980k total,    58192k used,   196788k free,        0k buffers
Swap:        0k total,        0k used,        0k free,    11908k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1179 root      20   0  1392  616  424 R  7.4  0.2   0:00.08 top
  992 root     -71   0 46388  44m 6860 S  1.9 17.9   0:00.02 mgt200
    1 root      20   0  1364  432  352 S  0.0  0.2   0:00.99 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/0:0
    5 root      20   0     0    0    0 S  0.0  0.0   0:00.08 kworker/u:0
    6 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 khelper
   91 root      20   0     0    0    0 S  0.0  0.0   0:00.00 sync_supers
   93 root      20   0     0    0    0 S  0.0  0.0   0:00.00 bdi-default
   94 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kblockd
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
  122 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 rpciod
  123 root      20   0     0    0    0 S  0.0  0.0   0:00.60 kworker/0:1
  186 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 gatekeeper/0
  188 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0
  189 root      20   0     0    0    0 S  0.0  0.0   0:00.00 fsnotify_mark
  190 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 unionfs_siod
  191 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 nfsiod
  192 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 crypto
    7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/u:1
  789 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock1
  794 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock2
  799 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock3
  105 root      20   0     0    0    0 S  0.0  0.0   0:00.03 khubd
  814 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock5
  819 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock6
  824 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock7
  829 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock8
  840 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ubi_bgt0d
  843 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock9
  848 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock10
  853 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock11
  858 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock12
  892 root      20   0     0    0    0 S  0.0  0.0   0:00.00 flush-0:13
  900 root      20   0  1348  284  224 S  0.0  0.1   0:00.03 syslogd
  902 root      20   0  1348  272  208 S  0.0  0.1   0:00.06 klogd
  919 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 ff407000.spi
  963 root      20   0  1740  556  424 S  0.0  0.2   0:00.01 ntpd
  966 root      20   0  3072  820  596 S  0.0  0.3   0:00.00 sshd
  968 root      20   0  1372  528  428 S  0.0  0.2   0:00.02 sh
  972 root      -2   0 46388  44m 6860 S  0.0 17.9   0:02.00 mgt200
  973 root      20   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
  974 root     -36   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
  975 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
  977 root      -2   0 46388  44m 6860 S  0.0 17.9   0:00.06 mgt200
  978 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  979 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  980 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  981 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  982 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  983 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  984 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  985 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  986 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  987 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  988 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  989 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  990 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  991 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 canSlotSendThre
  784 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock0
  993 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.01 mgt200
  994 root     -75   0 46388  44m 6860 S  0.0 17.9   0:00.01 mgt200
  995 root     -75   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
  804 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mtdblock4
 1000 root     -54   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1001 root     -55   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1002 root     -59   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1003 root     -36   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1004 root     -45   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1005 root     -45   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1006 root     -45   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1009 root     -43   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1012 root     -43   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1013 root     -36   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1014 root     -46   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1015 root     -46   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1016 root     -46   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1017 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1018 root     -53   0 46388  44m 6860 S  0.0 17.9   0:00.00 ttyCliInterface
 1019 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1020 root     -53   0 46388  44m 6860 S  0.0 17.9   0:00.00 ttyCliInterface
 1021 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1022 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1023 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1024 root     -57   0 46388  44m 6860 S  0.0 17.9   0:00.00 cliTask
 1025 root     -36   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1026 root     -71   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1027 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.01 SNMPTimerServic
 1028 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 SNMPCntrMon
 1029 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 SNMPGaugeMon
 1030 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 SNMPStringMon
 1031 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1TimerMgmt
 1032 root     -56   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200
 1033 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 SNMPMain
 1034 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 SNMPTrap
 1035 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.04 tl1Server
 1036 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1AsyncClient
 1037 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1AsyncClient
 1038 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1SendMsg
 1039 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1MsgHdlr
 1040 root     -52   0 46388  44m 6860 S  0.0 17.9   0:00.00 tl1AlarmHdlr
 1084 root      20   0  5692 1652 1344 S  0.0  0.6   0:00.07 sshd
 1094 root      20   0  1368  524  428 S  0.0  0.2   0:00.01 sh
  999 root     -58   0 46388  44m 6860 S  0.0 17.9   0:00.00 mgt200

# cat /proc/xenomai/sched
CPU  PID    CLASS  PRI      TIMEOUT   TIMEBASE   STAT       NAME
  0  0      idle    -1      -         master     R          ROOT
  0  972    rt       1      -         master     X          mgt200

If one thread of an application goes into secondary mode, does it drag all the other threads with it into secondary mode?

If the main application threads goes into secondary mode, does it drag all of the child threads with it into secondary mode?

Cheers,
   Chris.

Chris Stone
Senior Software Engineer
Optelian
1 Brewer Hunt Way
Ottawa, Ontario K2K 2B5

Phone: 613-287-2000 x2106

www.optelian.com<http://www.optelian.com>


[-- Attachment #2: Type: text/html, Size: 31590 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-14 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 17:59 [Xenomai-help] Should posix threads show up in /proc/xenomai/sched Chris Stone
2012-03-14 18:07 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.