From owner-freebsd-arch@freebsd.org Thu Sep 28 16:44:27 2017 Return-Path: Delivered-To: freebsd-arch@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 584ADE03680 for ; Thu, 28 Sep 2017 16:44:27 +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 9CB956578E for ; Thu, 28 Sep 2017 16:44:26 +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 TAA28131; Thu, 28 Sep 2017 19:44:19 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dxbv8-000F0V-Ub; Thu, 28 Sep 2017 19:44:18 +0300 Subject: Re: lua in zfs To: Warner Losh Cc: "freebsd-arch@freebsd.org" References: From: Andriy Gapon Message-ID: <64f6d438-e985-9262-2b1d-1e4b017b7691@FreeBSD.org> Date: Thu, 28 Sep 2017 19:42:57 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2017 16:44:27 -0000 On 28/09/2017 18:40, Warner Losh wrote: > > > On Thu, Sep 28, 2017 at 9:16 AM, Andriy Gapon > wrote: > > On 28/09/2017 16:13, Warner Losh wrote: > > Which version? Where in the tree? Can this be disabled? > > It's lua 5.2.4 at the moment.  Its source code will reside in > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua.  At run-time it will be in > zfs.ko or in kernel if it's built with ZFS option.  For time being, it's not > possible to turn it off individually, but if you don't include ZFS or any CDDL > licensed code at all, then you won't have Lua too.  But I think that it should > be possible to add a new knob specifically to compile ZFS without Lua, if > anybody wants it. > > > OK. Any chance you could put it in sys/contrib/lua instead? The same place that > the boot loader lua project has it? The lua boot loader project is using 5.3.0 > it seems, is there any reason you couldn't use that instead? I don't really know. I am just importing an upstream ZFS commit, because without it we are getting more and more out of sync. I don't know if the ZFS Lua has any special customizations, etc. I don't want to spend a lot of time on investigating that and fighting with any possible quirks. If the consolidation of Lua-s is possible and practical, then I hope that someone will do it. Of course, there is another option which is not to import any Lua at all right now and to stub out all calls into Lua-dependent routines with ENOTSUP. In that case we will have plenty of time to work on importing a perfect Lua. On the other hand, switching from one Lua to another and doing svn rm is not hard either. > I've been working on this in the background and was hoping to get it in before 12. > > > On Thu, Sep 28, 2017 at 5:40 AM, Andriy Gapon > wrote: > > > >> > >> I am going to import the upstream ZFS Channel Programs change that adds Lua > >> interpreter to ZFS kernel code.  In addition to pure Lua (no libraries) it > >> also > >> has a number of functions to interact with ZFS.  No general purpose kernel > >> access. -- Andriy Gapon