From owner-freebsd-current@FreeBSD.ORG Wed Dec 5 17:10:55 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8CC411D; Wed, 5 Dec 2012 17:10:55 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5558B8FC12; Wed, 5 Dec 2012 17:10:54 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so6702637obc.13 for ; Wed, 05 Dec 2012 09:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XYAPddngr9L7fJ9VydupsjPLhbU1hX7bwVFule992OQ=; b=LNBm3PrJ48NIH1ZuVRPSnlC2IylHKfVpkobZqUghiLH8xUjUpgMcz5hmvRo5rg5Ki7 19YXppLJn6JO0s9X+7TbNYQj2PU0NBflCE4vEV67KGweiSitx4gfw8BVRzK5Qj6DOUDd XMu3s+OLYKQ8Be426AbdetH68YDwyLu7huK1666oaMpNUdMEhActwYsj6xtNQST9yK7U fGTfQEgwNANIfVAyersLtV4NnFGE6DPoVVqv3AcISQV11IVPE1a8q/EBgAwQzWdXa34X ca6Yn7RtAJ0IiC0s6hjqmv1WJDV3YwJEtcg33VHk3tUduvAmv07wMgzLSRKP1uURRmv+ NM+w== MIME-Version: 1.0 Received: by 10.60.21.167 with SMTP id w7mr14303488oee.18.1354727453242; Wed, 05 Dec 2012 09:10:53 -0800 (PST) Received: by 10.76.143.33 with HTTP; Wed, 5 Dec 2012 09:10:53 -0800 (PST) In-Reply-To: <201212051142.18361.jhb@freebsd.org> References: <5083D84E.50903@freebsd.org> <201212041052.51476.jhb@freebsd.org> <201212051142.18361.jhb@freebsd.org> Date: Wed, 5 Dec 2012 09:10:53 -0800 Message-ID: Subject: Re: kernel module parallel build? From: Garrett Cooper To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-hackers@freebsd.org" , Andre Oppermann , FreeBSD Current , Ryan Stone X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2012 17:10:55 -0000 On Wed, Dec 5, 2012 at 8:42 AM, John Baldwin wrote: > On Tuesday, December 04, 2012 2:41:32 pm Ryan Stone wrote: >> On Tue, Dec 4, 2012 at 10:52 AM, John Baldwin wrote: >> >> > Hmm, I certainly see the module directories being built in parallel. Some >> > of >> > the make jobs may not be as obvious since links are silent (no output >> > unless >> > there is an error). >> > >> > >> This is definitely not the behaviour that I see trying to build any version >> of FreeBSD. I see the same behaviour as Andre: the depend and all targets >> both iterate through the module directories sequentially. It never builds >> two module subdirectories concurrently. > > Hmm, I think I was confused by seeing kernel builds intermingle with the > associated modules. sys/modules/Makefile uses bsd.subdir.mk. I think I see > similar things in world builds where I will see parallel builds of bin vs sbin > vs usr.bin vs usr.sbin, but within each of those directories the builds go > sequentially. I think you would need to change bsd.subdir.mk if you want to > fix this. Correct: 45 @${_+_}for entry in ${SUBDIR}; do \ ^^^^^^^^^^^^^^^^^^^ This is where things get serialized ^^^^^^^^^^^^^^^^^^^^^^^^ 46 if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ Same thing applies for buildkernel building modules because it just wraps around bsd.subdir.mk in sys/modules/Makefile . Enhancing it to be parallel would introduce potential races. Some of the work sjg's doing with meta make will make this unnecessary from a buildworld perspective, but I'm not sure about buildkernel. Thanks, -Garrett