From owner-freebsd-fs@freebsd.org Thu Mar 23 21:48:52 2017 Return-Path: Delivered-To: freebsd-fs@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 7DFD4CA1487 for ; Thu, 23 Mar 2017 21:48:52 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EBF91992 for ; Thu, 23 Mar 2017 21:48:52 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id v203so4532280wmg.0 for ; Thu, 23 Mar 2017 14:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=neufaQ3u1RaE0rNVtWgG8dVZXXcAT+gte9zfzvwOlas=; b=MHYaZ7pRmUdF1IHa6wgf7d5H0ZmFxMYOvxalmYc9bVsBnILi0mgZMD1iiShCx6egAr sALonqnMQJzFWQM0zTfEug8JHyERq9CiSstNc+1OeIs9oXvse64RZL8UX81aAeQ7daxL 2MwQPm3mMTVOMafb3fgsvClxuskCl2Mw/8l/cFis1QGuxoAJgkkyI3sErqLGiqx7gIGm 3BzpyqBpBd+9GUFzbrlmosUP9Cqkx9+A+o2SA48EaWPQPY3yjVh9G+r1CQ4KENzPFOzl uwiEsr++75Ia3yfmIHycfVYMNaWGo3HxuQFYXI4u/jhArHyhZ+zj2n/0TEegGtgh4+1R ogvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=neufaQ3u1RaE0rNVtWgG8dVZXXcAT+gte9zfzvwOlas=; b=nugO3KmlGsVYkFjw5TLI0oQgfJpjMWEKi/ak0pJPjkfh0985nWdnshonJuqpGzbTli l5Ksd+NPEuN1VcUW+hiPJCHgzBRtuKTSEiKlIw6J67JXPvX7wyTYE39iBNwbm+9Di2qZ mQ9M4TbgG5uFDGBLW/S92g1Od5bJUKWZGtdPOLMswl1iyLdNWTX8/fHSZzo4fDK5h6/Z N4e2thvZYw8hJpcfTI/+CsMJotf9NwSosnFP/vL2yZSAdQQUNbxAV06uXxpo3GN+0S/P 7ryBu0PmRTgTHPyXIcNxKtMs6oOM8ji5WMnw7YYq+pTyo+BIyQ/UC4U/W5b8EeIKOr1V a5rQ== X-Gm-Message-State: AFeK/H2SgCK1whgp78vuiRoolT8ZzHvvlZlekzbhSLu67mDy1XOoDlXRDK/aVsN/6a2ZBA== X-Received: by 10.28.20.70 with SMTP id 67mr15672442wmu.86.1490305730005; Thu, 23 Mar 2017 14:48:50 -0700 (PDT) Received: from ben-1.home (LFbn-1-7159-4.w90-116.abo.wanadoo.fr. [90.116.90.4]) by smtp.gmail.com with ESMTPSA id w130sm368074wmg.0.2017.03.23.14.48.49 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Mar 2017 14:48:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: How to compile ZFS only ? From: Ben RUBSON In-Reply-To: <04ca6dc2-575b-dbc2-23aa-cb090049e482@multiplay.co.uk> Date: Thu, 23 Mar 2017 22:48:48 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9C904469-E0AA-4110-99E5-6BB9049BAD94@gmail.com> References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> <063443FC-BD04-4CD1-911F-F62918D8B390@gmail.com> <04ca6dc2-575b-dbc2-23aa-cb090049e482@multiplay.co.uk> To: Freebsd fs X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 21:48:52 -0000 Yes I also build with -j24 on these servers, dual E5 too :) Goal was to keep default kernel (which is OK for my needs), and only = modify/recompile zfs module. I felt I was doing something "huge" / "enormous" recompiling whole = kernel whereas I just need to modify one module. Ben > On 23 Mar 2017, at 22:41, Steven Hartland = wrote: >=20 > When building are you building with -jXX where XX is the number of = cores in your machine? >=20 > If not then definitely do that on a dual E5 (24 cores) with our cut = down kernel config (excludes devices / modules we never use) a full = kernel build takes under 60 seconds. >=20 > An example: > make buildkernel KERNCONF=3DMULTIPLAY -j24 >=20 > Regards > Steve >=20 > On 23/03/2017 19:22, Ben RUBSON wrote: >> I'm not sure other modules are missing : my server correctly starts, = I then only overwrite ZFS module (/boot/kernel/zfs.ko), I think it = should then work. >> But server hangs during startup, certainly because module compiled = directly using make is different from the one built with make = buildkernel (which works). >> As says Xin below, some options from sys/*/conf/GENERIC may not be = taken into account with the quick make method... >>=20 >> I'll try to give the faulty module a try on a non-zfs root machine. >>=20 >> The -DNO_CLEAN method is interesting if src tree has not been cleaned = before :) >> (I always do a make clean to leave the tree cleaned ^^) >>=20 >> So sounds like there is no solution but trying to speed-up a whole = kernel build. >>=20 >> Thank you ! >>=20 >> Ben >>=20 >>> On 23 Mar 2017, at 00:51, Steven Hartland = wrote: >>>=20 >>> In addition to the main zfs module there are also dependency modules = which are required. >>>=20 >>> If you're able to test loading the module on a non-zfs root machine = by manually loading it, it should detail any issues in = /var/log/messages. >>>=20 >>> That said the method listed by Xin is the quickest and easiest = solution. >>>=20 >>> On Wed, 22 Mar 2017 at 22:43, Xin LI > wrote: >>> Why not just -DNO_CLEAN=3D with 'make buildkernel'? >>>=20 >>> But to answer your question, 'make buildkernel' will take e.g. >>> 'KERNCONF' aka kernel build configuration into account, while if you >>> do make directly, it's not (and sometimes build options in the = kernel >>> build configuration, like WITNESS, etc., have material impact to = data >>> structure layouts). >>>=20 >>> On Wed, Mar 22, 2017 at 2:47 PM, Ben RUBSON > wrote: >>>> Thank you for your answer Steven. >>>> Unfortunately it did not help, same behaviour : >>>> Module with you method has the same smaller size, 2323000 bytes vs = 2500544. >>>> (I then did not try to boot with it) >>>>=20 >>>> Ben >>>>=20 >>>>> On 22 Mar 2017, at 22:09, Steven Hartland > wrote: >>>>>=20 >>>>> cd /usr/src >>>>> make buildenv >>>>> cd sys/modules/zfs/ >>>>> make >>>>> make install >>>>>=20 >>>>> On 22/03/2017 20:57, Ben RUBSON wrote: >>>>>> Hi, >>>>>>=20 >>>>>> I'm trying to rebuild ZFS (with some patches) without having to = rebuild whole kernel. >>>>>>=20 >>>>>> What I then try : >>>>>> # cd /usr/src/sys/modules/zfs/ >>>>>> # make >>>>>> # cp zfs.ko /boot/kernel/ #to replace current zfs module >>>>>>=20 >>>>>> But then server does not reboot properly (/ is on ZFS). >>>>>>=20 >>>>>> If I do : >>>>>> # cd /usr/src/ >>>>>> # make buildkernel KERNCONF=3DGENERIC >>>>>> # cp = /usr/obj/usr/src/sys/GENERIC/modules/usr/src/sys/modules/zfs/zfs.ko = /boot/kernel/ >>>>>>=20 >>>>>> Then server correctly reboot. >>>>>>=20 >>>>>> I clearly see that zfs.ko in method 1 is slightly smaller that in = method 2. >>>>>>=20 >>>>>> Am I missing something ? (of course yes, but what ? :) >>>>>>=20 >>>>>> Many thanks ! >>>>>>=20 >>>>>> Best regards, >>>>>>=20 >>>>>> Ben >>>>>>=20 >>>>>> _______________________________________________ >>>>>> freebsd-fs@freebsd.org mailing = list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs = >>>>>> To unsubscribe, send any mail to = "freebsd-fs-unsubscribe@freebsd.org = " >>>>> _______________________________________________ >>>>> freebsd-fs@freebsd.org mailing = list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs = >>>>> To unsubscribe, send any mail to = "freebsd-fs-unsubscribe@freebsd.org = " >>>> _______________________________________________ >>>> freebsd-fs@freebsd.org mailing list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs = >>>> To unsubscribe, send any mail to = "freebsd-fs-unsubscribe@freebsd.org = " >>> _______________________________________________ >>> freebsd-fs@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs = >>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org = " >> _______________________________________________ >> freebsd-fs@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-fs >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >=20 > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"