From owner-svn-src-head@freebsd.org Sun Jul 8 15:05:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27896102DBE0 for ; Sun, 8 Jul 2018 15:05:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89016781FF for ; Sun, 8 Jul 2018 15:05:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w68F4v49061874; Sun, 8 Jul 2018 08:04:57 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w68F4tas061873; Sun, 8 Jul 2018 08:04:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807081504.w68F4tas061873@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r335916 - head/sys/conf In-Reply-To: To: Warner Losh Date: Sun, 8 Jul 2018 08:04:55 -0700 (PDT) CC: "Rodney W. Grimes" , Eugene Grosbein , Andrew Gallatin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2018 15:05:04 -0000 > On Sat, Jul 7, 2018 at 7:06 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > On Sat, Jul 7, 2018, 5:40 PM Eugene Grosbein wrote: > > > > > > > 08.07.2018 4:38, Warner Losh wrote: > > > > > > > > > On Sat, Jul 7, 2018, 4:14 PM Eugene Grosbein > > > > wrote: > > > > > > > > > > 07.07.2018 22:02, Andrew Gallatin wrote: > > > > > > > > > > > One thing that was tangentially brought up is that the ability > > > > > > to compile out-of-tree modules requires keeping the > > kernel-headers > > > > > > around. So we may need to identify all the headers that a > > module > > > > might > > > > > > need, and install them in /boot/$KERNEL/sys or some-such. This > > > > would > > > > > > be needed if, for example, we wanted to install a new Nvidia or > > > > Virtual > > > > > > Box module and have it work for older installed kernel > > versions too > > > > > > (eg, across ABI breaking changes in -current). > > > > > > > > > > We already have all headers in /usr/include, don't we? > > > > > > > > > > > > > > > Not really. We have a subset of the kernel headers that might not > > match > > > > the running kernel, nor be enough to build modules. > > > > > > > > They should match running kernel definitely as we do not support not > > > > syncronized kernel/world > > > > and installworld populates /usr/include. > > > > > > > > > > Nice theory. Lots and lots of people run this way. And it has worked > > well, > > > so long as the kernel is newer... so, no, they don't have to match. > > > > At some point I had an evolution of "make includes" that would work > > without the other parts of src being present (ie, only sys) so that > > you could update /usr/include with the kernel headers if you reved > > your kernel sources. > > > > Not sure how hard this would be to reimplement, but basically skip over > > missing parts of the src tree with a message (echo) that it could not > > find that particular set of sources was how it worked. > > > I really don't like this idea. It assumes The Kernel and The Includes. + match? > However, that's not quite right. For people running releases, it's near > enough, but for developers it's not. I have, in the past, installed a > weekly kernel into /boot/kernel.$DATE and kept a constant userland. I did > this to catch performance regressions by being able to reboot quickly > between then. At any given time, we'd not have the right headers with this > scheme. Certainly not good enough to compile a module against the currently > booted kernel. This addition is for the users, not for the developers, developers are in there own world and far more capable of managing the complex environment of multiple kernels and includes. I strongly encourage rm -rf /usr/include/ && make includes Users typically only run the latest sys/kernel tree and this only need to move forward with /usr/include and this works well for that. > > I've started to like the idea of keeping module sources for 3rd party > modules /usr/local/ and using that to rebuild the module for a > specific kernel. I think we are all on board with that idea. > If we were to install the kernel includes / opt*.h files > also into /boot/$KERNEL/include somehow, then 3rd party modules could be > rebuilt at any time and we'd always have access to the builddir files that > matter... Something to consider... I think I read that Linux did this to > help prevent module breakage when new kernels are used... It may be time > to ditch /boot/modules entirely in favor of a scheme like this. First order to me would be to implement "kernelincludes" as a top level target, that would populate ${DESTDIR}/some/mumble. This would be a fairly general use function that could be abused to implement the above. > > > /usr/include is never, ever used to build the kernel (except for things > > > like aicasm). > > > > Is not /usr/include really the kernel/userland interface, > > not the kernel/kernel interface? > > > > Yea, and more. It's a bit of hodge-podge, but on the whole, that's not an > inaccurate characterization. Especially the bit about it not being the > intra-kernel interface. -- Rod Grimes rgrimes@freebsd.org