From owner-svn-src-all@freebsd.org Fri Dec 4 17:51:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93D3A4103C; Fri, 4 Dec 2015 17:51:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8427D1CD5; Fri, 4 Dec 2015 17:51:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 08B6AB97D; Fri, 4 Dec 2015 12:51:17 -0500 (EST) From: John Baldwin To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291744 - in head/sys: conf modules Date: Fri, 04 Dec 2015 09:50:17 -0800 Message-ID: <2092924.RITcBJdNZd@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512040427.tB44RL8S067654@repo.freebsd.org> References: <201512040427.tB44RL8S067654@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 04 Dec 2015 12:51:17 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:51:18 -0000 On Friday, December 04, 2015 04:27:21 AM Bryan Drewery wrote: > Author: bdrewery > Date: Fri Dec 4 04:27:21 2015 > New Revision: 291744 > URL: https://svnweb.freebsd.org/changeset/base/291744 > > Log: > Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/conf/kmod.mk > head/sys/modules/Makefile > > Modified: head/sys/conf/kmod.mk > ============================================================================== > --- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743) > +++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744) > @@ -370,8 +370,10 @@ vnode_if_typedef.h: > .endif > > # Build _if.[ch] from _if.m, and clean them when we're done. > +# This is duplicated in sys/modules/Makefile. > .if !defined(__MPATH) > __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m > +.export __MPATH > .endif > _MFILES=${__MPATH:T:O} > _MPATH=${__MPATH:H:O:u} It's also duplicated in sys/conf/kern.pre.mk which uses this to export it: # Calculate path for .m files early, if needed. .if !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m .endif .... MKMODULESENV+= __MPATH="${__MPATH}" So, the comment should probably reference the two other places that will pass an __MPATH down (kern.pre.mk and sys/modules/Makefile). Note though that you should only be seeing this if you are building modules outside of a kernel build (e.g. MODULES_WITH_WORLD). modules built as part of a kernel build will inherit __MPATH from kern.pre.mk. When I ran a buildkernel with truss -af and grepp'd for all the execve's of /usr/bin/find I only found about 6 for a GENERIC kernel, so I believe that the kern.pre.mk bits were working already. -- John Baldwin