tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD-8 kernel too big?



On 2018/08/30 20:54, D'Arcy Cain wrote:
My latest build of NetBSD 8 results in a kernel size of 24,964,488
bytes.  Not sure if "kernel" is really the right term any more.  :-)

I have installed it on all of my servers except for one.  It is a HP
ProLiant DL160se G6.  The failure is something like this:

Read header failed: input/output error
Boot: ad0a:netbsd: input/output error

I did find something on the net about FreeBSD that suggests that this
can be fixed by disabling a memory hole in the bios but this system does
not seem to have that option.

The 7.1 kernel that boots is 17,812,998 bytes making it just over 16MB.
I am not sure how much of the file actually loads into memory but this
sounds close to a boundary.

I tried removing a bunch of stuff but I run the same kernel on multiple
servers and figuring out what to drop isn't that easy.  Removing a bunch
of stuff that seemed safe didn't make much difference.

I saw these two warnings in the dmesg output:

ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block:
128/64 (20131218/tbfadt-634)
ACPI BIOS Warning (bug): Incorrect checksum in table [OEMB] - 0x29,
should be 0x28 (20131218/tbprint-237)

The first is also in anther server's dmesg which boots the new kernel
fine and research on the net suggests that the second doesn't matter.

Anyone know what my next steps are?

Cheers.

On my machines:

netbsd-7:
 > % ls -l /netbsd
 > -rwxr-xr-x  1 root  wheel  17968892 Aug 29 23:04 /netbsd

netbsd-8:
 > % ls -l /netbsd
 > -rwxr-xr-x  1 root  wheel  24925744 Aug 25 00:19 /netbsd

almost the same size as yours.

netbsd-7:
% objdump -h /netbsd

/netbsd:     file format elf64-x86-64

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         008f1e76  ffffffff80100000  0000000000100000  00100000  2**6
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00358f53  ffffffff809f1e80  00000000009f1e80  009f1e80  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .eh_frame     00164688  ffffffff80d4add8  0000000000d4add8  00d4add8  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 link_set_modules 00000430  ffffffff80eaf460  0000000000eaf460  00eaf460  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 link_set_sysctl_funcs 000001e0  ffffffff80eaf890  0000000000eaf890  00eaf890  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 link_set_ah_rfs 00000038  ffffffff80eafa70  0000000000eafa70  00eafa70  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 link_set_ah_chips 00000038  ffffffff80eafaa8  0000000000eafaa8  00eafaa8  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 link_set_domains 00000058  ffffffff80eafae0  0000000000eafae0  00eafae0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 link_set_bufq_strats 00000020  ffffffff80eafb38  0000000000eafb38  00eafb38  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 link_set_evcnts 000000f8  ffffffff80eafb58  0000000000eafb58  00eafb58  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 10 link_set_dkwedge_methods 00000010  ffffffff80eafc50  0000000000eafc50  00eafc50  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 11 link_set_linux_module_param_desc 00000190  ffffffff80eafc60  0000000000eafc60  00eafc60  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 12 link_set_linux_module_param_info 000001a0  ffffffff80eafdf0  0000000000eafdf0  00eafdf0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 13 link_set_ieee80211_funcs 00000020  ffffffff80eaff90  0000000000eaff90  00eaff90  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 14 link_set_prop_linkpools 00000040  ffffffff80eaffb0  0000000000eaffb0  00eaffb0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 .data         0009eae0  ffffffff80fb0000  0000000000fb0000  00eb0000  2**12
                  CONTENTS, ALLOC, LOAD, DATA
 16 .data.cacheline_aligned 00003004  ffffffff8104eb00  000000000104eb00  00f4eb00  2**6
                  CONTENTS, ALLOC, LOAD, DATA
 17 .data.read_mostly 000003b8  ffffffff81051b40  0000000001051b40  00f51b40  2**5
                  CONTENTS, ALLOC, LOAD, DATA
 18 .bss          00092000  ffffffff81052000  0000000001052000  00f51ef8  2**12
                  ALLOC
 19 .note.netbsd.ident 00000018  ffffffff810e4000  ffffffff810e4000  00f51ef8  2**2
                  CONTENTS, READONLY
 20 .comment      0000001a  0000000000000000  0000000000000000  00f51f10  2**0
                  CONTENTS, READONLY
 21 .ident        00019968  0000000000000000  0000000000000000  00f51f2a  2**0
                  CONTENTS, READONLY
 22 .debug_info   00004683  0000000000000000  0000000000000000  00f6b892  2**0
                  CONTENTS, READONLY, DEBUGGING
 23 .debug_abbrev 00000238  0000000000000000  0000000000000000  00f6ff15  2**0
                  CONTENTS, READONLY, DEBUGGING
 24 .debug_aranges 00000030  0000000000000000  0000000000000000  00f7014d  2**0
                  CONTENTS, READONLY, DEBUGGING
 25 .debug_line   0000035d  0000000000000000  0000000000000000  00f7017d  2**0
                  CONTENTS, READONLY, DEBUGGING
 26 .debug_str    00002b0f  0000000000000000  0000000000000000  00f704da  2**0
                  CONTENTS, READONLY, DEBUGGING

netbsd-8:
% objdump -h /netbsd

/netbsd:     file format elf64-x86-64

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         00acfefd  ffffffff80200000  0000000000200000  00200000  2**6
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata.hotpatch 00001a36  ffffffff80e00000  0000000000e00000  00e00000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .rodata       0039f7c3  ffffffff80e01a40  0000000000e01a40  00e01a40  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .eh_frame     0018c5f0  ffffffff811a1208  00000000011a1208  011a1208  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 link_set_modules 00000688  ffffffff8132d7f8  000000000132d7f8  0132d7f8  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 link_set_evcnts 00000108  ffffffff8132de80  000000000132de80  0132de80  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 link_set_sysctl_funcs 000001a0  ffffffff8132df88  000000000132df88  0132df88  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 link_set_ieee80211_funcs 00000020  ffffffff8132e128  000000000132e128  0132e128  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 link_set_domains 00000058  ffffffff8132e148  000000000132e148  0132e148  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 link_set_ah_chips 00000038  ffffffff8132e1a0  000000000132e1a0  0132e1a0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 10 link_set_ah_rfs 00000038  ffffffff8132e1d8  000000000132e1d8  0132e1d8  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 11 link_set_linux_module_param_desc 000001e0  ffffffff8132e210  000000000132e210  0132e210  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 12 link_set_linux_module_param_info 000001f0  ffffffff8132e3f0  000000000132e3f0  0132e3f0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 13 link_set_sdt_argtypes_set 000001a0  ffffffff8132e5e0  000000000132e5e0  0132e5e0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 14 link_set_sdt_probes_set 000000e8  ffffffff8132e780  000000000132e780  0132e780  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 link_set_sdt_providers_set 00000020  ffffffff8132e868  000000000132e868  0132e868  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 16 link_set_dkwedge_methods 00000018  ffffffff8132e888  000000000132e888  0132e888  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 17 link_set_prop_linkpools 00000040  ffffffff8132e8a0  000000000132e8a0  0132e8a0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 18 .data         000c3200  ffffffff81400000  0000000001400000  01400000  2**6
                  CONTENTS, ALLOC, LOAD, DATA
 19 .data.cacheline_aligned 00003bb0  ffffffff814c3200  00000000014c3200  014c3200  2**6
                  CONTENTS, ALLOC, LOAD, DATA
 20 .data.read_mostly 000005ac  ffffffff814c6dc0  00000000014c6dc0  014c6dc0  2**5
                  CONTENTS, ALLOC, LOAD, DATA
 21 .bss          00138000  ffffffff814c8000  00000000014c8000  014c736c  2**12
                  ALLOC
 22 .note.netbsd.ident 00000018  ffffffff81600000  ffffffff81600000  014c736c  2**2
                  CONTENTS, READONLY
 23 .ident        00021059  0000000000000000  0000000000000000  014c7384  2**0
                  CONTENTS, READONLY
 24 .comment      0000001a  0000000000000000  0000000000000000  014e83dd  2**0
                  CONTENTS, READONLY
 25 .SUNW_ctf     0010627e  0000000000000000  0000000000000000  014e83f8  2**2
                  CONTENTS, READONLY

so,

netbsd-7:
  0 .text         008f1e76  ffffffff80100000  0000000000100000  00100000  2**6
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00358f53  ffffffff809f1e80  00000000009f1e80  009f1e80  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
netbsd-8:
  0 .text         00acfefd  ffffffff80200000  0000000000200000  00200000  2**6
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata.hotpatch 00001a36  ffffffff80e00000  0000000000e00000  00e00000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .rodata       0039f7c3  ffffffff80e01a40  0000000000e01a40  00e01a40  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
(snip)
 25 .SUNW_ctf     0010627e  0000000000000000  0000000000000000  014e83f8  2**2
                  CONTENTS, READONLY

1)
File offset of .text is 0x00100000 on netbsd-7 and 0x00200000 on netbsd-8.
+1MB (hole).

2)
netbsd-8 has .rodata.hotpatch section and the offset is 00e00000.
+1.3MB (hole)

3)
netbsd-8 has a section for CTF.
+1MB

and some others.

--
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index