mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Marko Kenttälä" <marko.kenttala@teraflops.com>
To: linux-kernel@vger.kernel.org
Subject: Kernel memory usage optimisations?
Date: Wed, 19 Dec 2001 14:48:48 +0200	[thread overview]
Message-ID: <5.1.0.14.2.20011219144636.03498a10@mail.teraflops.com> (raw)

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


             reply	other threads:[~2001-12-19 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 12:48 Marko Kenttälä [this message]
2001-12-19 12:59 ` Anton Blanchard
2001-12-19 13:03 ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.2.20011219144636.03498a10@mail.teraflops.com \
    --to=marko.kenttala@teraflops.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®