[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] debugging kernel resource problems



Hi,

We have been using the 2.4 uClinux microblaze kernel for a few years. I am starting to notice what appears to be system resource problems, but have not found a good way to get a handle on it. I wonder if anyone has suggestions about how to monitor and quantify this?

The uClinux environment has 24 MBytes available. The app running on our uClinux box has increased in size due to feature additions - from around 100K bytes to around 200K. Under normal circumstances the app and the file support daemons (for jffs2 and flatfsd) are the only things running. There is not a lot of file I/O and the files are few and small (configuration files). There have been no problems with this environment.

I have a debug version that I normally use during development that is about 25% bigger than the prod app (around 250K). I also often run programs from the serial console and ftp/telnet to monitor the system and download new app versions. Lately I have noticed that the uClinux system will sometimes freeze up when I perform other activity with the debug app running. Often there are no messages on the serial console, but sometimes I see "kernel BUG at buffer.c:xxxx" or "kernel BUG at slab.c:xxxx".

I tried turning on kernel debugging code by adding options to uClinux-2.4.x/arch/microblaze/config.in, then selecting them during the make process. This included:

 bool 'Debug kernel' CONFIG_DEBUG_KERNEL
 bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
 bool 'Debug slab' CONFIG_DEBUG_SLAB
 bool 'Debug stack oflow' CONFIG_DEBUG_STACKOVERFLOW
 bool 'Debug Highmem' CONFIG_DEBUG_HIGHMEM
 bool 'Debug Errors' CONFIG_DEBUG_ERRORS
 bool 'Add /proc/mem_map' CONFIG_MEM_MAP
 bool 'Debug spinlock (smp)' CONFIG_DEBUG_SPINLOCK
 bool 'Debug user' CONFIG_DEBUG_USER
 bool 'Debug frame pointer' CONFIG_FRAME_POINTER
 bool 'Debug I/O Virt' CONFIG_DEBUG_IOVIRT
 bool 'Debug Checking' CONFIG_CHECKING
 bool 'Verbose BUG msgs' CONFIG_DEBUG_BUGVERBOSE

When I turned all these on, the kernel image increased in size and I did see one change (cat /proc/slabinfo showed more columns), but I did not see any more diagnostic messages on the serial console when it booted up or when I caused the system to freeze. Do I need to add something extra to another file somewhere to enable some of these debug parameters when the kernel is compiled? Is there something else I could do to get memory statistics out of the kernel to see if this really is a memory resource issue? Any advice would be appreciated.

Thanks,
Rod Campbell ___________________________
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/