LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-05-2011, 09:59 PM   #1
nitinarora
LQ Newbie
 
Registered: Apr 2009
Posts: 19

Rep: Reputation: 0
Talking How to know kernel built-in module size


Hello all,

I wish to carry out a memory requirement analysis of two file systems (ext4 and yaffs) and then compare it . In my environment they are built-in the kernel and cannot be compiled as module and hence I can't compare their size by lsmod, or any of the /proc interface. I wish to analyse their static and dynamic memory requirements in idle state and during high I/O traffic.

For Static memory, if any tool or kernel interface can provide me 'kernel mermory map' in terms of memory usage by each built-in module then it may solve my problem. Does any one know ?

For dynamic memory, I wish to run iozone or bonnie or any other file system tool in parellel to produce the I/O traffic and then wish to measure the memory usage pattern, draw a graph and then compare. As per my understanding,

Dynamic memory usage = slab memory + kmalloc

But, I don't know how to find consolidated usage e.g. I tried to use slabtop but it doesn't give any info of kmalloc. Also slabtop doesn't show any info of yaffs.

If anyone can suggest me any better idea or point out any mistake I am making then he/she is is welcome.

- Nitin

Last edited by nitinarora; 09-05-2011 at 10:08 PM.
 
Old 09-06-2011, 01:45 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
If the module is built-in, it will be a part of kernel image.
 
0 members found this post helpful.
Old 09-06-2011, 09:17 PM   #3
nitinarora
LQ Newbie
 
Registered: Apr 2009
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nini09 View Post
If the module is built-in, it will be a part of kernel image.
Yes, I know. But thats what my question is.
suppose ext4 is built-in and I want know its memory usage then is there any way ?

For example we have 'pmap' command to display the memory map of the process. In the same
way, do we have any utility which can display similar information along with the memory usage info.

Last edited by nitinarora; 09-06-2011 at 09:23 PM.
 
Old 09-07-2011, 02:47 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
The slabtop can display some memory usage in kernel cache if kernel request it.
 
Old 09-07-2011, 07:19 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Examine the linker map from when the kernel image was built. These are addresses of key entry-points within the module which will give you a suggestion of its size. However, I frankly doubt that such a metric will prove to be very useful...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one export a symbol from a module built outside the kernel source tree? opsimath Linux - Kernel 3 09-15-2011 10:56 AM
linking .o files built in user space against kernel module using kbuild santigopal_mondal Linux - Newbie 1 01-03-2009 02:42 PM
Kernel compilation: Is it posiible to change built-in[] option to module<> ravime Linux - Kernel 4 07-30-2007 08:12 AM
Slackware 10- Please confirm my steps used to remove a module from a pre-built kernel jtp51 Slackware 7 11-03-2004 05:02 PM
iptables - module, or built into kernel? dunkyb Linux - General 3 02-16-2003 06:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration