Spurious rebuilds of raid6 and drivers/media/video in 2.6.16
Hi,
if I copy a compiled kernel tree to another location and run make again in the new directory, a few files always get rebuilt. These files only are rebuilt if the tree is a copy of another tree and they are rebuilt only once.
Any ideas why this is the case?
arch=x86_64, make=3.80, filesystem=reiserfs
Log follows:
compiler@switch:/storage> cd linux-2.6.16/
compiler@switch:/storage/linux-2.6.16> make
CHK include/linux/version.h CHK include/linux/compile.h CHK usr/initramfs_list
Kernel: arch/x86_64/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST
compiler@switch:/storage/linux-2.6.16> cd .. compiler@switch:/storage> cp -ar linux-2.6.16/ linux-2.6.16-unmodified compiler@switch:/storage> cd linux-2.6.16-unmodified/ compiler@switch:/storage/linux-2.6.16-unmodified> make
CHK include/linux/version.h CHK include/linux/compile.h CHK usr/initramfs_list OUI2C drivers/ieee1394/oui.c CC [M] drivers/ieee1394/oui.o LD [M] drivers/ieee1394/ieee1394.o UNROLL drivers/md/raid6int1.c CC [M] drivers/md/raid6int1.o UNROLL drivers/md/raid6int2.c CC [M] drivers/md/raid6int2.o UNROLL drivers/md/raid6int4.c CC [M] drivers/md/raid6int4.o UNROLL drivers/md/raid6int8.c CC [M] drivers/md/raid6int8.o UNROLL drivers/md/raid6int16.c CC [M] drivers/md/raid6int16.o UNROLL drivers/md/raid6int32.c CC [M] drivers/md/raid6int32.o UNROLL drivers/md/raid6altivec1.c CC [M] drivers/md/raid6altivec1.o UNROLL drivers/md/raid6altivec2.c CC [M] drivers/md/raid6altivec2.o UNROLL drivers/md/raid6altivec4.c CC [M] drivers/md/raid6altivec4.o UNROLL drivers/md/raid6altivec8.c CC [M] drivers/md/raid6altivec8.o LD [M] drivers/md/raid6.o LD [M] drivers/md/dm-mod.o LD [M] drivers/md/dm-multipath.o LD [M] drivers/md/dm-snapshot.o LD [M] drivers/md/dm-mirror.o CC [M] drivers/media/video/videodev.o CC [M] drivers/media/video/v4l2-common.o CC [M] drivers/media/video/v4l1-compat.o CC [M] drivers/media/video/compat_ioctl32.o CC [M] drivers/media/video/bttv-driver.o CC [M] drivers/media/video/bttv-cards.o CC [M] drivers/media/video/bttv-if.o CC [M] drivers/media/video/bttv-risc.o CC [M] drivers/media/video/bttv-vbi.o CC [M] drivers/media/video/bttv-i2c.o CC [M] drivers/media/video/bttv-gpio.o CC [M] drivers/media/video/bttv-input.o CC [M] drivers/media/video/msp3400-driver.o CC [M] drivers/media/video/msp3400-kthreads.o CC [M] drivers/media/video/tuner-core.o CC [M] drivers/media/video/tuner-types.o CC [M] drivers/media/video/tuner-simple.o CC [M] drivers/media/video/mt20xx.o CC [M] drivers/media/video/tda8290.o CC [M] drivers/media/video/tea5767.o CC [M] drivers/media/video/zoran_procfs.o CC [M] drivers/media/video/zoran_device.o drivers/media/video/zoran_device.c: In function `zr36057_overlay': drivers/media/video/zoran_device.c:539: warning: cast from pointer to integer of different size CC [M] drivers/media/video/zoran_driver.o CC [M] drivers/media/video/zoran_card.o LD [M] drivers/media/video/bttv.o LD [M] drivers/media/video/msp3400.o CC [M] drivers/media/video/tvaudio.o CC [M] drivers/media/video/tda7432.o CC [M] drivers/media/video/tda9875.o CC [M] drivers/media/video/ir-kbd-i2c.o CC [M] drivers/media/video/tvmixer.o CC [M] drivers/media/video/saa6588.o CC [M] drivers/media/video/saa5246a.o CC [M] drivers/media/video/saa5249.o CC [M] drivers/media/video/c-qcam.o CC [M] drivers/media/video/bw-qcam.o CC [M] drivers/media/video/w9966.o CC [M] drivers/media/video/saa7111.o CC [M] drivers/media/video/saa7185.o CC [M] drivers/media/video/zr36060.o CC [M] drivers/media/video/saa7110.o CC [M] drivers/media/video/adv7175.o CC [M] drivers/media/video/vpx3220.o CC [M] drivers/media/video/zr36050.o CC [M] drivers/media/video/zr36016.o CC [M] drivers/media/video/bt819.o CC [M] drivers/media/video/bt856.o CC [M] drivers/media/video/saa7114.o CC [M] drivers/media/video/adv7170.o LD [M] drivers/media/video/zr36067.o CC [M] drivers/media/video/videocodec.o CC [M] drivers/media/video/stradis.o CC [M] drivers/media/video/cpia.o CC [M] drivers/media/video/cpia_pp.o CC [M] drivers/media/video/cpia_usb.o CC [M] drivers/media/video/saa711x.o CC [M] drivers/media/video/tvp5150.o CC [M] drivers/media/video/wm8775.o CC [M] drivers/media/video/cs53l32a.o LD [M] drivers/media/video/tuner.o CC [M] drivers/media/video/tda9840.o CC [M] drivers/media/video/tea6415c.o CC [M] drivers/media/video/tea6420.o CC [M] drivers/media/video/mxb.o CC [M] drivers/media/video/hexium_orion.o CC [M] drivers/media/video/hexium_gemini.o CC [M] drivers/media/video/dpc7146.o CC [M] drivers/media/video/tuner-3036.o CC [M] drivers/media/video/tda9887.o CC [M] drivers/media/video/video-buf.o CC [M] drivers/media/video/video-buf-dvb.o CC [M] drivers/media/video/btcx-risc.o CC [M] drivers/media/video/tveeprom.o CC [M] drivers/media/video/saa7115.o CC [M] drivers/media/video/saa7127.o CC [M] drivers/media/video/cx88/cx88-video.o CC [M] drivers/media/video/cx88/cx88-vbi.o CC [M] drivers/media/video/cx88/cx88-mpeg.o CC [M] drivers/media/video/cx88/cx88-cards.o CC [M] drivers/media/video/cx88/cx88-core.o CC [M] drivers/media/video/cx88/cx88-i2c.o CC [M] drivers/media/video/cx88/cx88-tvaudio.o CC [M] drivers/media/video/cx88/cx88-input.o LD [M] drivers/media/video/cx88/cx88xx.o LD [M] drivers/media/video/cx88/cx8800.o LD [M] drivers/media/video/cx88/cx8802.o CC [M] drivers/media/video/cx88/cx88-blackbird.o CC [M] drivers/media/video/cx88/cx88-dvb.o CC [M] drivers/media/video/cx88/cx88-alsa.o CC [M] drivers/media/video/cx88/cx88-vp3054-i2c.o CC [M] drivers/media/video/saa7134/saa7134-cards.o CC [M] drivers/media/video/saa7134/saa7134-core.o CC [M] drivers/media/video/saa7134/saa7134-i2c.o CC [M] drivers/media/video/saa7134/saa7134-ts.o CC [M] drivers/media/video/saa7134/saa7134-tvaudio.o CC [M] drivers/media/video/saa7134/saa7134-vbi.o CC [M] drivers/media/video/saa7134/saa7134-video.o CC [M] drivers/media/video/saa7134/saa7134-input.o LD [M] drivers/media/video/saa7134/saa7134.o CC [M] drivers/media/video/saa7134/saa7134-empress.o CC [M] drivers/media/video/saa7134/saa6752hs.o CC [M] drivers/media/video/saa7134/saa7134-alsa.o CC [M] drivers/media/video/saa7134/saa7134-dvb.o CC [M] drivers/net/chelsio/cxgb2.o CC [M] drivers/net/chelsio/espi.o CC [M] drivers/net/chelsio/pm3393.o CC [M] drivers/net/chelsio/sge.o CC [M] drivers/net/chelsio/subr.o CC [M] drivers/net/chelsio/mv88x201x.o LD [M] drivers/net/chelsio/cxgb.o Kernel: arch/x86_64/boot/bzImage is ready (#1) Building modules, stage 2. MODPOST LD [M] drivers/ieee1394/ieee1394.ko LD [M] drivers/md/dm-mirror.ko LD [M] drivers/md/dm-mod.ko LD [M] drivers/md/dm-multipath.ko LD [M] drivers/md/dm-snapshot.ko LD [M] drivers/md/raid6.ko LD [M] drivers/media/video/adv7170.ko LD [M] drivers/media/video/adv7175.ko LD [M] drivers/media/video/bt819.ko LD [M] drivers/media/video/bt856.ko LD [M] drivers/media/video/btcx-risc.ko LD [M] drivers/media/video/bttv.ko LD [M] drivers/media/video/bw-qcam.ko LD [M] drivers/media/video/c-qcam.ko LD [M] drivers/media/video/compat_ioctl32.ko LD [M] drivers/media/video/cpia.ko LD [M] drivers/media/video/cpia_pp.ko LD [M] drivers/media/video/cpia_usb.ko LD [M] drivers/media/video/cs53l32a.ko LD [M] drivers/media/video/cx88/cx88-alsa.ko LD [M] drivers/media/video/cx88/cx88-blackbird.ko LD [M] drivers/media/video/cx88/cx88-dvb.ko LD [M] drivers/media/video/cx88/cx88-vp3054-i2c.ko LD [M] drivers/media/video/cx88/cx8800.ko LD [M] drivers/media/video/cx88/cx8802.ko LD [M] drivers/media/video/cx88/cx88xx.ko LD [M] drivers/media/video/dpc7146.ko LD [M] drivers/media/video/hexium_gemini.ko LD [M] drivers/media/video/hexium_orion.ko LD [M] drivers/media/video/ir-kbd-i2c.ko LD [M] drivers/media/video/msp3400.ko LD [M] drivers/media/video/mxb.ko LD [M] drivers/media/video/saa5246a.ko LD [M] drivers/media/video/saa5249.ko LD [M] drivers/media/video/saa6588.ko LD [M] drivers/media/video/saa7110.ko LD [M] drivers/media/video/saa7111.ko LD [M] drivers/media/video/saa7114.ko LD [M] drivers/media/video/saa7115.ko LD [M] drivers/media/video/saa711x.ko LD [M] drivers/media/video/saa7127.ko LD [M] drivers/media/video/saa7134/saa6752hs.ko LD [M] drivers/media/video/saa7134/saa7134-alsa.ko LD [M] drivers/media/video/saa7134/saa7134-dvb.ko LD [M] drivers/media/video/saa7134/saa7134-empress.ko LD [M] drivers/media/video/saa7134/saa7134.ko LD [M] drivers/media/video/saa7185.ko LD [M] drivers/media/video/stradis.ko LD [M] drivers/media/video/tda7432.ko LD [M] drivers/media/video/tda9840.ko LD [M] drivers/media/video/tda9875.ko LD [M] drivers/media/video/tda9887.ko LD [M] drivers/media/video/tea6415c.ko LD [M] drivers/media/video/tea6420.ko LD [M] drivers/media/video/tuner-3036.ko LD [M] drivers/media/video/tuner.ko LD [M] drivers/media/video/tvaudio.ko LD [M] drivers/media/video/tveeprom.ko LD [M] drivers/media/video/tvmixer.ko LD [M] drivers/media/video/tvp5150.ko LD [M] drivers/media/video/v4l1-compat.ko LD [M] drivers/media/video/v4l2-common.ko LD [M] drivers/media/video/video-buf-dvb.ko LD [M] drivers/media/video/video-buf.ko LD [M] drivers/media/video/videocodec.ko LD [M] drivers/media/video/videodev.ko LD [M] drivers/media/video/vpx3220.ko LD [M] drivers/media/video/w9966.ko LD [M] drivers/media/video/wm8775.ko LD [M] drivers/media/video/zr36016.ko LD [M] drivers/media/video/zr36050.ko LD [M] drivers/media/video/zr36060.ko LD [M] drivers/media/video/zr36067.ko LD [M] drivers/net/chelsio/cxgb.ko compiler@switch:/storage/linux-2.6.16-unmodified> make CHK include/linux/version.h CHK include/linux/compile.h CHK usr/initramfs_list
Kernel: arch/x86_64/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST
compiler@switch:/storage/linux-2.6.16-unmodified>
Regards,
Carl-Daniel
Quoted 7 lines · Carl-Daniel Hailfinger
Hi,
if I copy a compiled kernel tree to another location and run make again in the new directory, a few files always get rebuilt. These files only are rebuilt if the tree is a copy of another tree and they are rebuilt only once.
Any ideas why this is the case?
The reason why the predictive rebuild happens is that in some parts of the kbuild files it has been necessary to use absolute paths. One example is the oiu2c shell script where we use the full path to locate the shell script.
The reason why a full path is used is that this shall also work when compiling the kernel using make O=...
What happens is that kbuild detects that the command used to build the target has changed and therefore force a rebuild. It is the same mechanishm that is used to detect when arguments to the compiler changes.
So the rebuild will happen. It would be possible to minimize the places where a rebuild is triggered when moving the source tree, but I have not seen any benefit doing so lately.
Sam
Quoted 10 lines · Sam Ravnborg
Quoted 7 lines · Carl-Daniel Hailfinger
Hi,
if I copy a compiled kernel tree to another location and run make again in the new directory, a few files always get rebuilt. These files only are rebuilt if the tree is a copy of another tree and they are rebuilt only once.
Any ideas why this is the case?
Quoted 6 lines
The reason why the predictive rebuild happens is that in some parts of the kbuild files it has been necessary to use absolute paths. One example is the oiu2c shell script where we use the full path to locate the shell script.
The reason why a full path is used is that this shall also work when compiling the kernel using make O=...
Thanks for the information.
Quoted 3 lines
So the rebuild will happen. It would be possible to minimize the places where a rebuild is triggered when moving the source tree, but I have not seen any benefit doing so lately.
Well, it would cause less confusion. It seems that ~90% of rebuilt files are due to the following makefiles where full paths to includes are specified:./drivers/media/video/cx88/Makefile ./drivers/media/video/Makefile ./drivers/media/video/cx25840/Makefile ./drivers/media/video/saa7134/Makefile ./drivers/media/video/em28xx/Makefile
Any objections to fix these?
Regards,
Carl-Daniel
Signature · 1 line
http://www.hailfinger.org/
Quoted 10 lines · Carl-Daniel Hailfinger
Well, it would cause less confusion. It seems that ~90% of rebuilt files are due to the following makefiles where full paths to includes are specified:
./drivers/media/video/cx88/Makefile./drivers/media/video/Makefile./drivers/media/video/cx25840/Makefile./drivers/media/video/saa7134/Makefile./drivers/media/video/em28xx/MakefileAny objections to fix these?
Care to send a path - then I will include it with next kbuild update.
Sam
PATCH 1/1 Fix unneeded rebuilds in drivers/media/video after moving source tree
Quoted 13 lines · Sam Ravnborg
Quoted 9 lines · Carl-Daniel Hailfinger
Well, it would cause less confusion. It seems that ~90% of rebuilt files are due to the following makefiles where full paths to includes are specified:
./drivers/media/video/cx88/Makefile./drivers/media/video/Makefile./drivers/media/video/cx25840/Makefile./drivers/media/video/saa7134/Makefile./drivers/media/video/em28xx/Makefile
Quoted 7 lines
Quoted 3 lines
Any objections to fix these?
Care to send a path - then I will include it with next kbuild update.
This fixes some uneeded rebuilds under drivers/media/video after moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths.
Compile tested, produces byte-identical code to the previous makefiles.
Signature · 56 lines
http://www.hailfinger.org/ --- linux-2.6.16/drivers/media/video/cx25840/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/media/video/cx25840/Makefile 2006-04-04 00:07:01.000000000 +0200 @@ -3,4 +3,4 @@ obj-$(CONFIG_VIDEO_DECODER) += cx25840.o -EXTRA_CFLAGS += -I$(src)/.. +EXTRA_CFLAGS += -Idrivers/media/video --- linux-2.6.16/drivers/media/video/cx88/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/media/video/cx88/Makefile 2006-04-04 00:05:04.000000000 +0200 @@ -8,9 +8,9 @@ obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o -EXTRA_CFLAGS += -I$(src)/.. -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends +EXTRA_CFLAGS += -Idrivers/media/video +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/frontends extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1 extra-cflags-$(CONFIG_DVB_CX22702) += -DHAVE_CX22702=1 --- linux-2.6.16/drivers/media/video/em28xx/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/media/video/em28xx/Makefile 2006-04-04 00:07:40.000000000 +0200 @@ -3,4 +3,4 @@ obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o -EXTRA_CFLAGS += -I$(src)/.. +EXTRA_CFLAGS += -Idrivers/media/video --- linux-2.6.16/drivers/media/video/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/media/video/Makefile 2006-04-04 00:00:19.000000000 +0200 @@ -63,4 +63,4 @@ obj-$(CONFIG_VIDEO_DECODER) += saa7115.o cx25840/ saa7127.o -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core --- linux-2.6.16/drivers/media/video/saa7134/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/media/video/saa7134/Makefile 2006-04-04 00:07:20.000000000 +0200 @@ -11,9 +11,9 @@ obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o -EXTRA_CFLAGS += -I$(src)/.. -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends +EXTRA_CFLAGS += -Idrivers/media/video +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/frontends extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1 extra-cflags-$(CONFIG_DVB_MT352) += -DHAVE_MT352=1
PATCH 1/1 Fix unneeded rebuilds in drivers/net/chelsio after moving source tree
This fixes some uneeded rebuilds under drivers/net/chelsio after moving the source tree. The makefiles used $(TOPDIR) for include paths, which is unnecessary. Changed to use relative paths.
Compile tested, produces byte-identical code to the previous makefiles.
Signature · 13 lines
http://www.hailfinger.org/ --- linux-2.6.16/drivers/net/chelsio/Makefile 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-fixed/drivers/net/chelsio/Makefile 2006-04-04 00:45:21.000000000 +0200 @@ -4,7 +4,7 @@ obj-$(CONFIG_CHELSIO_T1) += cxgb.o -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/chelsio $(DEBUG_FLAGS) +EXTRA_CFLAGS += -Idrivers/net/chelsio $(DEBUG_FLAGS) cxgb-objs := cxgb2.o espi.o pm3393.o sge.o subr.o mv88x201x.o
Sam Ravnborg
AppliedRe: [PATCH] Fix unneeded rebuilds in drivers/media/video after moving source tree
In reply to Carl-Daniel HailfingerQuoted 5 lines
This fixes some uneeded rebuilds under
drivers/media/videoafter moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths.Compile tested, produces byte-identical code to the previous makefiles.
Thanks, applied both.
Did similar changes in cx88 + some ppc code.
Sam
Re: [PATCH] Fix unneeded rebuilds in drivers/media/video after moving source tree
Quoted 9 lines · Sam Ravnborg
Quoted 5 lines
This fixes some uneeded rebuilds under
drivers/media/videoafter moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths.Compile tested, produces byte-identical code to the previous makefiles.
Thanks, applied both.
Did similar changes in bt8xx + some ppc code.
Thanks. Was it intentional to leave the line below in drivers/media/video/bt8xx/Makefile?
EXTRA_CFLAGS += -I$(src)/..
I think it could be replaced with
EXTRA_CFLAGS += -Idrivers/media/video
but I'm not a kbuild expert.
Regards,
Carl-Daniel
Signature · 1 line
http://www.hailfinger.org/
Re: [PATCH] Fix unneeded rebuilds in drivers/media/video after moving source tree
Quoted 11 lines · Carl-Daniel Hailfinger
Thanks. Was it intentional to leave the line below in
drivers/media/video/bt8xx/Makefile?
EXTRA_CFLAGS+= -I$(src)/..I think it could be replaced with
EXTRA_CFLAGS+= -Idrivers/media/videobut I'm not a kbuild expert.
That's a functionality equivalent - yes.
Since it was not a bug-fix I left it as is.
One day I will sweep through all of the kernel Makefiles and get rid of the relative paths. But thats not -rc fodder.
Sam