From owner-freebsd-amd64@freebsd.org Wed Aug 1 07:57:16 2018 Return-Path: Delivered-To: freebsd-amd64@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 1299A105CF57; Wed, 1 Aug 2018 07:57:16 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86430871C4; Wed, 1 Aug 2018 07:57:15 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w717v4hI067904 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Aug 2018 10:57:07 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w717v4hI067904 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w717v4iV067903; Wed, 1 Aug 2018 10:57:04 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Wed, 1 Aug 2018 10:57:04 +0300 From: Konstantin Belousov To: Mark Millard Cc: mmacy@FreeBSD.org, svn-src-head@freebsd.org, freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: svn commit: r335873 - in head: . sys/amd64/amd64 sys/amd64/include sys/conf sys/i386/i386 sys/i386/include sys/sys sys/vm Message-ID: <20180801075704.GS40119@kib.kiev.ua> References: <226713AF-FC51-4A44-93E1-8264B1BD2C8A@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <226713AF-FC51-4A44-93E1-8264B1BD2C8A@yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-Mailman-Approved-At: Wed, 01 Aug 2018 11:28:30 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 07:57:16 -0000 On Tue, Jul 31, 2018 at 06:46:31PM -0700, Mark Millard via freebsd-amd64 wrote: > > Author: mmacy > > Date: Mon Jul 2 19:48:38 2018 > > New Revision: 335873 > > URL: > > https://svnweb.freebsd.org/changeset/base/335873 > > > > > > Log: > > inline atomics and allow tied modules to inline locks > > > > - inline atomics in modules on i386 and amd64 (they were always > > inline on other arches) > > - allow modules to opt in to inlining locks by specifying > > MODULE_TIED=1 in the makefile > > I recently found the following about ABI incompatibilities > between clang and gcc relative to C11 language based > atomics: > > https://bugs.llvm.org/show_bug.cgi?id=26462 > > 26462 ??? GCC/clang C11 _Atomic incompatibility > > > So are there implications about building the kernel > vs. modules that overall mix the toolchains once > modules are loaded? Do the toolchains need to match, > at least for amd64 and i386 TARGET_ARCH 's? This is irrelevant since kernel does not use C11 atomics, we roll our own version, which tries to follow C11 model. Lack of the ABI for atomics is one of the reason to not use compiler C11 atomics in kernel and C runtime.