linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question re: building with cp -l (hard linked sources)
@ 2022-11-20  5:58 Mirsad Goran Todorovac
  2022-11-20 12:42 ` Bagas Sanjaya
  0 siblings, 1 reply; 2+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-20  5:58 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: LKML

Hi, Mr. Bagas,

I am in process of bisecting another bug. Right now I take about 1h30m to build both
the good and bad version of a kernel in bisection.

It helped a great deal to do the following:

# time rm -rf linux_stable_build
# time cp -rp -l linux_stable linux_stable_build
# time diff -ur linux_stable linux_stable_build
# cd linux_stable_build
# rm .config
# cp /boot/config-EXAMPLE .config
# time nice make CC="ccache gcc" KBUILD_BUILD_TIMESTAMP="" -j20 bindeb-pkg |& tee ../error-${VER}.log

I've been doing the good and bad bisect build in the same directory, but is seems to me that
ccache then doesn't realise it compiles the same source twice?

I am not certai of the reliability of a build in a directory with hard links to the original local git
repo copy? How does it handle git checkouts and git bisect resets? Is it supported?

I am asking because I haven't found an answer in any available man pages, and the build and git checkout
process is rather obscure.

It seems to me that build in directory with hard link instead of copying is much faster, and I could
do simultaneous bad and good bisect build, for only one source file has to be fetched and loaded from
the disk into the cache and memory.

However, I cannot test that while bisecting, for it might interfere with some other fault in the tested
kernel.

Is it supported to bisection build in the same directory where the source is? And then do a make mrproper?

I don't know how git and ccache interoperate?

Any advice?

The current procedure works, but it is not time efficient (15 steps might take 30 hours).

Thank you,
Mirsad

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
-- 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question re: building with cp -l (hard linked sources)
  2022-11-20  5:58 Question re: building with cp -l (hard linked sources) Mirsad Goran Todorovac
@ 2022-11-20 12:42 ` Bagas Sanjaya
  0 siblings, 0 replies; 2+ messages in thread
From: Bagas Sanjaya @ 2022-11-20 12:42 UTC (permalink / raw)
  To: Mirsad Goran Todorovac; +Cc: LKML

On 11/20/22 12:58, Mirsad Goran Todorovac wrote:
> Hi, Mr. Bagas,
> 
> I am in process of bisecting another bug. Right now I take about 1h30m to build both
> the good and bad version of a kernel in bisection.
> 
> It helped a great deal to do the following:
> 
> # time rm -rf linux_stable_build
> # time cp -rp -l linux_stable linux_stable_build
> # time diff -ur linux_stable linux_stable_build
> # cd linux_stable_build
> # rm .config
> # cp /boot/config-EXAMPLE .config
> # time nice make CC="ccache gcc" KBUILD_BUILD_TIMESTAMP="" -j20 bindeb-pkg |& tee ../error-${VER}.log
> 
> I've been doing the good and bad bisect build in the same directory, but is seems to me that
> ccache then doesn't realise it compiles the same source twice?
> 
> I am not certai of the reliability of a build in a directory with hard links to the original local git
> repo copy? How does it handle git checkouts and git bisect resets? Is it supported?
> 
> I am asking because I haven't found an answer in any available man pages, and the build and git checkout
> process is rather obscure.
> 
> It seems to me that build in directory with hard link instead of copying is much faster, and I could
> do simultaneous bad and good bisect build, for only one source file has to be fetched and loaded from
> the disk into the cache and memory.
> 
> However, I cannot test that while bisecting, for it might interfere with some other fault in the tested
> kernel.
> 
> Is it supported to bisection build in the same directory where the source is? And then do a make mrproper?
> 
> I don't know how git and ccache interoperate?
> 
> Any advice?
> 
> The current procedure works, but it is not time efficient (15 steps might take 30 hours).
> 

You may want to see ccache(1), especially "COMPILING IN DIFFERENT DIRECTORIES"
section.

-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-20 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20  5:58 Question re: building with cp -l (hard linked sources) Mirsad Goran Todorovac
2022-11-20 12:42 ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).