Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 May 2001 09:04:17 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Aman <satanmode@runbox.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.ORG>, "Sandeep (ROCK MAN)" <fuhrer6mill@yahoo.com>, Jaswinder Singh Kohli <jskohli@fig.org>
Subject:   Re: squeeze freeBSDs' kernel size
Message-ID:  <3AF81901.A5315CA3@mindspring.com>
References:  <3AF50686.F09BBDD5@runbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Aman wrote:
> 
> kldstat shows the kernel as a loaded module.  does it mean
> the kernel after getting in the core is resident to it's
> complete physical size.

Its complete physical size... only including static BSS
allocations.

> my question is, does the pagedaemon carry out any sort of
> paging or segmentation on the kernel and it's loadable
> modules though the latter seems necessary.

The inpcb's, tcpcb's, and similar data allocated via zalloci()
are in fact allocated in pageable memory.  These are post
initialization allocations (and are very annoying, since
their allocations apparently _must_ be contiguous in the
address map, so they must be per-sized to a large size, if
you ever expect to open a lot of sockets).


> how much size can be really squeezed out of the kernel

Not a lot, unless you reduce resources available to user
space.  For example, a properly cut-down kernel that does
not load unnecessary modules can still run in 4MB.

For most useful applications these days, networking is
required, which tends to bloat things up a bit more than
might be desirable.  One big factor here appears to be
the unnecessary mbuf allocation for each socket, and the
IPv6 stuff.  It appears to be very difficult to make the
IPv6 stuff "Go Away!" gracefully, without still bloating
some kernel structures; part of that appears to be the
fact that it's not really tagged very well as to what is
IPv6 vs. what's IPv4... my guess is that the IPv6 people
really, really didn't want us ripping IPv6 back out, once
they were able to get it into the kernel.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AF81901.A5315CA3>