作者operationcow (香蕉公车)
看板FreeBSD
标题[问题] 请问可以用 make -j4 来编译 kernel 吗??
时间Tue Oct 6 16:16:08 2009
小弟我最近在学习编译 world & kernel
在编译 world 的时後, 在官网的 handbook
http://www.freebsd.org/doc/zh_TW.Big5/books/handbook/makeworld.html
看到这段
It is possible to specify a -j option to make which will cause it
to spawn several simultaneous processes. This is most useful on
multi-CPU machines. However, since much of the compiling process is
IO bound rather than CPU bound it is also useful on single CPU machines.
On a typical single-CPU machine you would run:
# make -j4 buildworld
make(1) will then have up to 4 processes running at any one time.
Empirical evidence posted to the mailing lists shows this generally
gives the best performance benefit.
小弟看到这边有两个疑问
(1) 为甚麽 compiling 这个动作是 io bound, 将一个语言编译成另一个语
言应该需要大量的运算, 不是 cpu bound 吗?
(2) 因为在文件後面编译 kernel 时所下的指令是 make buildkernel
KERNCONF=MYKERNEL, 请问这边可以改用 make -j4 buildkernel
KERNCONF=MYKERNEL 吗?? 会因此而使得编译时间变短吗??
以上的问题爬文找不到解答
在这边先感谢大家的回答 <(__)>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 219.70.167.69