On Mon, May 26, 2025 at 08:57:16PM +0200, Peter Zijlstra wrote: > > @@ -50,10 +51,12 @@ struct section { > > bool _changed, text, rodata, noinstr, init, truncate; > > struct reloc *relocs; > > unsigned long nr_alloc_relocs; > > + struct section *twin; > > }; > > > > struct symbol { > > struct list_head list; > > + struct list_head global_list; > > struct rb_node node; > > struct elf_hash_node hash; > > struct elf_hash_node name_hash; > > @@ -79,10 +82,13 @@ struct symbol { > > u8 cold : 1; > > u8 prefix : 1; > > u8 debug_checksum : 1; > > + u8 changed : 1; > > + u8 included : 1; > > struct list_head pv_target; > > struct reloc *relocs; > > struct section *group_sec; > > struct checksum csum; > > + struct symbol *twin, *clone; > > }; > > > > struct reloc { > > @@ -100,6 +106,7 @@ struct elf { > > const char *name, *tmp_name; > > unsigned int num_files; > > struct list_head sections; > > + struct list_head symbols; > > unsigned long num_relocs; > > > > int symbol_bits; > > ISTR us spending significant effort shrinking all this stuff. How does > this affect vmlinux.o memory footprint etc?
IIRC, most of our shrinking efforts were related to instructions and relocs, which use up the bulk of the memory. This set doesn't touch those. Before and after the set, with a Fedora config: Maximum resident set size (kbytes): 2934116 Maximum resident set size (kbytes): 2953708 So about ~0.67% more memory. -- Josh