Re: Multi-Threaded make

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/29/2012 04:24 AM, Gabriel VLASIU wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 28 Nov 2012, JD wrote:

Date: Wed, 28 Nov 2012 15:37:54 -0700
From: JD <jd1008@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
User-Agent: Mozilla/5.0 (X11; Linux i686;
     rv:15.0) Gecko/20120911 Thunderbird/15.0.1
X-Spam-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,
     DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,
     RP_MATCHES_RCVD,SPF_PASS,T_DKIM_INVALID autolearn=ham version=3.3.1
Subject: Multi-Threaded make

While building the kernel from source RPM, I run
the command ps -ef | grep make in another terminal,
and I do see that 4 make processes are running, with
each one building objects for a different kernel source
directory.

However, something else seems to be single threaded
which is causing the huge delay in finishing kernel build.

I found that when I run top to see the upper-most
cpu consumers, I see only one cc1 process at the top.

So I ran ps again to see how many cc1 processes there
are.

Always - just one cc1 process.

I would expect to see anywhere from 1 to 4 cc1 processes
at a time. But that is not the case.

What is forcing only a single instance of cc1 at a time?

I hope the devs can have a look at either the compiler
tools or the make util.
make is invoked from kernel.spec file like this:

make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1

where %{?_smp_mflags} is:
1 core : -j 1
2 cores: -j 2
4 cores: -j 4
...

You can see multiple make proccesses. But only 2 (in my case) do the real
work:
user1  22073 12810  0 13:13 pts/0    00:00:00 make -f scripts/Makefile.build obj=fs
user1  24474 22073  0 13:15 pts/0    00:00:00 make -f scripts/Makefile.build obj=fs/cifs
user1  24530 22073  0 13:15 pts/0    00:00:00 make -f scripts/Makefile.build obj=fs/coda

Make proccess with pid 22073 only invoke two addititonal make proccesses
which call cc1:
user1  3617  3616  0 13:21 pts/0    00:00:00 /usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -quiet -nostdinc ....
user1  3627  3626  0 13:21 pts/0    00:00:00 /usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -quiet -nostdinc ...

One cc1 -> one core or you called make with -j 1.


Gabriel

That does not make sense.
I have a unicore!! An old Athlon64 3700+,
and yet ps -ef shows up to 4 makes running at a time.
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux