lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [REGRESSION] Recent change to kernel spikes out ccache/distcc
On Wed, Jan 07, 2009 at 12:35:09PM +0000, Jan Beulich wrote:
> >>> Sam Ravnborg <sam@ravnborg.org> 07.01.09 12:31 >>>
> >What is the gain/pain ratio here?
>
> Certainly depends on the pov - it reduces the kernel module (disk) image
> sizes quite a bit, so from a distro perspective its a move against the ever
> growing package sizes (and the disk space) hundreds or even thousands
> of modules require.

The kernel modules seldom export anything so the benefit is minimal here.

I really think we are on a wrong track here.

I did a 15 minutes hack to try ripping the .c -> .s -> .o stuff out.

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5d90030..8c93dc3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -153,7 +153,7 @@ $(obj)/%.i: $(src)/%.c FORCE

cmd_genksyms = \
$(CPP) -D__GENKSYMS__ $(c_flags) $< | \
- $(GENKSYMS) -T $@ -A -a $(ARCH) \
+ $(GENKSYMS) -T $@ $(if $(CONFIG_KBUILD_STRIP_CRC), -A) -a $(ARCH) \
$(if $(KBUILD_PRESERVE),-p) \
$(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null)))

@@ -192,6 +192,7 @@ v_file = $(@D)/.tmp_$(@F:.o=.v)
tmp_o_file = $(@D)/.tmp_$(@F)
no_g_c_flags = $(filter-out -g%,$(c_flags))

+ifdef CONFIG_KBUILD_STRIP_CRC
cmd_cc_o_c = $(CC) $(c_flags) -S -o $(s_file) $<

cmd_modversions = \
@@ -208,8 +209,20 @@ cmd_modversions = \
fi; \
else \
rm -f $(v_file); \
- $(CC) $(no_g_c_flags) -c -o $@ $(s_file); \
+ $(CC) $(no_g_c_flags) -c -o $@ $< ; \
fi;
+else
+cmd_cc_o_c = $(CC) $(c_flags) -c -o $(tmp_o_file) $<
+
+cmd_modversions = \
+ if $(OBJDUMP) -h $(tmp_o_file) | grep -q __ksymtab; then \
+ $(call cmd_genksyms, $(KBUILD_SYMTYPES)) > $(v_file); \
+ $(LD) $(LDFLAGS) -r -o $@ $(tmp_o_file) -T $(v_file); \
+ else \
+ rm -f $(v_file); \
+ fi;
+
+endif
endif

ifdef CONFIG_FTRACE_MCOUNT_RECORD

Jan - I need some hard numbers to convince me that stripping the
__crc symbols is worth it.

We can make it a configuration option as I showed above but we should
at least know what we are gaining for this.

I am very positive about stripping of the modules in general,
but the __crc_ symbols seems to trigger a few things:
1) ccahce, distcc issues in the MODVERSION case (that is allmodconfig builds)
2) It does not increase readability of the Makefile machinery and I like more
people to be able to hack on this - not less.

Thanks,
Sam


\
 
 \ /
  Last update: 2009-01-07 14:25    [W:0.101 / U:6.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site