From owner-svn-src-head@freebsd.org Fri Jul 6 22:00:43 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 A97C310324AD; Fri, 6 Jul 2018 22:00:43 +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 31B1C717F3; Fri, 6 Jul 2018 22:00:42 +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 w66M0e3M054313; Fri, 6 Jul 2018 15:00:40 -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 w66M0ecL054312; Fri, 6 Jul 2018 15:00:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807062200.w66M0ecL054312@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336025 - in head/sys: amd64/include i386/include In-Reply-To: To: Oliver Pinter Date: Fri, 6 Jul 2018 15:00:40 -0700 (PDT) CC: "rgrimes@freebsd.org" , Hans Petter Selasky , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Fri, 06 Jul 2018 22:00:43 -0000 > On Friday, July 6, 2018, Rodney W. Grimes > wrote: > > > > Author: hselasky > > > Date: Fri Jul 6 10:13:42 2018 > > > New Revision: 336025 > > > URL: https://svnweb.freebsd.org/changeset/base/336025 > > > > > > Log: > > > Make sure kernel modules built by default are portable between UP and > > > SMP systems by extending defined(SMP) to include defined(KLD_MODULE). > > > > > > This is a regression issue after r335873 . > > > > > > Discussed with: mmacy@ > > > Sponsored by: Mellanox Technologies > > > > Though this fixes the issue, it also means that now when > > anyone intentionally builds a UP kernel with modules > > they are getting SMP support in the modules and I am > > not sure they would want that. I know I don't. > > > > > On linux case the lock instructions are runtime patchable. They have so > called altinstruction facility, which able to detect specific conditions - > in this case up vs smp - and in up case the locks are replaced with simple > nops or one multi word nop when the instruction longer than 1 byte. Thank you for this information, which lends credibilty to the fact that these LOCK instructions may not be as cheap as some think they are, as why would the Linux people bother with run time patching code if infact it was that cheap. I would not want to take that approach though. ... commit diff text deleted ... -- Rod Grimes rgrimes@freebsd.org