All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid_aziz@hp.com>
To: Padraig Brady <padraig.brady@corvil.com>
Cc: Paul.Clements@steeleye.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.5] Retrieve configuration information from kernel
Date: Tue, 05 Nov 2002 10:23:19 -0700	[thread overview]
Message-ID: <3DC7FE87.AA879F83@hp.com> (raw)
In-Reply-To: 3DBFB7AE.6030306@corvil.com

Padraig Brady wrote:
> 
> Khalid Aziz wrote:
> > Paul Clements wrote:
> >
> >>Have you considered compressing the config info in order to reduce
> >>the space wastage in the loaded kernel image? Could easily be 10's of KB
> >>(not that that's a lot these days). The info would then be retrieved via
> >>"gunzip -c", et al. instead of a simple "cat".
> >
> > I wanted to start with a simple implementation first. There are a couple
> > of things that can be done in future to further improve meory usage: (1)
> > Drop "CONFIG_" and "# CONFIG_" from each line and add it back when
> > printing from /proc/ikconfig and extract-ikconfig script, (2) Compress
> > the resulting configuration. Something to do in near future :)
> 
> $ wc -c /usr/src/linux-2.4/.config
>    38092 /usr/src/linux-2.4/.config

That charcater count includes all the comments as well. It may not be
much but it is not insignificant.

# wc -c .config
  22174 .config
# grep "^#\? \?CONFIG_"  .config | wc -c
  20623

> $ gzip -c /usr/src/linux-2.4/.config | wc -c
>    10305
> $ sed '/^ *$/d;/^#/d;s/^CONFIG_//'  /usr/src/linux-2.4/.config | wc -c
>    17267
> $ sed '/^ *$/d;/^#/d;s/^CONFIG_//'  /usr/src/linux-2.4/.config | gzip | wc -c
>     6155

Dropping "CONFIG_" and "# CONFIG_" will definitely reduce memory
requirements. We do not want to drop the lines "# CONFIG_* is not set".
If you do that, you end up having to answer lots of questions when
running "make oldconfig".
 
> 
> Also it seems like it would be more useful to have the config in the
> kernel image rather than (just) proc?

It IS in the kernel image. Use scripts/extract-ikconfig to extract it
from the kernel image file. And if you only need it to be in kernel
image, you can choose to not have it under /proc.

--
Khalid 

====================================================================
Khalid Aziz                                Linux and Open Source Lab
(970)898-9214                                        Hewlett-Packard
khalid@hp.com                                       Fort Collins, CO

"The Linux kernel is subject to relentless development" 
				- Alessandro Rubini

      reply	other threads:[~2002-11-05 17:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-29 16:24 [PATCH 2.5] Retrieve configuration information from kernel Khalid Aziz
2002-10-29 17:11 ` Paul Clements
2002-10-29 18:18   ` Khalid Aziz
2002-10-29 19:30     ` Chris Friesen
2002-11-05 17:27       ` Khalid Aziz
2002-10-30 10:42     ` Padraig Brady
2002-11-05 17:23       ` Khalid Aziz [this message]

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=3DC7FE87.AA879F83@hp.com \
    --to=khalid_aziz@hp.com \
    --cc=Paul.Clements@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=padraig.brady@corvil.com \
    /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.