* Kernel memory usage optimisations?
@ 2001-12-19 12:48 Marko Kenttälä
2001-12-19 12:59 ` Anton Blanchard
2001-12-19 13:03 ` David Woodhouse
0 siblings, 2 replies; 3+ messages in thread
From: Marko Kenttälä @ 2001-12-19 12:48 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm working on a project that uses Linux kernel version 2.4.16 on an
embedded ARM device. Since we have limited memory (both RAM and Flash) I
have tuned down some kernel internal defines to make it use less memory:
include/linux/major.h: MAX_CHRDEV 255->20, MAX_BLKDEV 255->10
include/linux/tty.h: MAX_NR_CONSOLES 63->3, MAX_NR_USER_CONSOLES 63->3
include/linux/kernel-stat.h: DK_MAX_MAJOR 16->4, DK_MAX_DISK 16->4
include/linux/sched.c: PIDHASH_SZ 1024->16
include/linux/tty.h: NR_PTYS 256->16, NR_LDISCS 16->4
kernel/printk.c: LOG_BUF_LEN 16384->2048
With these I have saved about 100 KB from bss. Do you see any dangerous
side-effects in those modifications?
I understand that best area for saving memory usage is the C-library but
are there any other kernel areas? I'm thinking of dropping swapfile support
and maybe some other subsystems that are not needed in embedded device.
--
Marko Kenttälä, Software Engineer
TERAFLOPS Ltd., Member of Elektrobit Group
Mobile: +358 40 7501832, Fax: +358 3 2258484
http://www.teraflops.com, http://www.elektrobit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel memory usage optimisations?
2001-12-19 12:48 Kernel memory usage optimisations? Marko Kenttälä
@ 2001-12-19 12:59 ` Anton Blanchard
2001-12-19 13:03 ` David Woodhouse
1 sibling, 0 replies; 3+ messages in thread
From: Anton Blanchard @ 2001-12-19 12:59 UTC (permalink / raw)
To: Marko Kentt?l?; +Cc: linux-kernel
> I understand that best area for saving memory usage is the C-library but
> are there any other kernel areas? I'm thinking of dropping swapfile support
> and maybe some other subsystems that are not needed in embedded device.
Check out all the cacheline_aligned usage, in all the cases I could see
there was no reason to do this on a UP machine. You could probably get
away with redefining them to do nothing.
Also you could drop the sizes of the hashes (dentry, inode, mount,
buffer, page, route) if they are taking up RAM.
Anton
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel memory usage optimisations?
2001-12-19 12:48 Kernel memory usage optimisations? Marko Kenttälä
2001-12-19 12:59 ` Anton Blanchard
@ 2001-12-19 13:03 ` David Woodhouse
1 sibling, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2001-12-19 13:03 UTC (permalink / raw)
To: Marko Kenttälä; +Cc: linux-kernel
marko.kenttala@teraflops.com said:
> I understand that best area for saving memory usage is the C-library
> but are there any other kernel areas? I'm thinking of dropping
> swapfile support and maybe some other subsystems that are not needed
> in embedded device.
You could potentially remove block device support altogether.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-19 13:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-19 12:48 Kernel memory usage optimisations? Marko Kenttälä
2001-12-19 12:59 ` Anton Blanchard
2001-12-19 13:03 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox