All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Xenomai Kernel limits
@ 2006-11-10 12:18 Daniel Schnell
  2006-11-10 13:35 ` Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Schnell @ 2006-11-10 12:18 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 3271 bytes --]

Hi,
 
I am still struggling with problems under Xenomai and POSIX skin. You
remember maybe I was posting a Kernel Oops some days ago.
I realized that a basic test (not with our large app. but with a little
test program) of clock_nanosleep() shows, that this function - if tested
alone - works as expected. Strangely in our application the behaviour of
clock_nanosleep() changes and then suddenly (before crashing) it returns
only after 1/4 of the supposed time. Bear in mind: if I compile the app.
against POSIX NPTL glibc, everything works as expected.
 
The Kernel oops went away if I replace clock_nanosleep() with the Linux
select() facility (!). This is only a short term workaround as then we
do not have realtime capabiliy. But at least I can continue with porting
our application. 
Meanwhile we got MSCAN running and I could run the application with
Xenomai and select() instead of clock_nanosleep() over night. When
checking the /proc/xenomai entries this morning, however we got the
impression that we might overuse kernel resources:
 
 
+++
bash-2.05b# cat /proc/heap
size=131072:used=134400:pagesz=512
+++
 
This looks odd. Either the output is misleading or we have used more
resources than possible. But then I would expect that the Xenomai
initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
should return with an error. Either should be fixed, I suppose.
 
I configured Xenomai in the Kernel with the following values, but please
bear in mind that was after I thought about a resource shortage:
 
CONFIG_XENO_OPT_PIPE_NRDEV=320
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560
CONFIG_XENO_OPT_SYS_HEAPSZ=1280
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=40960
CONFIG_XENO_OPT_RTDM_FILDES=512
CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE=8192
CONFIG_XENO_DRIVERS_RTCAN_MAX_DEVICES=2
CONFIG_XENO_DRIVERS_RTCAN_MAX_RECEIVERS=16
CONFIG_XENO_DRIVERS_RTCAN_MSCAN_CLOCK=33000000

 
The complete .config file is attached. Also the most relevant outputs of
/proc/xenomai you can find in NightRun20061109.txt.
 
Questions:
 
- What happens, if the Kernel limits are exceeded ? Do Xenomai init
functions return with an error ?
- Is the Xenomai Kernel and user space usage after initialization fixed
over the resource lifetime ? I.e. no dynamic allocation/deallocation
somehow afterwards ?
- What does the output of /proc/heap actually mean ? What does the above
stated output then mean ?
- I realized that when setting CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE to
131072, my application does not run. Which are the upper limits I can
set for all the configurable Xenomai parameters ?
- We are using 40+ Tasks, 265+ Condition variables, 200+ Mutexes, and 2
MSCAN ports. Additionally we use Linux sockets, files, etc. What is your
proposed setting to reasonable values inside the Xenomai Kernel config ?
- How can I find out, which resources run low, which resources I have
allocated ?
- Is there an overview (like in the VxWorks showXXXX() routines) how
many IPC objects are allocated, which tasks block on it, etc ?) These
would be extremely helpful.
- Moreover is the output of the /proc/xenomai/stat and sched file
somehow documented ?
 
 
Thanks in advance for your support,
 
Regards,
 
Daniel Schnell.

[-- Attachment #1.2: Type: text/html, Size: 9482 bytes --]

[-- Attachment #2: NigthtRun20061109.txt --]
[-- Type: text/plain, Size: 7022 bytes --]

APC          CPU0
  0:            0    (pipe_wakeup)
  1:     18996175    (lostage_handler)
  2:            0    (registry_export)
  3:            0    (posix_signals_handler)
bash-2.05b# cat faults
TRAP         CPU0
  0:           93    (Data or instruction access)
  1:            0    (Alignment)
  2:            0    (Altivec unavailable)
  3:            0    (Program check exception)
  4:            0    (Machine check exception)
  5:            0    (Unknown)
  6:            0    (Instruction breakpoint)
  7:            0    (Run mode exception)
  8:            0    (Single-step exception)
  9:            0    (Non-recoverable exception)
 10:            0    (Software emulation)
 11:            0    (Debug)
 12:            0    (SPE)
 13:            0    (Altivec assist)
bash-2.05b# cat hal
1.2-01
bash-2.05b# cat heap
size=131072:used=134400:pagesz=512
bash-2.05b# cat irq
IRQ         CPU0
 55:    11259617         MSCAN
 56:           0         MSCAN
256:     6190233         [virtual]
259:    61451264         [virtual]
bash-2.05b# cat latency
9484
bash-2.05b# cat sched
CPU  PID    PRI      PERIOD   TIMEOUT    STAT       NAME
  0  0       -1      0        0          R          ROOT
  0  350      0      0        0          X          ApplicationExe
  0  359      0      0        0          W          ApplicationExe
  0  360     69      0        902756182  w          ApplicationExe
  0  361     90      0        0          X          ApplicationExe
  0  362      0      0        0          W          ApplicationExe
  0  363      0      0        0          X          ApplicationExe
  0  364      0      0        0          W          ApplicationExe
  0  365      0      0        0          W          ApplicationExe
  0  366      0      0        0          X          ApplicationExe
  0  367      0      0        3486593477242 w          ApplicationExe
  0  368      0      0        0          X          ApplicationExe
  0  369     69      0        0          W          ApplicationExe
  0  370      0      0        0          X          ApplicationExe
  0  371     79      0        464839606  w          ApplicationExe
  0  372     99      0        466955788  w          ApplicationExe
  0  373      0      0        0          X          ApplicationExe
  0  374      0      0        0          W          ApplicationExe
  0  375      0      0        0          X          ApplicationExe
  0  376     79      0        0          W          ApplicationExe
  0  379      0      0        0          X          ApplicationExe
  0  380     79      0        0          W          ApplicationExe
  0  381     79      0        0          W          ApplicationExe
  0  382     69      0        0          W          ApplicationExe
  0  383      0      0        0          X          ApplicationExe
  0  384     69      0        2870151    w          ApplicationExe
  0  385     69      0        0          W          ApplicationExe
  0  386     69      0        0          W          ApplicationExe
  0  387     69      0        0          W          ApplicationExe
  0  388      0      0        902092939  w          ApplicationExe
  0  389     69      0        0          W          ApplicationExe
  0  390     69      0        0          W          ApplicationExe
  0  391      0      0        0          X          ApplicationExe
  0  392      0      0        0          W          ApplicationExe
  0  393     79      0        0          X          ApplicationExe
  0  394      0      0        0          X          ApplicationExe
  0  395      0      0        0          X          ApplicationExe
  0  396     79      0        0          W          ApplicationExe
  0  397      0      0        0          X          ApplicationExe
bash-2.05b# cat stat
CPU  PID    MSW        CSW        PF    STAT       %CPU  NAME
  0  0      0          29998429   0     01400080   96.5  ROOT
  0  350    211        228        29    00c00180    0.0  ApplicationExe
  0  359    15         29         1     00c00082    0.0  ApplicationExe
  0  360    3          60040      3     00c00086    0.0  ApplicationExe
  0  361    6002155    6002210    0     00c00180    1.1  ApplicationExe
  0  362    2          5          1     00c00082    0.0  ApplicationExe
  0  363    1          1          0     00c00180    0.0  ApplicationExe
  0  364    374714     558047     1     00c00082    0.0  ApplicationExe
  0  365    1          2          0     00c00082    0.0  ApplicationExe
  0  366    505        505        0     00c00180    0.0  ApplicationExe
  0  367    32         1522       15    00c00086    0.0  ApplicationExe
  0  368    3001050    3003425    2     00c00180    0.4  ApplicationExe
  0  369    2          4          1     00c00082    0.0  ApplicationExe
  0  370    1          1          0     00c00180    0.0  ApplicationExe
  0  371    32         62776      18    00c00086    0.0  ApplicationExe
  0  372    36         5631456    3     00c00086    0.0  ApplicationExe
  0  373    1          1          0     00c00180    0.0  ApplicationExe
  0  374    9          116959     7     00c00082    0.0  ApplicationExe
  0  375    1          1          0     00c00180    0.0  ApplicationExe
  0  376    9          5001426    4     00c00082    1.2  ApplicationExe
  0  379    2          2          0     00c00180    0.0  ApplicationExe
  0  380    1          3          0     00c00082    0.0  ApplicationExe
  0  381    1          3          0     00c00082    0.0  ApplicationExe
  0  382    1          4          0     00c00082    0.0  ApplicationExe
  0  383    1          1          0     00c00180    0.0  ApplicationExe
  0  384    6          60042      2     00c00086    0.0  ApplicationExe
  0  385    1          3          0     00c00082    0.0  ApplicationExe
  0  386    2          5          1     00c00082    0.0  ApplicationExe
  0  387    5          7          3     00c00082    0.0  ApplicationExe
  0  388    1          12188      0     00c00086    0.0  ApplicationExe
  0  389    0          3          0     00c00082    0.0  ApplicationExe
  0  390    0          2          0     00c00082    0.0  ApplicationExe
  0  391    1          1          0     00c00180    0.0  ApplicationExe
  0  392    2          4          1     00c00082    0.0  ApplicationExe
  0  393    4001010    4001042    1     00c00180    0.6  ApplicationExe
  0  394    1          1          0     00c00180    0.0  ApplicationExe
  0  395    1          1          0     00c00180    0.0  ApplicationExe
  0  396    2          3          0     00c00082    0.0  ApplicationExe
  0  397    1          1          0     00c00180    0.0  ApplicationExe
  0  0      0          11259623   0     00000000    0.0  IRQ55: MSCAN
  0  0      0          0          0     00000000    0.0  IRQ56: MSCAN
  0  0      0          6192496    0     00000000    0.1  IRQ256: [timer]
bash-2.05b# cat timer
status=oneshot+watchdog:setup=30:tickval=1:jiffies=60077439009575
bash-2.05b# cat version
2.3-rc1
bash-2.05b# cat rtdm/fildes
total=512:open=2:free=510
 

[-- Attachment #3: .config --]
[-- Type: application/octet-stream, Size: 25975 bytes --]

#
# Automatically generated by make menuconfig: don't edit
#
# CONFIG_UID16 is not set
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_ADVANCED_OPTIONS=y

#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y

#
# Platform support
#
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y
# CONFIG_40x is not set
# CONFIG_44x is not set
# CONFIG_E500 is not set
# CONFIG_POWER3 is not set
# CONFIG_POWER4 is not set
# CONFIG_8xx is not set
# CONFIG_8260 is not set
# CONFIG_83xx is not set
CONFIG_PPC_STD_MMU=y
# CONFIG_ALL_PPC is not set
# CONFIG_APUS is not set
# CONFIG_INKA4X0 is not set
# CONFIG_WILLOW is not set
# CONFIG_TOP5200 is not set
# CONFIG_CPCI690 is not set
# CONFIG_PCORE is not set
# CONFIG_POWERPMC250 is not set
# CONFIG_PPMC260 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
CONFIG_NS4=y
# CONFIG_HMI1001 is not set
# CONFIG_PP01 is not set
# CONFIG_CPC45 is not set
# CONFIG_CU824 is not set
# CONFIG_PM520 is not set
# CONFIG_MCC200 is not set
# CONFIG_PUMA_A is not set
# CONFIG_ALASKA is not set
# CONFIG_GLACIER is not set
# CONFIG_ICECUBE is not set
# CONFIG_LITE5200B is not set
# CONFIG_HXEB100 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
# CONFIG_PPLUS is not set
# CONFIG_PRPMC750 is not set
# CONFIG_PRPMC800 is not set
# CONFIG_SANDPOINT is not set
# CONFIG_P3G4 is not set
# CONFIG_ADIR is not set
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_SL8245 is not set
# CONFIG_SMMACO4 is not set
# CONFIG_GEMINI is not set
# CONFIG_TQM5200 is not set
# CONFIG_O2DNT is not set
# CONFIG_SORCERY is not set
CONFIG_PPC_5xxx=y
# CONFIG_SMP is not set
# CONFIG_ALTIVEC is not set
# CONFIG_TAU is not set
CONFIG_PPC_ISATIMER=y
# CONFIG_MPC5100 is not set
CONFIG_MPC5200=y
CONFIG_PPC_5xxx_PSC_CONSOLE_BAUD=115200
CONFIG_UBOOT=y
CONFIG_PPC_5xxx_PSC_CONSOLE_PORT=0
CONFIG_UBOOT=y

#
# General setup
#
# CONFIG_BIGPHYS_AREA is not set
# CONFIG_HIGHMEM is not set
# CONFIG_LOWMEM_SIZE_BOOL is not set
# CONFIG_KERNEL_START_BOOL is not set
# CONFIG_TASK_SIZE_BOOL is not set
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
# CONFIG_ISA is not set
# CONFIG_EISA is not set
# CONFIG_SBUS is not set
# CONFIG_MCA is not set
CONFIG_PCI=y
CONFIG_IPIPE=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_OOM_KILLER is not set
# CONFIG_PCI_NAMES is not set
CONFIG_HOTPLUG=y

#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set
# CONFIG_GEN_RTC is not set
CONFIG_PPC_RTC=y
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="ip=off wdt=timeout:5,period:50"

#
# Embedded options
#
# CONFIG_EMBEDDED is not set

#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_NOSWAP=y
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_GEOMETRY is not set
# CONFIG_MTD_OTP is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set

#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_PUMA_A is not set
# CONFIG_MTD_CHESTNUT is not set
# CONFIG_MTD_K2 is not set
# CONFIG_MTD_HXEB100 is not set
# CONFIG_MTD_PPMC260 is not set
# CONFIG_MTD_CU824 is not set
# CONFIG_MTD_CPC45 is not set
# CONFIG_MTD_HMI1001 is not set
# CONFIG_MTD_ICECUBE is not set
CONFIG_MTD_NS4=y
# CONFIG_MTD_ICECUBE is not set
# CONFIG_MTD_INKA4X0 is not set
# CONFIG_MTD_O2DNT is not set
# CONFIG_MTD_P3G4 is not set
# CONFIG_MTD_PP01 is not set
# CONFIG_MTD_MCC200 is not set
# CONFIG_MTD_PM520 is not set
# CONFIG_MTD_SL8245 is not set
# CONFIG_MTD_SMMACO4 is not set
# CONFIG_MTD_SORCERY is not set
# CONFIG_MTD_TQM5200 is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PCMCIA is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# CONFIG_MTD_DOCPROBE is not set
# CONFIG_MTD_DOCECC is not set

#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_NANDSIM is not set

#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set

#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_STATS is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not set
# CONFIG_MD_MULTIPATH is not set
# CONFIG_BLK_DEV_LVM is not set

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
CONFIG_SYN_COOKIES=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set

#
#    SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set

#
# Appletalk devices
#
# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set

#
# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_IDEPCI is not set
CONFIG_BLK_DEV_IDE_MPC5xxx=y
# CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_ATARAID is not set
# CONFIG_BLK_DEV_ATARAID_PDC is not set
# CONFIG_BLK_DEV_ATARAID_HPT is not set
# CONFIG_BLK_DEV_ATARAID_SII is not set

#
# SCSI support
#
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_SCSI_DEBUG_QUEUES is not set
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set

#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_SYM53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_BOOT is not set
# CONFIG_FUSION_ISENSE is not set
# CONFIG_FUSION_CTL is not set
# CONFIG_FUSION_LAN is not set

#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set
# CONFIG_I2O_PCI is not set
# CONFIG_I2O_BLOCK is not set
# CONFIG_I2O_LAN is not set
# CONFIG_I2O_SCSI is not set
# CONFIG_I2O_PROC is not set

#
# Network device support
#
CONFIG_NETDEVICES=y

#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MACE is not set
# CONFIG_BMAC is not set
# CONFIG_GMAC is not set
# CONFIG_SUNLANCE is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNBMAC is not set
# CONFIG_SUNQE is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_PCI is not set
# CONFIG_NET_POCKET is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_MYRI_SBUS is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
# CONFIG_GIANFAR is not set
# CONFIG_GFAR_NAPI is not set
# CONFIG_GFAR_BDSTASH is not set
# CONFIG_GFAR_BUFSTASH is not set
# CONFIG_FDDI is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set

#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set

#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set

#
# Console drivers
#
# CONFIG_VGA_CONSOLE is not set

#
# Frame-buffer support
#
# CONFIG_FB is not set

#
# Input core support
#
# CONFIG_INPUT is not set
# CONFIG_INPUT_KEYBDEV is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_UINPUT is not set

#
# Macintosh device drivers
#

#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_DIGI is not set
# CONFIG_ESPSERIAL is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_ISI is not set
# CONFIG_SYNCLINK is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_N_HDLC is not set
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
# CONFIG_SX is not set
# CONFIG_RIO is not set
# CONFIG_STALDRV is not set
# CONFIG_PS2MULT is not set
# CONFIG_KEYMAP_DE_LATIN1 is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256

#
# I2C support
#
CONFIG_I2C=y
# CONFIG_I2C_ALGOBIT is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_ALGO_MPC5xxx=y
# CONFIG_I2C_ADAP_ICECUBE is not set
CONFIG_I2C_ADAP_NS4=y
# CONFIG_I2C_ADAP_PM520 is not set
# CONFIG_I2C_ADAP_PP01 is not set
# CONFIG_I2C_ADAP_TOP5200 is not set
# CONFIG_I2C_ADAP_TQM5200 is not set
# CONFIG_I2C_ADAP_HMI1001 is not set
# CONFIG_I2C_ADAP_O2DNT is not set
# CONFIG_I2C_ADAP_MCC200 is not set

#
# I2C Chips support
#
# CONFIG_I2C_CHIPS is not set
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_PROC is not set

#
# SPI support
#
# CONFIG_SPI is not set

#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set

#
# Joysticks
#
# CONFIG_INPUT_GAMEPORT is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_IPMI_PANIC_EVENT is not set
# CONFIG_IPMI_DEVICE_INTERFACE is not set
# CONFIG_IPMI_KCS is not set
# CONFIG_IPMI_WATCHDOG is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_SCx200 is not set
# CONFIG_SCx200_GPIO is not set
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
CONFIG_PCF8563_RTC=y
# CONFIG_RTC_11_MINUTE_MODE is not set
# CONFIG_X1226_RTC is not set
# CONFIG_M41ST85_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_FLASH is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set

#
# Direct Rendering Manager (XFree86 DRI support)
#
# CONFIG_DRM is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_QFMT_V2 is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BEFS_DEBUG is not set
# CONFIG_BFS_FS is not set
CONFIG_EXT3_FS=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_WRITEBUFFER is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
# CONFIG_JFFS2_LZO is not set
# CONFIG_JFFS2_LZARI is not set
# CONFIG_JFFS2_CMODE_NONE is not set
CONFIG_JFFS2_CMODE_PRIORITY=y
# CONFIG_JFFS2_CMODE_SIZE is not set
CONFIG_JFFS2_PROC=y
CONFIG_CRAMFS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_JFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_XFS_FS is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_TRACE is not set
# CONFIG_XFS_DEBUG is not set

#
# Network File Systems
#
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_DIRECTIO is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=y
# CONFIG_SMB_NLS_DEFAULT is not set
# CONFIG_SMB_UNIX is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
# CONFIG_ZISOFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
CONFIG_SMB_NLS=y
CONFIG_NLS=y

#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Sound
#
# CONFIG_SOUND is not set

#
# MPC5xxx I/O Options
#
CONFIG_BESTCOMM_API=y
CONFIG_PPC_5xxx_FEC=y
CONFIG_USE_MDIO=y
CONFIG_FEC_GENERIC_PHY=y
# CONFIG_FEC_LXT971 is not set
CONFIG_FEC_DP83847=y
# CONFIG_USB_USEBOTH is not set
CONFIG_PPC_5xxx_PSC=y
CONFIG_PPC_5xxx_PSC_CONSOLE=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_5200_I2S is not set
# CONFIG_5200_I2S_RING is not set

#
# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_UHCI is not set
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI_PCI is not set
CONFIG_USB_OHCI_5xxx=y
# CONFIG_USB_SINGLEENDED is not set
# CONFIG_USB_USEBOTH is not set
CONFIG_USB_OHCI_BIG_ENDIAN=y
CONFIG_USB_OHCI=y
# CONFIG_USB_ISP1362 is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_BLUETOOTH is not set
# CONFIG_USB_MIDI is not set
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_HID is not set
# CONFIG_USB_HIDINPUT is not set
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_DC2XX is not set
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_SCANNER is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_HPUSBSCSI is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_CDCETHER is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_USS720 is not set

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_TIGL is not set
# CONFIG_USB_BRLVGER is not set
# CONFIG_USB_LCD is not set
# CONFIG_ISP1362_USB is not set
# CONFIG_ISP1362_NETLINK is not set

#
# Support for USB gadgets
#
# CONFIG_USB_GADGET is not set

#
# Bluetooth support
#
# CONFIG_BLUEZ is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Library routines
#
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
# CONFIG_REED_SOLOMON is not set
# CONFIG_FW_LOADER is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_DEBUG_HIGHMEM is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_IOVIRT is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_WAITQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
CONFIG_BDI_SWITCH=y
CONFIG_MORE_COMPILE_OPTIONS=y
CONFIG_COMPILE_OPTIONS="-g -ggdb"
# CONFIG_SERIAL_TEXT_DEBUG is not set
CONFIG_LOG_BUF_SHIFT=0

#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_OPT_NUCLEUS=y

#
# Nucleus options
#
CONFIG_XENO_OPT_PERVASIVE=y
# CONFIG_XENO_OPT_RPIDISABLE is not set
# CONFIG_XENO_OPT_SECURITY_ACCESS is not set
CONFIG_XENO_OPT_PIPE=y
CONFIG_XENO_OPT_PIPE_NRDEV=320
CONFIG_XENO_OPT_REGISTRY=y
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560
CONFIG_XENO_OPT_SYS_HEAPSZ=1280
# CONFIG_XENO_OPT_ISHIELD is not set
# CONFIG_XENO_OPT_PIPELINE_HEAD is not set
CONFIG_XENO_OPT_STATS=y
CONFIG_XENO_OPT_DEBUG=y
CONFIG_XENO_OPT_DEBUG_QUEUES=y
CONFIG_XENO_OPT_DEBUG_BHEAP=y
CONFIG_XENO_OPT_WATCHDOG=y
# CONFIG_XENO_OPT_TIMING_PERIODIC is not set
CONFIG_XENO_OPT_TIMING_PERIOD=0
CONFIG_XENO_OPT_TIMING_TIMERLAT=0
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability options
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set
# CONFIG_XENO_OPT_TIMER_WHEEL is not set

#
# Shared interrupts
#
# CONFIG_XENO_OPT_SHIRQ_LEVEL is not set
# CONFIG_XENO_OPT_SHIRQ_EDGE is not set

#
# LTT tracepoints filtering
#
# CONFIG_XENO_OPT_FILTER_EVIRQ is not set
# CONFIG_XENO_OPT_FILTER_EVTHR is not set
# CONFIG_XENO_OPT_FILTER_EVSYS is not set
# CONFIG_XENO_OPT_FILTER_EVALL is not set

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=y

#
# Native interface options
#
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=40960
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
# CONFIG_XENO_OPT_NATIVE_INTR is not set
CONFIG_XENO_SKIN_POSIX=y

#
# POSIX interface options
#
CONFIG_XENO_OPT_POSIX_SHM=y
# CONFIG_XENO_OPT_POSIX_INTR is not set
CONFIG_XENO_SKIN_RTDM=y

#
# RTDM interface options
#
CONFIG_XENO_OPT_RTDM_FILDES=512
CONFIG_XENO_OPT_DEBUG_RTDM=y
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_VXWORKS is not set
# CONFIG_XENO_SKIN_VRTX is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_RTAI is not set

#
# Drivers
#

#
# Serial drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set

#
# Testing drivers
#
CONFIG_XENO_DRIVERS_TIMERBENCH=y
CONFIG_XENO_DRIVERS_IRQBENCH=y
CONFIG_XENO_DRIVERS_SWITCHTEST=y

#
# CAN drivers
#
CONFIG_XENO_DRIVERS_RTCAN=y
CONFIG_XENO_DRIVERS_RTCAN_DEBUG=y
CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE=8192
CONFIG_XENO_DRIVERS_RTCAN_MAX_DEVICES=2
CONFIG_XENO_DRIVERS_RTCAN_MAX_RECEIVERS=16
# CONFIG_XENO_DRIVERS_RTCAN_VIRT is not set
CONFIG_XENO_DRIVERS_RTCAN_MSCAN=y
CONFIG_XENO_DRIVERS_RTCAN_MSCAN_1=y
CONFIG_XENO_DRIVERS_RTCAN_MSCAN_2=y
CONFIG_XENO_DRIVERS_RTCAN_MSCAN_CLOCK=33000000
CONFIG_XENO_DRIVERS_RTCAN_MSCAN_ALT=y
# CONFIG_XENO_DRIVERS_RTCAN_MSCAN_PSC2 is not set
# CONFIG_XENO_DRIVERS_RTCAN_SJA1000 is not set
# CONFIG_XENO_DRIVERS_RTCAN_SJA1000_ISA is not set
# CONFIG_XENO_DRIVERS_RTCAN_SJA1000_MEM is not set
# CONFIG_XENO_DRIVERS_RTCAN_SJA1000_PEAK_PCI is not set
# CONFIG_XENO_DRIVERS_RTCAN_SJA1000_PEAK_DNG is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 12:18 [Xenomai-help] Xenomai Kernel limits Daniel Schnell
@ 2006-11-10 13:35 ` Jan Kiszka
  2006-11-10 14:00   ` Daniel Schnell
  2006-11-10 13:42 ` Gilles Chanteperdrix
  2006-11-12 23:09 ` Philippe Gerum
  2 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2006-11-10 13:35 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

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

Hi Daniel,

I'm not replying to all questions (time is short...):

Daniel Schnell wrote:
> Hi,
>  
> I am still struggling with problems under Xenomai and POSIX skin. You
> remember maybe I was posting a Kernel Oops some days ago.
> I realized that a basic test (not with our large app. but with a little
> test program) of clock_nanosleep() shows, that this function - if tested
> alone - works as expected. Strangely in our application the behaviour of
> clock_nanosleep() changes and then suddenly (before crashing) it returns
> only after 1/4 of the supposed time. Bear in mind: if I compile the app.
> against POSIX NPTL glibc, everything works as expected.

Maybe that bug is a symptom of some other scalability issue.

>  
> The Kernel oops went away if I replace clock_nanosleep() with the Linux
> select() facility (!). This is only a short term workaround as then we
> do not have realtime capabiliy. But at least I can continue with porting
> our application. 
> Meanwhile we got MSCAN running and I could run the application with
> Xenomai and select() instead of clock_nanosleep() over night. When
> checking the /proc/xenomai entries this morning, however we got the
> impression that we might overuse kernel resources:
>  
>  
> +++
> bash-2.05b# cat /proc/heap
> size=131072:used=134400:pagesz=512
> +++
>  
> This looks odd. Either the output is misleading or we have used more
> resources than possible. But then I would expect that the Xenomai
> initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
> should return with an error. Either should be fixed, I suppose.

Every services that allocates memory from the real-time heap should fail
now. If it doesn't (pthread_create is a good test candidate here), we
"only" face a statistics bug. Can you confirm that starting further
applications only increases the used counter but otherwise works?

>  
> I configured Xenomai in the Kernel with the following values, but please
> bear in mind that was after I thought about a resource shortage:
>  
> CONFIG_XENO_OPT_PIPE_NRDEV=320

This looks exceptional. Do you really use pipes that heavily?

> CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560

Do you every have so many registered objects active in parallel? Should
be no problem, but I wonder if it is needed.

...
> - I realized that when setting CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE to
> 131072, my application does not run. Which are the upper limits I can
> set for all the configurable Xenomai parameters ?

That buffer is part of each CAN socket instance which is allocated via
kmalloc - hence the 132K limit here. But you shouldn't normally need
such large intermediate buffers when no CAN receiver gets delayed
unreasonably long.

> - We are using 40+ Tasks, 265+ Condition variables, 200+ Mutexes, and 2
> MSCAN ports. Additionally we use Linux sockets, files, etc. What is your
> proposed setting to reasonable values inside the Xenomai Kernel config ?

We are running similar task loads over the native skin with only the
heap size raised to 512k. We do not have so many active mutexes and no
condition variables, but a lot of RTDM sockets (still smaller than the
default limit of 128). All fine here.

It melts down that you will have to try to isolate the reason(s) for
unexpected behaviours. I suspect some internal buffer overrun that
causes all those ugly side effects.

Can you try to scale your app down, remove features/service calls so
that subsystems can be excluded systematically?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 12:18 [Xenomai-help] Xenomai Kernel limits Daniel Schnell
  2006-11-10 13:35 ` Jan Kiszka
@ 2006-11-10 13:42 ` Gilles Chanteperdrix
  2006-11-12 23:09 ` Philippe Gerum
  2 siblings, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2006-11-10 13:42 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

Daniel Schnell wrote:
> Hi,
>  
> I am still struggling with problems under Xenomai and POSIX skin. You 
> remember maybe I was posting a Kernel Oops some days ago.
> I realized that a basic test (not with our large app. but with a little 
> test program) of clock_nanosleep() shows, that this function - if tested 
> alone - works as expected. Strangely in our application the behaviour of 
> clock_nanosleep() changes and then suddenly (before crashing) it returns 
> only after 1/4 of the supposed time. Bear in mind: if I compile the app. 
> against POSIX NPTL glibc, everything works as expected.

What is the return value of clock_nanosleep when it returns in advance ?

-- 
                                                  Gilles Chanteperdrix


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

* RE: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 13:35 ` Jan Kiszka
@ 2006-11-10 14:00   ` Daniel Schnell
  2006-11-10 14:44     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Schnell @ 2006-11-10 14:00 UTC (permalink / raw)
  To: xenomai

Hi Jan,


jan.kiszka@domain.hid wrote:
> Maybe that bug is a symptom of some other scalability issue.

I suppose so, too.
 
>> +++
>> bash-2.05b# cat /proc/heap
>> size=131072:used=134400:pagesz=512
>> +++
>> 
>> This looks odd. Either the output is misleading or we have used more
>> resources than possible. But then I would expect that the Xenomai
>> initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
>> should return with an error. Either should be fixed, I suppose.
> 
> Every services that allocates memory from the real-time heap should
> fail now. If it doesn't (pthread_create is a good test candidate
> here), we "only" face a statistics bug. Can you confirm that starting
> further applications only increases the used counter but otherwise
> works?    

I was running the cyclictest and the switchbench without problems at the
same time and the /proc/xenomai/heap showed even a usage of 135 kBytes.
So I assume that is a statistics bug.

>> I configured Xenomai in the Kernel with the following values, but
>> please bear in mind that was after I thought about a resource
>> shortage: 
>> 
>> CONFIG_XENO_OPT_PIPE_NRDEV=320
> 
> This looks exceptional. Do you really use pipes that heavily?

We do not use pipes at all. Just shooting around in the forest ....
Which pipes are meant here actually ? Native Pipes ? Which effect does
this option have if I did not compile in support for Pipes of the native
API ? Again: a comprehensive description of these options would probably
help. Is it possible to get these inside 2.4 Kernel as well ?

>> CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560
> 
> Do you every have so many registered objects active in parallel?
> Should be no problem, but I wonder if it is needed. 

Well per default it is set to 256. We are using more IPC objects. So I
increased it by 10 times to be on the safe side. I do not know what
actually can occupy a "registry slot". Explanation ?

>> - I realized that when setting CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE
>> to 131072, my application does not run. Which are the upper limits I
>> can 
>> set for all the configurable Xenomai parameters ?
> 
> That buffer is part of each CAN socket instance which is allocated
> via kmalloc - hence the 132K limit here. But you shouldn't normally
> need such large intermediate buffers when no CAN receiver gets
> delayed unreasonably long.   

Right, the default of 1024 should be pretty enough, despite we had to
increae it to 8096 not to get any receive socket buffer overflow
messages. Investigation pending ...
I understand that kmalloc has 132K limit. But if I allocate 131072 bytes
this is within the limits of kmalloc I suppose.


> It melts down that you will have to try to isolate the reason(s) for
> unexpected behaviours. I suspect some internal buffer overrun that
> causes all those ugly side effects.  
> 
> Can you try to scale your app down, remove features/service calls so
> that subsystems can be excluded systematically? 

I feared you asked for that. Well yes, this will actually be the tough
task to do, I suppose. Will need quite a time though. Until then: any
debugging trick I could try as well ?


Best regards,

Daniel.


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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 14:00   ` Daniel Schnell
@ 2006-11-10 14:44     ` Jan Kiszka
  2006-11-10 16:14       ` Philippe Gerum
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2006-11-10 14:44 UTC (permalink / raw)
  To: Xenomai

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

Daniel Schnell wrote:
> Hi Jan,
> 
> 
> jan.kiszka@domain.hid wrote:
>> Maybe that bug is a symptom of some other scalability issue.
> 
> I suppose so, too.
>  
>>> +++
>>> bash-2.05b# cat /proc/heap
>>> size=131072:used=134400:pagesz=512
>>> +++
>>>
>>> This looks odd. Either the output is misleading or we have used more
>>> resources than possible. But then I would expect that the Xenomai
>>> initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
>>> should return with an error. Either should be fixed, I suppose.
>> Every services that allocates memory from the real-time heap should
>> fail now. If it doesn't (pthread_create is a good test candidate
>> here), we "only" face a statistics bug. Can you confirm that starting
>> further applications only increases the used counter but otherwise
>> works?    
> 
> I was running the cyclictest and the switchbench without problems at the
> same time and the /proc/xenomai/heap showed even a usage of 135 kBytes.
> So I assume that is a statistics bug.

...or some overwritten memory: The block size is encoded in each heap
chunk. Looks to me like we do not check for its sanity with a magic
number or so, do we? Would be a nice debug feature. Someone around who's
bored (rhetoric question)?

> 
>>> I configured Xenomai in the Kernel with the following values, but
>>> please bear in mind that was after I thought about a resource
>>> shortage: 
>>>
>>> CONFIG_XENO_OPT_PIPE_NRDEV=320
>> This looks exceptional. Do you really use pipes that heavily?
> 
> We do not use pipes at all. Just shooting around in the forest ....
> Which pipes are meant here actually ? Native Pipes ? Which effect does
> this option have if I did not compile in support for Pipes of the native
> API ? Again: a comprehensive description of these options would probably
> help. Is it possible to get these inside 2.4 Kernel as well ?

Everything is possible. Some smart script hacker could grab the info
from the 2.6 files, reformat it, and merge it into the central(!) help
file of 2.4. Just takes someone to do the work, as usual... :)

> 
>>> CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560
>> Do you every have so many registered objects active in parallel?
>> Should be no problem, but I wonder if it is needed. 
> 
> Well per default it is set to 256. We are using more IPC objects. So I
> increased it by 10 times to be on the safe side. I do not know what
> actually can occupy a "registry slot". Explanation ?

None of the services you use from the POSIX skin, only named stuff like
mqueues or semaphores.

> 
>>> - I realized that when setting CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE
>>> to 131072, my application does not run. Which are the upper limits I
>>> can 
>>> set for all the configurable Xenomai parameters ?
>> That buffer is part of each CAN socket instance which is allocated
>> via kmalloc - hence the 132K limit here. But you shouldn't normally
>> need such large intermediate buffers when no CAN receiver gets
>> delayed unreasonably long.   
> 
> Right, the default of 1024 should be pretty enough, despite we had to
> increae it to 8096 not to get any receive socket buffer overflow
> messages. Investigation pending ...
> I understand that kmalloc has 132K limit. But if I allocate 131072 bytes
> this is within the limits of kmalloc I suppose.

There is some further overhead involved.

> 
>> It melts down that you will have to try to isolate the reason(s) for
>> unexpected behaviours. I suspect some internal buffer overrun that
>> causes all those ugly side effects.  
>>
>> Can you try to scale your app down, remove features/service calls so
>> that subsystems can be excluded systematically? 
> 
> I feared you asked for that. Well yes, this will actually be the tough
> task to do, I suppose. Will need quite a time though. Until then: any
> debugging trick I could try as well ?
> 

Play with all those modified limits in the kernel config. Does changing
/ reverting-to-default any of them modify the problem as well? Might
give further hints where to dig.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 14:44     ` Jan Kiszka
@ 2006-11-10 16:14       ` Philippe Gerum
  2006-11-11 16:28         ` Philippe Gerum
  0 siblings, 1 reply; 8+ messages in thread
From: Philippe Gerum @ 2006-11-10 16:14 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Xenomai

On Fri, 2006-11-10 at 15:44 +0100, Jan Kiszka wrote:
> Daniel Schnell wrote:
> > Hi Jan,
> > 
> > 
> > jan.kiszka@domain.hid wrote:
> >> Maybe that bug is a symptom of some other scalability issue.
> > 
> > I suppose so, too.
> >  
> >>> +++
> >>> bash-2.05b# cat /proc/heap
> >>> size=131072:used=134400:pagesz=512
> >>> +++
> >>>
> >>> This looks odd. Either the output is misleading or we have used more
> >>> resources than possible. But then I would expect that the Xenomai
> >>> initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
> >>> should return with an error. Either should be fixed, I suppose.
> >> Every services that allocates memory from the real-time heap should
> >> fail now. If it doesn't (pthread_create is a good test candidate
> >> here), we "only" face a statistics bug. Can you confirm that starting
> >> further applications only increases the used counter but otherwise
> >> works?    
> > 
> > I was running the cyclictest and the switchbench without problems at the
> > same time and the /proc/xenomai/heap showed even a usage of 135 kBytes.
> > So I assume that is a statistics bug.
> 
> ...or some overwritten memory: The block size is encoded in each heap
> chunk. Looks to me like we do not check for its sanity with a magic
> number or so, do we? Would be a nice debug feature. Someone around who's
> bored (rhetoric question)?
> 

The block size is encoded in the pagemap area, idle blocks carry forward
links into the free list for a given page. If we go down the way adding
redzones to detect overwrites, I'm afraid that we would have to add them
all over the place, since trashing the pagemap means that the entire
heap is basically dead in the water.

Regarding the size/used inconsistency from /proc/xenomai/heap, I would
also rather suspect that xnheap::ubytes is being miscomputed, rather
than trashed. E.g. there could be some mismatch/misuse in
xnheap_alloc/xnheap_free, between block sizes implicitely derived from
the log2 value found in the pagemap entries, and the sizes computed for
blocks larger than 2 * page_size. In any case, I already see a bug there
for allocation requests greater than 2 * page_size, but that would have
the opposite effect than the current issue (i.e. leakage in used bytes
accounting):

--- ksrc/nucleus/heap.c	(revision 1809)
+++ ksrc/nucleus/heap.c	(working copy)
@@ -468,7 +468,7 @@
 		block = get_free_range(heap, size, 0);
 
 		if (block)
-			heap->ubytes += size;
+			heap->ubytes += xnheap_align(size, heap->pagesize);
 	}
 
       release_and_exit:

[...]

-- 
Philippe.




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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 16:14       ` Philippe Gerum
@ 2006-11-11 16:28         ` Philippe Gerum
  0 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2006-11-11 16:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Xenomai

On Fri, 2006-11-10 at 17:14 +0100, Philippe Gerum wrote:
> On Fri, 2006-11-10 at 15:44 +0100, Jan Kiszka wrote:
> > Daniel Schnell wrote:
> > > Hi Jan,
> > > 
> > > 
> > > jan.kiszka@domain.hid wrote:
> > >> Maybe that bug is a symptom of some other scalability issue.
> > > 
> > > I suppose so, too.
> > >  
> > >>> +++
> > >>> bash-2.05b# cat /proc/heap
> > >>> size=131072:used=134400:pagesz=512
> > >>> +++
> > >>>
> > >>> This looks odd. Either the output is misleading or we have used more
> > >>> resources than possible. But then I would expect that the Xenomai
> > >>> initialization routines (e.g. pthread_create(), rt_dev_open(), etc.)
> > >>> should return with an error. Either should be fixed, I suppose.
> > >> Every services that allocates memory from the real-time heap should
> > >> fail now. If it doesn't (pthread_create is a good test candidate
> > >> here), we "only" face a statistics bug. Can you confirm that starting
> > >> further applications only increases the used counter but otherwise
> > >> works?    
> > > 
> > > I was running the cyclictest and the switchbench without problems at the
> > > same time and the /proc/xenomai/heap showed even a usage of 135 kBytes.
> > > So I assume that is a statistics bug.
> > 
> > ...or some overwritten memory: The block size is encoded in each heap
> > chunk. Looks to me like we do not check for its sanity with a magic
> > number or so, do we? Would be a nice debug feature. Someone around who's
> > bored (rhetoric question)?
> > 
> 
> The block size is encoded in the pagemap area, idle blocks carry forward
> links into the free list for a given page. If we go down the way adding
> redzones to detect overwrites, I'm afraid that we would have to add them
> all over the place, since trashing the pagemap means that the entire
> heap is basically dead in the water.
> 
> Regarding the size/used inconsistency from /proc/xenomai/heap, I would
> also rather suspect that xnheap::ubytes is being miscomputed, rather
> than trashed. E.g. there could be some mismatch/misuse in
> xnheap_alloc/xnheap_free, between block sizes implicitely derived from
> the log2 value found in the pagemap entries, and the sizes computed for
> blocks larger than 2 * page_size. In any case, I already see a bug there
> for allocation requests greater than 2 * page_size, but that would have
> the opposite effect than the current issue (i.e. leakage in used bytes
> accounting):
> 
> --- ksrc/nucleus/heap.c	(revision 1809)
> +++ ksrc/nucleus/heap.c	(working copy)
> @@ -468,7 +468,7 @@
>  		block = get_free_range(heap, size, 0);
>  
>  		if (block)
> -			heap->ubytes += size;
> +			heap->ubytes += xnheap_align(size, heap->pagesize);
>  	}
>  
>        release_and_exit:
> 
> [...]
> 

False alarm. This patch is useless since the requested size is already
rounded to the page size.

-- 
Philippe.




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

* Re: [Xenomai-help] Xenomai Kernel limits
  2006-11-10 12:18 [Xenomai-help] Xenomai Kernel limits Daniel Schnell
  2006-11-10 13:35 ` Jan Kiszka
  2006-11-10 13:42 ` Gilles Chanteperdrix
@ 2006-11-12 23:09 ` Philippe Gerum
  2 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2006-11-12 23:09 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

On Fri, 2006-11-10 at 12:18 +0000, Daniel Schnell wrote:
> Hi,
>  
> I am still struggling with problems under Xenomai and POSIX skin. You
> remember maybe I was posting a Kernel Oops some days ago.
> I realized that a basic test (not with our large app. but with a
> little test program) of clock_nanosleep() shows, that this function -
> if tested alone - works as expected. Strangely in our application the
> behaviour of clock_nanosleep() changes and then suddenly (before
> crashing) it returns only after 1/4 of the supposed time. Bear in
> mind: if I compile the app. against POSIX NPTL glibc, everything works
> as expected.
>  
> The Kernel oops went away if I replace clock_nanosleep() with the
> Linux select() facility (!). This is only a short term workaround as
> then we do not have realtime capabiliy. But at least I can continue
> with porting our application. 
> Meanwhile we got MSCAN running and I could run the application with
> Xenomai and select() instead of clock_nanosleep() over night. When
> checking the /proc/xenomai entries this morning, however we got the
> impression that we might overuse kernel resources:

This bug is caused by an issue with Xenomai's context switch code for
ppc which conflicts with vanilla Linux's tail scheduling code. The patch
below fixes it - (already committed to both v2.2.x and trunk/) :

--- ksrc/arch/powerpc/switch.S	(revision 1810)
+++ ksrc/arch/powerpc/switch.S	(working copy)
@@ -76,6 +76,7 @@
 
 	lwz	r1,KSP(r4)	/* Load new stack pointer */
 
+	mr	r3,r2
 	lwz	r0,PGDIR(r4)
         cmpwi   r0, 0
         beq-	same_current
@@ -155,6 +156,7 @@
 
 	lwz	r1,KSP(r4)	/* Load new stack pointer */
 		
+	mr	r3,r2
 	lwz	r0,PGDIR(r4)
         cmpwi   r0, 0
         beq-	same_current


>  
>  
> +++
> bash-2.05b# cat /proc/heap
> size=131072:used=134400:pagesz=512
> +++
>  
> This looks odd.

Yeah, it is. But primarily because you asked for a 1280Kb system heap,
and only 128Kb are being reported. The heap manager does not take into
account additional memory extents which are added to the system heap in
scatter init mode (which only Xenomai's ppc port currently uses). IOW,
extents are 128kb each, you asked for ten of them, but only the first
one is reported in the overall heap size, which is wrong. The patch
below fixes this issue (committed to both branches, too) :

--- include/nucleus/heap.h	(revision 1829)
+++ include/nucleus/heap.h	(working copy)
@@ -57,53 +57,54 @@
 
 typedef struct xnextent {
 
-    xnholder_t link;
+	xnholder_t link;
 
 #define link2extent(laddr) \
 ((xnextent_t *)(((char *)laddr) - (int)(&((xnextent_t *)0)->link)))
 
-    caddr_t membase,	/* Base address of the page array */
-	    memlim,	/* Memory limit of page array */
-	    freelist;	/* Head of the free page list */
+	caddr_t membase,	/* Base address of the page array */
+		memlim,		/* Memory limit of page array */
+		freelist;	/* Head of the free page list */
 
-    u_char pagemap[1];	/* Beginning of page map */
+	u_char pagemap[1];	/* Beginning of page map */
 
 } xnextent_t;
 
 typedef struct xnheap {
 
-    xnholder_t link;
+	xnholder_t link;
 
 #define link2heap(laddr) \
 ((xnheap_t *)(((char *)laddr) - (int)(&((xnheap_t *)0)->link)))
 
-    u_long extentsize,
-           pagesize,
-           pageshift,
-	   hdrsize,
-	   npages,	/* Number of pages per extent */
-	   ubytes,
-           maxcont;
+	u_long extentsize,
+		totalsize,
+		pagesize,
+		pageshift,
+		hdrsize,
+		npages,		/* Number of pages per extent */
+		ubytes,
+		maxcont;
 
-    xnqueue_t extents;
+	xnqueue_t extents;
 
 #ifdef CONFIG_SMP
-    xnlock_t lock;
+	xnlock_t lock;
 #endif /* CONFIG_SMP */
 
-    caddr_t buckets[XNHEAP_NBUCKETS];
+	caddr_t buckets[XNHEAP_NBUCKETS];
 
-    xnholder_t *idleq;
+	xnholder_t *idleq;
 
-    xnarch_heapcb_t archdep;
+	xnarch_heapcb_t archdep;
 
-    XNARCH_DECL_DISPLAY_CONTEXT();
+	XNARCH_DECL_DISPLAY_CONTEXT();
 
 } xnheap_t;
 
 extern xnheap_t kheap;
 
-#define xnheap_size(heap)            ((heap)->extentsize)
+#define xnheap_size(heap)            ((heap)->totalsize)
 #define xnheap_page_size(heap)       ((heap)->pagesize)
 #define xnheap_page_count(heap)      ((heap)->npages)
 #define xnheap_used_mem(heap)        ((heap)->ubytes)
Index: ksrc/nucleus/heap.c
===================================================================
--- ksrc/nucleus/heap.c	(revision 1829)
+++ ksrc/nucleus/heap.c	(working copy)
@@ -200,6 +200,7 @@
 	heap->npages = (heapsize - hdrsize) >> pageshift;
 	heap->ubytes = 0;
 	heap->maxcont = heap->npages * pagesize;
+	heap->totalsize = heap->maxcont;
 	heap->idleq = NULL;
 	inith(&heap->link);
 	initq(&heap->extents);
@@ -700,6 +701,7 @@
 	xnlock_get_irqsave(&heap->lock, s);
 
 	appendq(&heap->extents, &extent->link);
+	heap->totalsize += extsize;
 
 	xnlock_put_irqrestore(&heap->lock, s);
 

>  Either the output is misleading or we have used more resources than
> possible. But then I would expect that the Xenomai initialization
> routines (e.g. pthread_create(), rt_dev_open(), etc.) should return
> with an error. Either should be fixed, I suppose.
>  
> I configured Xenomai in the Kernel with the following values, but
> please bear in mind that was after I thought about a resource
> shortage:
>  
> CONFIG_XENO_OPT_PIPE_NRDEV=320

This is likely overkill, especially since you don't seem to need the
message pipe feature for your app. Each device allows to open a
bi-directional data path between real-time tasks and non RT processes;
device entries are named /dev/rtp[0-9]*. In your case, you could even
switch out the message pipe feature in the native skin configuration.

> CONFIG_XENO_OPT_REGISTRY_NRSLOTS=2560

This value is a hint to size an internal hash table used by the Xenomai
registry to index real-time objects. You should set this parameter
according to the (roughly) estimated number of rt_<something>_create()
your application issues, and for which you pass a non-null name string
(I said "non-null", not "non empty" which still causes an internal
registration to happen). In any case, this value is a hint which helps
reducing hash collisions, not a hard limit.

> CONFIG_XENO_OPT_SYS_HEAPSZ=1280

This is the size of the internal Xenomai workspace. Now that your
application runs, you might want to decrease the value above to get
reasonably closer to the actual consumption reported
by /proc/xenomai/heap. There are several consumers for this heap, but
basically, the usual suspects are:
- creating kernel-based Xenomai threads, which grabs stack memory from
this workspace (you don't seem to have any in your app),
- each new object indexed by the registry requires 8-bytes, plus the
size of the registry hash table itself.

> CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=40960

This is related to message pipes, so this won't appear anymore if you
configure that option out. It's the size of the internal streaming
buffer specifically used by rt_pipe_stream(). See the API doc. for more.

> CONFIG_XENO_OPT_RTDM_FILDES=512

Seems a lot, unless you have an insane amount of active data paths
between RTDM drivers and your applications. The default value (128) is
usually more than enough.

> CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE=8192
> CONFIG_XENO_DRIVERS_RTCAN_MAX_DEVICES=2
> CONFIG_XENO_DRIVERS_RTCAN_MAX_RECEIVERS=16
> CONFIG_XENO_DRIVERS_RTCAN_MSCAN_CLOCK=33000000
> 
>  
> The complete .config file is attached. Also the most relevant outputs
> of /proc/xenomai you can find in NightRun20061109.txt.
>  
> Questions:
>  
> - What happens, if the Kernel limits are exceeded ? Do Xenomai init
> functions return with an error ?

Yes. Any other behaviour is considered as a bug. I know that true geeks
love to execute the output of /dev/random, but for my part, I'm a luser,
so I prefer sending back return codes...

> - Is the Xenomai Kernel and user space usage after initialization
> fixed over the resource lifetime ? I.e. no dynamic
> allocation/deallocation somehow afterwards ?

It depends on the resource considered. E.g. Some memory is obtained upon
object creation from the Linux kernel, other is obtained from the system
workspace, which is allocated at Xenomai init. There is no fixed
behaviour in this area.

> - What does the output of /proc/heap actually mean ? What does the
> above stated output then mean ?

It means that you hit a bug. Normally, "size" means "overall size (in
bytes) available to fulfill user allocation requests at init". "used" is
the amount of memory already consumed from the previous value, at the
time you ask for this report.

> - I realized that when setting CONFIG_XENO_DRIVERS_RTCAN_RXBUF_SIZE to
> 131072, my application does not run. Which are the upper limits I can
> set for all the configurable Xenomai parameters ?
> - We are using 40+ Tasks, 265+ Condition variables, 200+ Mutexes, and
> 2 MSCAN ports. Additionally we use Linux sockets, files, etc. What is
> your proposed setting to reasonable values inside the Xenomai Kernel
> config ?

No problem, there is only very few hard limit on the number of objects
that can be created, and those are configurable. Only the system
workspace needs to be properly sized to handle the memory pressure. See
above for some explanations about sound values.

> - How can I find out, which resources run low, which resources I have
> allocated ?
> - Is there an overview (like in the VxWorks showXXXX() routines) how
> many IPC objects are allocated, which tasks block on it, etc ?) These
> would be extremely helpful.
> - Moreover is the output of the /proc/xenomai/stat and sched file
> somehow documented ?

Not really yet, aside of the mailing list archive, that is. You can get
a detailed explanation of the thread status flags in
include/nucleus/thread.h.

>  
>  
> Thanks in advance for your support,
>  
> Regards,
>  
> Daniel Schnell.
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




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

end of thread, other threads:[~2006-11-12 23:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 12:18 [Xenomai-help] Xenomai Kernel limits Daniel Schnell
2006-11-10 13:35 ` Jan Kiszka
2006-11-10 14:00   ` Daniel Schnell
2006-11-10 14:44     ` Jan Kiszka
2006-11-10 16:14       ` Philippe Gerum
2006-11-11 16:28         ` Philippe Gerum
2006-11-10 13:42 ` Gilles Chanteperdrix
2006-11-12 23:09 ` Philippe Gerum

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.