From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: josh@joshtriplett.org
Cc: linux-kernel@vger.kernel.org, Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [PATCH 00/10] tinification: Make memory-access char devices optional
Date: Fri, 23 Jan 2015 12:37:06 -0600 [thread overview]
Message-ID: <cover.1422035184.git.tom.zanussi@linux.intel.com> (raw)
This patchset adds a top-level config option, CONFIG_DEVMEM_BASE, and
a series of dependent options below it which allow various devices
such as /dev/mem, /dev/null, /dev/zero, /dev/random, etc. to be
disabled. This allows embedded systems systems that don't need any or
all of those devices to save the kernel memory associated with those
devices.
It also adds a related option to disable the getrandom(2) syscall,
CONFIG_GETRANDOM_SYSCALL, which allows code shared between it and
/dev/*random to be compiled out as well.
Disabling of CONFIG_DEVMEM_BASE and its dependent options is only
available if CONFIG_EMBEDDED is enabled; normal systems will still
have everything enabled as usual.
bloat-o-meter shows a total 6k savings for a tinyconfig kernel with
all options disabled, and about 10k savings for the same thing but
using defconfig.
bloat-o-meter (based on tinyconfig):
add/remove: 0/55 grow/shrink: 1/3 up/down: 332/-6563 (-6231)
function old new delta
extract_entropy 114 446 +332
__print_once 13 12 -1
write_null 3 - -3
read_null 3 - -3
mix_pool_bytes 17 14 -3
aio_read_null 3 - -3
pipe_to_null 4 - -4
mem_class 4 - -4
write_full 6 - -6
devkmsg_release 15 - -15
random_fasync 16 - -16
mmap_zero 16 - -16
aio_write_null 18 - -18
open_port 19 - -19
random_read 20 - -20
splice_write_null 24 - -24
null_lseek 25 - -25
mmap_mem_ops 32 - -32
mem_devnode 35 - -35
mmap_kmem 37 - -37
random_write 42 - -42
xfer_secondary_pool 60 - -60
write_pool 82 - -82
random_poll 83 - -83
read_iter_zero 95 - -95
urandom_read 96 - -96
memory_open 96 - -96
devkmsg_poll 97 - -97
read_port 98 - -98
mmap_mem 103 - -103
devkmsg_open 112 - -112
write_port 116 - -116
zero_fops 120 - -120
urandom_fops 120 - -120
random_fops 120 - -120
port_fops 120 - -120
null_fops 120 - -120
memory_fops 120 - -120
mem_fops 120 - -120
kmsg_fops 120 - -120
kmem_fops 120 - -120
full_fops 120 - -120
memory_lseek 122 - -122
devkmsg_llseek 144 - -144
chr_dev_init 162 3 -159
read_mem 162 - -162
extract_buf 164 - -164
_random_read.part 173 - -173
account 181 - -181
write_mem 184 - -184
devlist 192 - -192
extract_entropy_user 197 - -197
devkmsg_write 209 - -209
sys_getrandom 211 - -211
zero_bdi 244 - -244
read_kmem 290 - -290
random_ioctl 319 - -319
write_kmem 349 - -349
devkmsg_read 699 - -699
The following changes since commit 5eb11d6b3f55eb4d28c51ea7f641c0e5e255a70f:
Merge tag 'sound-3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound (2015-01-21 20:37:25 +1200)
are available in the git repository at:
git://git.yoctoproject.org/linux-yocto-contrib.git tzanussi/devmem-tinification-v1
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-contrib/log/?h=tzanussi/devmem-tinification-v1
Tom Zanussi (10):
drivers/char: Support compiling out memory-access char devices
drivers/char: Support compiling out /dev/mem
drivers/char: Support compiling out /dev/port
drivers/char: Support compiling out /dev/null
drivers/char: Support compiling out /dev/zero
drivers/char: Support compiling out /dev/full
drivers/char: Support compiling out /dev/random
drivers/char: Support compiling out /dev/urandom
drivers/char: Support compiling out /dev/kmsg
drivers/char: Support compiling out the getrandom(2) syscall
arch/x86/Kconfig.debug | 1 +
drivers/char/Kconfig | 109 ++++++++++++++++++++++++++++++++++++++++++++++++-
drivers/char/mem.c | 83 +++++++++++++++++++++++++++----------
drivers/char/random.c | 24 ++++++++---
kernel/printk/printk.c | 2 +
kernel/sys_ni.c | 1 +
6 files changed, 192 insertions(+), 28 deletions(-)
--
1.9.3
next reply other threads:[~2015-01-23 18:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 18:37 Tom Zanussi [this message]
2015-01-23 18:37 ` [PATCH 01/10] drivers/char: Support compiling out memory-access char devices Tom Zanussi
2015-01-23 18:37 ` [PATCH 02/10] drivers/char: Support compiling out /dev/mem Tom Zanussi
2015-01-23 18:37 ` [PATCH 03/10] drivers/char: Support compiling out /dev/port Tom Zanussi
2015-01-23 18:37 ` [PATCH 04/10] drivers/char: Support compiling out /dev/null Tom Zanussi
2015-01-23 18:37 ` [PATCH 05/10] drivers/char: Support compiling out /dev/zero Tom Zanussi
2015-01-28 21:07 ` Pavel Machek
2015-01-28 21:51 ` josh
2015-01-28 21:52 ` Pavel Machek
2015-01-28 23:20 ` Tom Zanussi
2015-01-31 23:08 ` Josh Triplett
2015-01-23 18:37 ` [PATCH 06/10] drivers/char: Support compiling out /dev/full Tom Zanussi
2015-01-23 18:37 ` [PATCH 07/10] drivers/char: Support compiling out /dev/random Tom Zanussi
2015-01-23 18:37 ` [PATCH 08/10] drivers/char: Support compiling out /dev/urandom Tom Zanussi
2015-01-23 18:37 ` [PATCH 09/10] drivers/char: Support compiling out /dev/kmsg Tom Zanussi
2015-01-23 18:37 ` [PATCH 10/10] drivers/char: Support compiling out the getrandom(2) syscall Tom Zanussi
2015-01-23 19:46 ` Theodore Ts'o
2015-01-23 20:04 ` Tom Zanussi
2015-01-23 22:30 ` josh
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=cover.1422035184.git.tom.zanussi@linux.intel.com \
--to=tom.zanussi@linux.intel.com \
--cc=josh@joshtriplett.org \
--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 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.