Re: [PATCH] Force UNIX domain sockets to be built in



On Mon, Dec 31, 2007 at 02:26:42PM +0100, Bodo Eggert wrote:
On Mon, 31 Dec 2007, Adrian Bunk wrote:
On Mon, Dec 31, 2007 at 01:09:43PM +0100, Bodo Eggert wrote:

As suggested by Adrian Bunk, UNIX domain sockets should always be built in
on normal systems. This is especially true since udev needs these sockets
and fails to run if UNIX=m.

Signed-Off-By: Bodo Eggert <7eggert@xxxxxx>

---
Last minute change: I decided against making it a bool because embedded
folks might depend on a small kernel image. Edited in the patch below.
...

Is this just a purely theoretical thought or is this a reasonable use
case people actually use in practice?

For now, it's a theoretical thought, but having an embedded device, I can
see the reason for $EVERYTHING=m there.

The only advantage I see is that the kernel image you have to flash
can be made smaller - with the disadvantage that the running kernel
is bigger by more than 10%.

If you don't believe me, try it yourself:
Build all drivers statically into your kernel, and then compare the
vmlinux sizes with CONFIG_MODULES=n and CONFIG_MODULES=y.

After all, changing it to a bool will allow us to make the kernel image
for nearly everyone smaller by a few hundred bytes...

I can't see why optionally building it as a module would force us to make
the kernel bigger. It may be a little more ugly to support =m, but thats it,
isn't it?

On architectures like x86 where __exit code is freed at runtime
af_unix_exit() makes your kernel image (but not the running kernel)
bigger.

With CONFIG_MODULES=y the 13 EXPORT_SYMBOL's that only exist for the
theoretical possibility of CONIG_UNIX=m waste a few hundred bytes
of memory.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] driver-core: devtmpfs - driver core maintained /dev tmpfs
    ... that's much more than we have at present, and a bigger ... initramfs' can only make bootup _slower_. ... Ditto a bigger kernel. ... I'm almost curious how early it is possible to start userspace, ...
    (Linux-Kernel)
  • Re: [PATCH] Force UNIX domain sockets to be built in
    ... The only advantage I see is that the kernel image you have to flash ... is bigger by more than 10%. ... There had been need of rain for many days. ...
    (Linux-Kernel)
  • Re: File limit. 2 Gig ?
    ... If you want to use files bigger ... assumed that file offsets will never be bigger than 32 bits, ... For these programs, Solaris ... Note that, when running a 64-bit kernel, it is possible to run ...
    (comp.unix.solaris)
  • Re: First formally proven OS kernel?
    ... What is bigger, a proof checker, or a kernel? ... verify manually a 200 line proof checker algorithm, ... What is bigger, a specification or the corresponding implementation? ...
    (comp.programming)
  • Re: What will "OpenSolaris" be?
    ... |This is what made me consider what was being considered "OpenSolaris". ... |1hr 18 minute compile time that seems a little high for a kernel (though not ... It's bigger than a breadbox, ... bigger than a kernel, smaller than all of the OS. ...
    (comp.unix.solaris)