From owner-freebsd-stable@freebsd.org Wed Feb 22 21:58:35 2017 Return-Path: Delivered-To: freebsd-stable@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 69A2FCEA73F; Wed, 22 Feb 2017 21:58:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 52F2214A8; Wed, 22 Feb 2017 21:58:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA28153; Wed, 22 Feb 2017 23:58:31 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cgevf-000OBM-Na; Wed, 22 Feb 2017 23:58:31 +0200 Subject: Re: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization? To: Lev Serebryakov , freebsd-stable@FreeBSD.org, freebsd-fs@FreeBSD.org References: <492944119.20170222234742@serebryakov.spb.ru> From: Andriy Gapon Message-ID: <85ad9000-b585-35e7-ccf1-6601ac4c062c@FreeBSD.org> Date: Wed, 22 Feb 2017 23:57:35 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <492944119.20170222234742@serebryakov.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2017 21:58:35 -0000 On 22/02/2017 22:47, Lev Serebryakov wrote: > Hello Freebsd-stable, > > Now if you build zfs.ko with -O0 it panics on boot. I have seen a problem that matches your description, but not necessarily the same one: https://lists.freebsd.org/pipermail/freebsd-hackers/2016-July/049768.html > If you use default optimization level, a lot of fbt DTreace probes are > missing. You can try several different (orthogonal, even) approaches: - compile ZFS into the kernel - use higher optimization level, but add -fno-optimize-sibling-calls to CLFAGS - pkg install amd64-xtoolchain-gcc and then use CROSS_TOOLCHAIN=amd64-gcc command line argument for buildkernel -- Andriy Gapon