From owner-freebsd-arch@freebsd.org Mon Sep 25 14:28:09 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 12ED3E1717C for ; Mon, 25 Sep 2017 14:28:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 ECF1080188 for ; Mon, 25 Sep 2017 14:28:08 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bdf376b9-a1fd-11e7-a937-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id bdf376b9-a1fd-11e7-a937-4f970e858fdb; Mon, 25 Sep 2017 14:28:04 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8PES1nE003398 for ; Mon, 25 Sep 2017 08:28:01 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1506349681.73082.124.camel@freebsd.org> Subject: rc.d scripts and rc.conf variable defaults From: Ian Lepore To: "freebsd-arch@FreeBSD.org" Date: Mon, 25 Sep 2017 08:28:01 -0600 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 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: Mon, 25 Sep 2017 14:28:09 -0000 We have about 165 scripts in etc/rc.d.  22 of them handle their own default values for configuration variables using ${var:=default} or ${var:-default}.  Presumably all the others rely on defaults/rc.conf providing the default values. Is there a standard, written or not, covering this? rc.conf(5) says that defaults/rc.conf is the thing that includes your /etc/rc.conf, and that would certainly guarantee that the system- provided defaults are in place, but the current implementation doesn't actually work that way.  rc.subr is currently forgiving of a missing defaults file. I'd prefer that the system rc.d scripts relied on defaults/rc.conf alone and individual rc.d scripts not be cluttered up with :- syntax.  While rc.conf(5) strongly implies the file is required, it doesn't exactly say so.  Should it? -- Ian From owner-freebsd-arch@freebsd.org Mon Sep 25 15:18:59 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 37E5FE18559 for ; Mon, 25 Sep 2017 15:18:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::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 F066D82802 for ; Mon, 25 Sep 2017 15:18:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id m103so10025667iod.13 for ; Mon, 25 Sep 2017 08:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=EKzR+axI2hzFvyYBkdSXgUzS+GFZYdZ1F5FassZVCc8=; b=yLpM8eah8yh6y/tuagOEimFhp5x+jDOsGKugIMjoyzTRru+JNmnneU2Mkp2+KyNGQX mRS8+ULrlXEC2vlUnDs5TIfb/Dn1nHCXUKJ4XrFpg6VuIQklbTNXbwStlCXLlAjL8f+I TEVNX4NZF7+jttp3/VqTneQXEfKYZSbDP5RguvhmvhOsE1W/lWl/7CXIfHCxIqP50MlL 3O58bL9EtoASbGhjizeHfTRiJRszjJ/TujhPwY44odEnBg0nROMbCksFd6byQv4Dp8rg ut0yX7XNWDa7hHYGemNrLK2qKnLbhtEmMPz5cxGc63GOLaFXEJIum1YjPUbrB+WTwSit jRBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=EKzR+axI2hzFvyYBkdSXgUzS+GFZYdZ1F5FassZVCc8=; b=GvUahy1U7itnqXaIuGnzYwGjVsMVWX+Dge64r8T43mAhwrsP+1O8801FajbZV2PdO7 Ro9wG1mbKpgkwvdhup39TtLG4KfCoytciJt0OBYrLgKXUr3AdQo2GSxAyiJ8nFFTwnpv JT9vsFXYy/eIOZnx+BJu4/XGf8/qepKTbiqYYfZ2RniWHcZvuA/VsMvgIEJ/mhhUc1vH V4uh9UavMtj8MwxX30Gm4QXlzmLHVkBC9eN7T4jMkWpysM1aSPuKtn4U5MM0rOPMsyS6 RAG8pIIWUIVtNAPtOEvUSELDW55DH2lgRqITqrGUdaxZaLcaDZ8DTXr5yN84ExVKwgKJ WkmA== X-Gm-Message-State: AHPjjUhr8SjXFePOTkhh60rNJJN0ghMs3SWLpK2BHQ4zYRd5VXgAs9lH D9kMlbiXmUTQst7nzaFSifqbJ1cTLJNLoCK4i3IAdA== X-Google-Smtp-Source: AOwi7QBPMh/we5N5IonkF7q0ps5n0D2j+qa2zsYPTyc3DJBd2+InnQgYuzcizNgjlXxKTggXfy3M2PL0QH8MA/OBNPM= X-Received: by 10.107.7.161 with SMTP id g33mr9464413ioi.169.1506352738186; Mon, 25 Sep 2017 08:18:58 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Mon, 25 Sep 2017 08:18:57 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:78f4:43db:b652:bfa7] In-Reply-To: <1506349681.73082.124.camel@freebsd.org> References: <1506349681.73082.124.camel@freebsd.org> From: Warner Losh Date: Mon, 25 Sep 2017 09:18:57 -0600 X-Google-Sender-Auth: VN0Lb1KJRJIkk-G3i6e_SqSVDsY Message-ID: Subject: Re: rc.d scripts and rc.conf variable defaults To: Ian Lepore Cc: "freebsd-arch@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Mon, 25 Sep 2017 15:18:59 -0000 On Mon, Sep 25, 2017 at 8:28 AM, Ian Lepore wrote: > We have about 165 scripts in etc/rc.d. 22 of them handle their own > default values for configuration variables using ${var:=default} or > ${var:-default}. Presumably all the others rely on defaults/rc.conf > providing the default values. > > Is there a standard, written or not, covering this? > When /etc/defaults/rc.conf was created, the standard was everything belongs there to protect the user from default churn. > rc.conf(5) says that defaults/rc.conf is the thing that includes your > /etc/rc.conf, and that would certainly guarantee that the system- > provided defaults are in place, but the current implementation doesn't > actually work that way. rc.subr is currently forgiving of a missing > defaults file. > Yes, it was implemented that way a long time ago, but there was a switch to a list of rc files to read at some point and the docs weren't updated. > I'd prefer that the system rc.d scripts relied on defaults/rc.conf > alone and individual rc.d scripts not be cluttered up with :- syntax. > While rc.conf(5) strongly implies the file is required, it doesn't > exactly say so. Should it? > IMHO, yes. It's certainly was the intent when this stuff was invented. Warner From owner-freebsd-arch@freebsd.org Thu Sep 28 11:41:09 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 6DF1CE303D4 for ; Thu, 28 Sep 2017 11:41:09 +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 A8C0A80691 for ; Thu, 28 Sep 2017 11:41:08 +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 OAA27503 for ; Thu, 28 Sep 2017 14:41:05 +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 1dxXBh-000EpS-DX for freebsd-arch@FreeBSD.ORG; Thu, 28 Sep 2017 14:41:05 +0300 To: freebsd-arch@FreeBSD.org From: Andriy Gapon Subject: lua in zfs Message-ID: Date: Thu, 28 Sep 2017 14:40:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 11:41:09 -0000 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 From owner-freebsd-arch@freebsd.org Thu Sep 28 13:13:20 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 D3AFDE31FC8 for ; Thu, 28 Sep 2017 13:13:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 9D95F831D8 for ; Thu, 28 Sep 2017 13:13:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x235.google.com with SMTP id c195so1170298itb.1 for ; Thu, 28 Sep 2017 06:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hdGtOm0r17uO/mInsnbBHiKpXPBtM6smW2fJuNsYIzQ=; b=we8GeKdISXVqpHWQHlMsKsRWwsCJColzAodeW2oAnH0mu2u+IaTnOSs4FfE/vnU96t /l+uxjTuPxYF7HmRf2pfmR+KydZZRIAlZU0aRwM00LL8Bd5IrFP7i4rYoM2GNnStatu9 wvfUyhV4XdhxKkw1NNLStXRcPaM4V855cHmyKf0n2jYe88bh/+XR9UmrmcHFPi3daPi9 7CCzJx5PQUrFm1TjP3Ki2+u+Jnnh25uxsPaLn5ezUH6bEq2la3apBIuqFXh+41Bsr+8T 0aCXhA2FRyB48NsfLbDUSRF5G7uGkHIiZ2s0ZLhUbEEX8sJld3vUxOMPDL5TZJsdnMZK 3P+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=hdGtOm0r17uO/mInsnbBHiKpXPBtM6smW2fJuNsYIzQ=; b=ZLITgAo70Ifc9ozyagIpCaY/8Qih0xVlC90VVa0kYayEmj0orUjLIi0jAPJJBiX4X5 wFq3B/3Tsx6STdEXGYIE0+YsDOw29AsmXfhqHhXxMCHU42AhYE8lvni9CPhRA+ZbRWF7 s/oKu3CJtHqwDJ0iovII8eEUPQGGtz/rkxls+ng4EReZS1CVmnVL9FclZjbKEwlQnflO l7pDfkDbADECeqlwpDNF2njztcgLrM/UTv88j02DdLPwBWJ3UiJMVw4ezAidludVJeMT KKtGKqau3/a/m7iMqIXtkzGD9tBcoyv/0+7aRdC+SOFg8FSdUMBAF9oN+vAWgT5CLVOV H15g== X-Gm-Message-State: AMCzsaXnPiJFoNvWoaGrtKrz7oe7SGaNfz0uZPh9GmN39LrzrDDmZTSa wqVPBik2uQ3ijLn3nDfY7Zp7WV19laAlEebQeJzLlQ== X-Google-Smtp-Source: AOwi7QDWLUvZe9uaWtgGJWqNgd/wgdpdfO9yalBOyDsCy3fap8/Xn2IIkRGQ4Tw9soYn6xSoD1oIx7v8DZkzlK1DxZk= X-Received: by 10.36.73.23 with SMTP id z23mr1306901ita.136.1506604399856; Thu, 28 Sep 2017 06:13:19 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 06:13:19 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: From: Warner Losh Date: Thu, 28 Sep 2017 07:13:19 -0600 X-Google-Sender-Auth: AkWGEdcvo5FD_ooN8X6QiBUVOfM Message-ID: Subject: Re: lua in zfs To: Andriy Gapon Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 13:13:20 -0000 Which version? Where in the tree? Can this be disabled? Warner 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 > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@freebsd.org Thu Sep 28 15:17:41 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 E6802E33F28 for ; Thu, 28 Sep 2017 15:17:41 +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 40ED32DB7 for ; Thu, 28 Sep 2017 15:17:40 +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 SAA27727; Thu, 28 Sep 2017 18:17:38 +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 1dxaZF-000Evw-Rx; Thu, 28 Sep 2017 18:17:37 +0300 Subject: Re: lua in zfs To: Warner Losh Cc: "freebsd-arch@freebsd.org" References: From: Andriy Gapon Message-ID: Date: Thu, 28 Sep 2017 18:16:16 +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: 7bit 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 15:17:42 -0000 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. > 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 From owner-freebsd-arch@freebsd.org Thu Sep 28 15:40:58 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 49A5AE01B1A for ; Thu, 28 Sep 2017 15:40:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 1CA203F5F for ; Thu, 28 Sep 2017 15:40:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x244.google.com with SMTP id c195so1892702itb.4 for ; Thu, 28 Sep 2017 08:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=G5DkDD5C/gN+ML+ySOMSmf2+vvbSRls8DluEb13QjkY=; b=AD/tC78aczSDwo4HOERGpMA97/OAubBFm687b51+OVPTkM9I1Nm8RLFsd8IAzJsi5a KEFjoIRgbIGgpi293rBovPjGkNWamO0hTzT2B/lACY6DBHOidcy1qdiufS2HX7PkHXDa HAfZvw/ipIkXpQbubFP7mH0ERykf9R3azGv9vXRyRBCc4ecS6nXC6+b9QBfd5/eu1Twz JsTLF8KDxop2oC9tUJTIgwzs2GTjpv3pdMAkaE8tJb8/oRyH/L81b9G+aT1El/XRhAq8 asMopnpS3BoC4ILSoHLjKpQde5+d+3b7uzPl47T56ogwVJfZq0RQLNBzqj/vV23M4MaH UNAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=G5DkDD5C/gN+ML+ySOMSmf2+vvbSRls8DluEb13QjkY=; b=JTMDvPyoAz85e0n+PjRNEVd500yj1gJ93kusF70Xm9Nbz2uKHJcAjeT8d0ZeutsLhj BhZbp8ZUepqqvqEHxx15TpH4A2FcIUr5BA66biYqSmuTG7dn4TxkifNNmHA86zJFOdf/ zEd2iXQOxLSvt7HRxUUHfHoc1IAfXtzWp/3IlVB927QvyeQLYD197AkU4uBNBbwVDCP0 t2UtyCUySYlRpZJVxqRp8rAqGQ7ISCvbTlpi6utikfUgGVa6Nlc0CkVdaoonkyw2eC+X XiSTim320+3ad2t8HjEDRLxOev+sPYPk0uhgUjEydFqM1oCJnFp3KdvB2sZZ0DuVKfiL 84jg== X-Gm-Message-State: AMCzsaWSzuRrPRqh5cFSlnsD2sM6E2SJdiJeEn3dbNnCV7dt8PsJ6z0Q gld9AcN1RhhkoOByIHnGKEeCRysGuO402EIFKRQBJw== X-Google-Smtp-Source: AOwi7QCRQzAXgMyPAdLTBVo5Q8m79f0dtQTaq+JEsZmcYTGy6w4luvN6nkdCrvhOUOS8K2qVPweh2g7THzcuMaLyiqc= X-Received: by 10.36.20.149 with SMTP id 143mr2092504itg.63.1506613257080; Thu, 28 Sep 2017 08:40:57 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 08:40:56 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: References: From: Warner Losh Date: Thu, 28 Sep 2017 09:40:56 -0600 X-Google-Sender-Auth: eCiuINTNektWS9Tfn19li8JMZKE Message-ID: Subject: Re: lua in zfs To: Andriy Gapon Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 15:40:58 -0000 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've been working on this in the background and was hoping to get it in before 12. Warner > > 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 > From owner-freebsd-arch@freebsd.org Thu Sep 28 15:46:30 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 B42C8E01D94 for ; Thu, 28 Sep 2017 15:46:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 7822D63589 for ; Thu, 28 Sep 2017 15:46:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22e.google.com with SMTP id z187so1924633ioz.12 for ; Thu, 28 Sep 2017 08:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=RWIoEYTyBBLH3f1FOStxbbkrqoZhjdMO6XoMVEyfs1c=; b=VEuvNUX1LUTw5IpeD+lyGtB5vcAJPib8TvWWKjxm85PF45mu3spuSQ6mVsSwhnJpRo wa+UbuVRw3d8YXPcJMp1zt3DA2Eo64YWw64jVZmTb95a0ILuMq5oZLa5VvJd3F4VfMJW APDdcFPbTHEBGtN9FcgdTwZRql/CnXI8+M0FlAn9Y2xLpVvIJeZTTmTHpKVKKPeRPO4P P6QFSr/wYBvDqfNQdASCctkwNPNOs5I1pH7UOVaAGnFKddGghQAxiUPfOpTZcddvdS6H 3yu1GSDooz9eBYSGfEka3UvPcToHV3dxus/EDu3qtVdSur9C2VVxMLQbNFBKm/ebeDJp PMBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=RWIoEYTyBBLH3f1FOStxbbkrqoZhjdMO6XoMVEyfs1c=; b=hDOYCCi6MAvOrAF2V551vGALdpoINgv6a7NHaXbx76ZURWZhnr4qr5SnA69+BPHk/R D4kzJeb6eTVspTXnwwtCqLgkWs0tOqZn0gduyZoP+5qFCDgMun5iJVgYTp1o4KkiENpE gy65Z+p3fkEhnqaTeaTyAiztxipQ5Rw0Kb3gMQhlFlVTYpQM1AV1KwOLqSm7zU0SwlY9 Iyh5KJNZD7worIltRkVLaehOv1d82YdB/vsAPxJNu1ZSWV1Nq/Aze8DIasLCUcDqj+pM dXoYKFswmXGcrpX9rQ9hAqdHxGz2cTeZwjF2p/ZdICrZ79icLnGSWHWjfyB+X6BeubjE upDw== X-Gm-Message-State: AMCzsaWz4azZ2H/SumrV1dwcE0oG8eBZ4Zj5hqTforTRqtvRhOdxec4b xkGOvMcsTtckT5Nh73MWXiiUoFc/zDH1Qq/TdL3GtA== X-Google-Smtp-Source: AOwi7QBLkZ23udshIVDRmSIjpOdJHVVHzAw7520A8OJYeJuxeI4nfVNT5sAol4rHW/foZvrXYJCZhvcaRUk+GByWjNc= X-Received: by 10.107.133.92 with SMTP id h89mr7390599iod.208.1506613589664; Thu, 28 Sep 2017 08:46:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 08:46:29 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: References: From: Warner Losh Date: Thu, 28 Sep 2017 09:46:29 -0600 X-Google-Sender-Auth: 0DxP0GSj6-Gs2t0Ldi1k6miHjlk Message-ID: Subject: Re: lua in zfs To: Andriy Gapon Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 15:46:30 -0000 On Thu, Sep 28, 2017 at 9:40 AM, 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've been working on this in the background and was hoping to get it in > before 12. > Oh, and I forgot to add that I wasn't requesting a new knob at this time, per se. Just wanted to know if it was there. Warner > Warner > > >> > 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 >> > > From owner-freebsd-arch@freebsd.org Thu Sep 28 15:55:18 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 08839E0211E for ; Thu, 28 Sep 2017 15:55:18 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 DF21063B2A for ; Thu, 28 Sep 2017 15:55:17 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6a71cb92-a465-11e7-a937-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 6a71cb92-a465-11e7-a937-4f970e858fdb; Thu, 28 Sep 2017 15:55:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8SFt9Uc001433; Thu, 28 Sep 2017 09:55:09 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1506614109.31939.20.camel@freebsd.org> Subject: Re: lua in zfs From: Ian Lepore To: Warner Losh , Andriy Gapon Cc: "freebsd-arch@freebsd.org" Date: Thu, 28 Sep 2017 09:55:09 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 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 15:55:18 -0000 On Thu, 2017-09-28 at 09:40 -0600, 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've been working on this in the background and was hoping to get it > in > before 12. > > Warner Iirc, the big difference between 5.2.x and 5.3 is that the latter added support for integers.  It seems like that would be a good thing, in the kernel. -- Ian From owner-freebsd-arch@freebsd.org Thu Sep 28 15:59:28 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 E4558E0229A for ; Thu, 28 Sep 2017 15:59:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (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 A7C4463D7C for ; Thu, 28 Sep 2017 15:59:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x241.google.com with SMTP id e9so1221978iod.5 for ; Thu, 28 Sep 2017 08:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=c1MMEJPWAPKg7st5MqpmVaB5udp4vFYg2N3RajCk9Y8=; b=HVEqiR8O/kED8vjri9qc8tfqQp19Rvvl1XqfhdR++u2dgYAdcVzQL0W1Gb5i0c5K1D n/ryl6bsPVU8kn0wENkXcoAvXL6EnibSfCn1IdfBKwk/WmKkAfB+ePfXGEEMZWgRIpbS /r5TqET6QL6c8BZsv7uJSCjENQg37pkJ8Bmp736PdN3UsIh29uzr4kxE97EFRIp02J0f PmIRJiXekB888Z4917N3BDotWnLZraJQIPB7Q29zofxVrKWDbw+d7PcuObzm/unJOeQL FIonRkPu2QQnNW40WNtjfEGLgte6tna6SOa1mImwPv5CIjrXuv8gYsBigH3wdIa39k7q O7Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=c1MMEJPWAPKg7st5MqpmVaB5udp4vFYg2N3RajCk9Y8=; b=tGoUzmueEiqYoNf88H3VMn+l2W7FvOg53qs30Kv4JrpEKf561JEuivz+hpeEygt+9g D3krEKFQhzy+KqIBWQrI04bNT68gG129oDYnGc8OE17CMSNRXZtaJQTtICiXuZL2UpUa QnOpIdTmiyRzkD9dPH9bPT0+Wdkl2WXl6l0G4SOZcZtDC6zKvqQMCbLcW1rjkoJfY4DO yeVkfTNZiUkEoWeH425ydwl4kPNSJITZmToqtfir6E906nVzcxgnRmDkxI40Bp7Po5lg FF0y9j27DldVyBDIN0o0nGjhWpSZXRaOVWUIs8znZb/y/DkkhRB0Tvd4i4CeP6wVoFeg UwUQ== X-Gm-Message-State: AMCzsaXINmq3GFHZcOuIXO8yLMEZ/8l0a/nuCyX7q8ZZGvVbuJTbIhYu /obUbG6ku56MaAkIpRG4DR4+XW4sOiF4RT6P/flI8Q== X-Google-Smtp-Source: AOwi7QBT6kg2WESmhiS8gJpIaQSRYJgWzJ8hghRfuuMbW8+imPY8Bb09aoYiuLWmu/XcY7ZcSAk4gIaZd+DMaEO/3ps= X-Received: by 10.107.7.161 with SMTP id g33mr7674432ioi.169.1506614367674; Thu, 28 Sep 2017 08:59:27 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 08:59:27 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: <1506614109.31939.20.camel@freebsd.org> References: <1506614109.31939.20.camel@freebsd.org> From: Warner Losh Date: Thu, 28 Sep 2017 09:59:27 -0600 X-Google-Sender-Auth: 741jh_9EjZUGW4NWRQcJRnOulnI Message-ID: Subject: Re: lua in zfs To: Ian Lepore Cc: Andriy Gapon , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 15:59:29 -0000 On Thu, Sep 28, 2017 at 9:55 AM, Ian Lepore wrote: > On Thu, 2017-09-28 at 09:40 -0600, 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've been working on this in the background and was hoping to get it > > in > > before 12. > > > > Warner > > Iirc, the big difference between 5.2.x and 5.3 is that the latter added > support for integers. It seems like that would be a good thing, in the > kernel. > I have a dim memory that this is why the boot loader project used it, but I may be misremembering. In any event, so people can follow along at home, there's a freshly rebased version of the lua-bootloader branch in https://github.com/bsdimp/freebsd.git I just pushed. Warner 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 From owner-freebsd-arch@freebsd.org Thu Sep 28 16:45:43 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 CEF87E03760 for ; Thu, 28 Sep 2017 16:45:43 +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 E12BF65872; Thu, 28 Sep 2017 16:45:39 +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 TAA28150; Thu, 28 Sep 2017 19:45:38 +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 1dxbwQ-000F0Y-59; Thu, 28 Sep 2017 19:45:38 +0300 Subject: Re: lua in zfs To: Ian Lepore , Warner Losh Cc: "freebsd-arch@freebsd.org" References: <1506614109.31939.20.camel@freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 28 Sep 2017 19:44:16 +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: <1506614109.31939.20.camel@freebsd.org> 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:45:43 -0000 On 28/09/2017 18:55, Ian Lepore wrote: > Iirc, the big difference between 5.2.x and 5.3 is that the latter added > support for integers.  It seems like that would be a good thing, in the > kernel. I am sure that the ZFS Lua represents numbers as integers and has no floating point support at all. -- Andriy Gapon From owner-freebsd-arch@freebsd.org Thu Sep 28 16:49:12 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 CF18CE0391E for ; Thu, 28 Sep 2017 16:49:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 930FF65A75 for ; Thu, 28 Sep 2017 16:49:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x242.google.com with SMTP id j26so1303529iod.0 for ; Thu, 28 Sep 2017 09:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=oRCTxRm4z83OWzgr7OIPeEYpMHbT81cjwqo+ciCKfrs=; b=N+evWcS03RKq024bQQB9hfsKNT/mbOyx54yR6gXacqTUC2mkHfiw2tP3A7IzLYbvRI UnNFkBXxVx3GTn9ypZcigQj51YhfVdO+h5NFp8Hih0JowX37xnqivJi/GMFHALXC8YEv UMJxnJij73KBwIbiYQ9drtkGSzJPOTekeBcVHfBct+HJIIbXMQQ4FZUBaBt7faKo9nLo 7g9dIWH0Q4C1znHGHXLng3GJHhmDji8OsRmIPIS6ZvaLfmf/y3BuSiSnpWFN6Gnf3ib2 AkA6KUENZCYPD6fDYst09kFS2k9T9oOh7FUqQtWQLT66GTbW303IUhoBBippSIx1JsQ/ Xa5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=oRCTxRm4z83OWzgr7OIPeEYpMHbT81cjwqo+ciCKfrs=; b=VMH53C6UNPh2qcpqY8ts7KQ4E90eFaomy+kN7jIViZCx4czYyMYQgjzOwuANJe7BHj fvB91hVimgoGAqDgp15lvRC2ton+h4Hkt9696ZO3pxilDrpCcT9RbVu8HCbdyA592fxU BS8BuQkxaXNSVNGzVj44mF613cJVPU4WJKqjXK8z85k+5Gw0HQSWdvBSO35iXFSfkuMp 8VF5lvSBkkvG7fqG52+o1hPuEF5Z6Pl+TftoODu2D0bI3zGeS2Rz5/jtS4JVwWXPyh4g k/LjvZeQF/R6MuKjhSVbTRnamuZD+tBZVqeil+9uGYvSTeLz55VUByWZ5Va5HOxJMMcc L0Kw== X-Gm-Message-State: AMCzsaVbc7OV5+lD+1+p4TRihGoV0Qo3Z1LODpjNy41GCuA3ckM5XGu2 OHo8MyYaIOTlcAc45k6Kh8b2F7I7qUFBiJwU6K8Ytg== X-Google-Smtp-Source: AOwi7QB99+CGZRlI2//OHQfJO0Zu5YTprwXKbNoeBvl2W4Zy8u15tkKc15mYimAuuBsP1m0jxl+G4U/Ac4YigolpWA0= X-Received: by 10.107.7.161 with SMTP id g33mr7922128ioi.169.1506617351805; Thu, 28 Sep 2017 09:49:11 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 09:49:11 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:f996:822c:89a6:8ee4] In-Reply-To: <64f6d438-e985-9262-2b1d-1e4b017b7691@FreeBSD.org> References: <64f6d438-e985-9262-2b1d-1e4b017b7691@FreeBSD.org> From: Warner Losh Date: Thu, 28 Sep 2017 10:49:11 -0600 X-Google-Sender-Auth: pbzLQWtqyj9Xu_CJ-oBSlWwgVos Message-ID: Subject: Re: lua in zfs To: Andriy Gapon Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:49:12 -0000 On Thu, Sep 28, 2017 at 10:42 AM, Andriy Gapon wrote: > 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'm happy to work with you on this. I'd like to get lua bootloader into the tree, and this gives me motivation to finish it up, even if it is a bit rough around the edges... What's your timeline for bringing this stuff in? Warner > > > 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 > From owner-freebsd-arch@freebsd.org Thu Sep 28 16:50:42 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 DD2B0E039CD for ; Thu, 28 Sep 2017 16:50:42 +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 E215465B5C; Thu, 28 Sep 2017 16:50:41 +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 TAA28241; Thu, 28 Sep 2017 19:50:39 +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 1dxc1H-000F1D-OJ; Thu, 28 Sep 2017 19:50:39 +0300 Subject: Re: lua in zfs From: Andriy Gapon To: Ian Lepore , Warner Losh Cc: "freebsd-arch@freebsd.org" References: <1506614109.31939.20.camel@freebsd.org> Message-ID: Date: Thu, 28 Sep 2017 19:50:04 +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:50:43 -0000 On 28/09/2017 19:44, Andriy Gapon wrote: > On 28/09/2017 18:55, Ian Lepore wrote: >> Iirc, the big difference between 5.2.x and 5.3 is that the latter added >> support for integers.  It seems like that would be a good thing, in the >> kernel. > > I am sure that the ZFS Lua represents numbers as integers and has no floating > point support at all. Some more info: https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/fs/zfs/lua/README.zfs -- Andriy Gapon From owner-freebsd-arch@freebsd.org Thu Sep 28 16:51:39 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 AE52FE03B9D for ; Thu, 28 Sep 2017 16:51:39 +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 F256365DBF for ; Thu, 28 Sep 2017 16:51:38 +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 TAA28255; Thu, 28 Sep 2017 19:51:37 +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 1dxc2D-000F2E-Gm; Thu, 28 Sep 2017 19:51:37 +0300 Subject: Re: lua in zfs To: Warner Losh Cc: "freebsd-arch@freebsd.org" References: <64f6d438-e985-9262-2b1d-1e4b017b7691@FreeBSD.org> From: Andriy Gapon Message-ID: Date: Thu, 28 Sep 2017 19:50:42 +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: 7bit 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:51:39 -0000 On 28/09/2017 19:49, Warner Losh wrote: > I'm happy to work with you on this. I'd like to get lua bootloader into the > tree, and this gives me motivation to finish it up, even if it is a bit rough > around the edges... What's your timeline for bringing this stuff in? I was aiming for this weekend. -- Andriy Gapon From owner-freebsd-arch@freebsd.org Thu Sep 28 17:07:41 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 877F1E03FCE for ; Thu, 28 Sep 2017 17:07:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (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 3EE1266468 for ; Thu, 28 Sep 2017 17:07:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x241.google.com with SMTP id e9so1318891iod.5 for ; Thu, 28 Sep 2017 10:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Ox1V2mCKROOVYjKa8PY66d4KzIGwx1Z31lleVXxX5ZU=; b=vB6hlVCFjHYzQVIH9gxksn6sRJduyaeUO7J9Iyik6HWn9bufBgP9vyD4LhZkggyC0I H15C+ayEfePD0Y74mhiyTtyA/NdnpBrGDfR7E1P2Vi4h9rO4wrr4RML3dXM/IDnL02m+ vHrwwbFLB82d9yyVFLPxRk2PXhQDmbI0ff4RTL6ytHZkCc1NF21Qzs1KvcpFIC0CGu24 kSpLykEwuL8U+W10Z3BtsejcpZjx1bR8Dm7u6a2xXEASVNVPTd/2T/uLye1hwqeZRYcb V5Y2RvlqoiUKAGawt37KtNzL5LF8UQfevxM8+5YS+xYtSHyxXBJJGPvVmPUS4YNnav/B kexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Ox1V2mCKROOVYjKa8PY66d4KzIGwx1Z31lleVXxX5ZU=; b=WGglGw+9C0qlSpwieF8NvLr7SHCuRbTvUYixJQpXMvf3NkYObWbS1JA2q+3+EuIw3o p+o0u2zkdzZQZ9aovxZ8Pu0kpjpKguQC4BSrXSKq488rCJ5NDLYjzpkLw8yKSV45PHEy 2rCahCTrz+mBIlrT/8CKy/HghOJNBGi8N/Zsr237nGQ/WdbRvTRh5FYqmgd2bZeQLR9B Gh2muz/CMBu1fTKABYE2D/mfm+ZXzWartc9SI0Vw38CcQ9AEsgaHVqtMq+je9vuD9irN b/pVe4bKFuochiFH7uGVrv7jVwdGah0YttSS4IHHboIkUo9tOoB0zkl30vw5prRFep96 EDig== X-Gm-Message-State: AMCzsaU/QM8QBSXh4PbS/XEs2Jb7wthgCc15bXFEDA8O6GdzUoMVGtZG dIt4oz7wZyXSK6PN4sIfun5QYY364I89m2+h2EKRHg== X-Google-Smtp-Source: AOwi7QDOJ/mVQcygIx2lZfDI1SRQ6IXBJwMmouQByApJly3X99GFYLEfv3P1UXqsAWLTyE+nv43YWCESBT2ZGyHglaY= X-Received: by 10.107.135.147 with SMTP id r19mr8715746ioi.26.1506618455701; Thu, 28 Sep 2017 10:07:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 10:07:35 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: References: <1506614109.31939.20.camel@freebsd.org> From: Warner Losh Date: Thu, 28 Sep 2017 11:07:35 -0600 X-Google-Sender-Auth: rp5XlgXj0VhUZKP6ytYPHE52oYg Message-ID: Subject: Re: lua in zfs To: Andriy Gapon Cc: Ian Lepore , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 17:07:41 -0000 On Thu, Sep 28, 2017 at 10:50 AM, Andriy Gapon wrote: > On 28/09/2017 19:44, Andriy Gapon wrote: > > On 28/09/2017 18:55, Ian Lepore wrote: > >> Iirc, the big difference between 5.2.x and 5.3 is that the latter added > >> support for integers. It seems like that would be a good thing, in the > >> kernel. > > > > I am sure that the ZFS Lua represents numbers as integers and has no > floating > > point support at all. > > > Some more info: > https://github.com/illumos/illumos-gate/blob/master/usr/ > src/uts/common/fs/zfs/lua/README.zfs Reading this strongly suggests to me that we're going to have two versions of lua in the tree then: 1) This version is a modified version of 5.2.4 2) Significant changes have been made to harden this interpreter, which won't be in 5.3.0 3) A number of APIs have been removed, which makes it difficult to use as a general purpose thing. So I think that you should go ahead and import it. The level of work for my request is very high, and significantly diverges us from upstream. It's unfortunate that we'll have two versions. But this isn't really pure lua but a variant maybe better described as lua-zfs. Warner From owner-freebsd-arch@freebsd.org Thu Sep 28 18:44:08 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 BC204E05DD8 for ; Thu, 28 Sep 2017 18:44:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97B5B694CC; Thu, 28 Sep 2017 18:44:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E72AD10AF07; Thu, 28 Sep 2017 14:44:01 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Cc: Warner Losh , Andriy Gapon , Ian Lepore Subject: Re: lua in zfs Date: Thu, 28 Sep 2017 10:52:44 -0700 Message-ID: <13426777.FL7aYimd4u@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 28 Sep 2017 14:44:02 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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 18:44:08 -0000 On Thursday, September 28, 2017 11:07:35 AM Warner Losh wrote: > On Thu, Sep 28, 2017 at 10:50 AM, Andriy Gapon wrote: > > > On 28/09/2017 19:44, Andriy Gapon wrote: > > > On 28/09/2017 18:55, Ian Lepore wrote: > > >> Iirc, the big difference between 5.2.x and 5.3 is that the latter added > > >> support for integers. It seems like that would be a good thing, in the > > >> kernel. > > > > > > I am sure that the ZFS Lua represents numbers as integers and has no > > floating > > > point support at all. > > > > > > Some more info: > > https://github.com/illumos/illumos-gate/blob/master/usr/ > > src/uts/common/fs/zfs/lua/README.zfs > > > Reading this strongly suggests to me that we're going to have two versions > of lua in the tree then: > > 1) This version is a modified version of 5.2.4 > 2) Significant changes have been made to harden this interpreter, which > won't be in 5.3.0 > 3) A number of APIs have been removed, which makes it difficult to use as a > general purpose thing. > > So I think that you should go ahead and import it. The level of work for my > request is very high, and significantly diverges us from upstream. It's > unfortunate that we'll have two versions. But this isn't really pure lua > but a variant maybe better described as lua-zfs. Yes, that was my guess from Andriy's original e-mail. ZFS tends to be a bit self-contained and includes its own version of zlib for example. In general it seems to use its own version of 3rd party utils rather than sharing those with other parts of the system. -- John Baldwin From owner-freebsd-arch@freebsd.org Thu Sep 28 18:47:48 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 3552DE05FE3 for ; Thu, 28 Sep 2017 18:47:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 017F7698DB for ; Thu, 28 Sep 2017 18:47:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id m103so2387567iod.13 for ; Thu, 28 Sep 2017 11:47:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PgpAzDHGvsZAYybwBOoKiu4g36sLTSq1BXYQsd2igug=; b=Pqnc3vfaRF1pYtj3SaZBgNLgOuik15QimGu8Q+CEfR7hxU55W55QOvBQSHcZKF+GZz 9waCpoDbPhygIKuF6BlQsYG1+T6v0zb9/mcX6TnZWVLzj3Tyuv8WrGt6uV/6VQb/C7J8 nB8tXuctvEz+5Ry0afSjBfY6YYKES51Q6M2XmS5chf8gKTgP+v78q8O/0Zr0UIBdOfpu yLaYAHHVwbJofJ7Ktkw5Z3aVjByN12z8ngJ1NH+nAXm9U14En/xjbXSgtETKOavdOJFB SbxUJ6PqeLIBa3S6MgSYyTwLA3LFp/V+tOOGU7qTyXB1GrpHTw3P5tplwKoN8x9BjZ4V 3/Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PgpAzDHGvsZAYybwBOoKiu4g36sLTSq1BXYQsd2igug=; b=YYy5jQOXaOZQrA0hjHJLSE2SmBqQBTZ0tQdaE9gY8O5y3tWlr9y8HdSRWlfM3oI0xw Uab5xPJg8KyysRgCCcR5eGaQXheklgV3ZmuJXCCmTvLNskuprJXhi2ZHv+bRaoADL1yw fhb/I+UJti+LRWHwFG9AD4j/5mHhjU3Zy2GTLRrJvEuDstTk0YcusMMwLhaCAHXzDy+N XVldgqtfJBlEXdv683fkyFdcxKTQG668hbhvECCROpGcEUuvyUknm/dqoT/2CMPUri/s LziaUGzbQKivpqpUvHGIDuhptZb5yYOsuuupk35Jf1wRUDVCatpSSD2AaS+15Y5KK2tQ eOUQ== X-Gm-Message-State: AMCzsaXRMI4+FuALdTo5E4dyBRj8kMcN/67ktbddXKKTNRPQKTO/CJbn rCtUzOep2TBQdLndqnAQL+U0MvigurVcMCtNll3iqg== X-Google-Smtp-Source: AOwi7QDj+6CsjbwcMWVnOhiiWu5PhqLaJgRgzs1VO0Oq+aaBt6+cygeXt5ARF0qrNfZJYMztAsda1zrS0MvZ6KvEetE= X-Received: by 10.107.185.7 with SMTP id j7mr9133686iof.221.1506624467206; Thu, 28 Sep 2017 11:47:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 11:47:46 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: <13426777.FL7aYimd4u@ralph.baldwin.cx> References: <13426777.FL7aYimd4u@ralph.baldwin.cx> From: Warner Losh Date: Thu, 28 Sep 2017 12:47:46 -0600 X-Google-Sender-Auth: KuHafv6Xe2c-ToGzeJhYPKgJ6M8 Message-ID: Subject: Re: lua in zfs To: John Baldwin Cc: "freebsd-arch@freebsd.org" , Andriy Gapon , Ian Lepore Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 18:47:48 -0000 On Thu, Sep 28, 2017 at 11:52 AM, John Baldwin wrote: > On Thursday, September 28, 2017 11:07:35 AM Warner Losh wrote: > > On Thu, Sep 28, 2017 at 10:50 AM, Andriy Gapon wrote: > > > > > On 28/09/2017 19:44, Andriy Gapon wrote: > > > > On 28/09/2017 18:55, Ian Lepore wrote: > > > >> Iirc, the big difference between 5.2.x and 5.3 is that the latter > added > > > >> support for integers. It seems like that would be a good thing, in > the > > > >> kernel. > > > > > > > > I am sure that the ZFS Lua represents numbers as integers and has no > > > floating > > > > point support at all. > > > > > > > > > Some more info: > > > https://github.com/illumos/illumos-gate/blob/master/usr/ > > > src/uts/common/fs/zfs/lua/README.zfs > > > > > > Reading this strongly suggests to me that we're going to have two > versions > > of lua in the tree then: > > > > 1) This version is a modified version of 5.2.4 > > 2) Significant changes have been made to harden this interpreter, which > > won't be in 5.3.0 > > 3) A number of APIs have been removed, which makes it difficult to use > as a > > general purpose thing. > > > > So I think that you should go ahead and import it. The level of work for > my > > request is very high, and significantly diverges us from upstream. It's > > unfortunate that we'll have two versions. But this isn't really pure lua > > but a variant maybe better described as lua-zfs. > > Yes, that was my guess from Andriy's original e-mail. ZFS tends to be a > bit > self-contained and includes its own version of zlib for example. In > general > it seems to use its own version of 3rd party utils rather than sharing > those > with other parts of the system. > Sure. I was vaguely aware of that... But I had to ask to make sure that we couldn't use it, and also provide a 'paper trail' to those grepping the tree / mailing lists for why... Warner From owner-freebsd-arch@freebsd.org Thu Sep 28 19:06:18 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 3EC24E0667C for ; Thu, 28 Sep 2017 19:06:18 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (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 124616A25D; Thu, 28 Sep 2017 19:06:18 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-it0-x231.google.com with SMTP id c195so2703926itb.4; Thu, 28 Sep 2017 12:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HA4g94uwW/lagrKjNocCwobz0qggFyCfk5kRTYgbypA=; b=JDQ5tT4Z63Q5/Ko4AeFOa/7ipqy7j1qrbrS8PA9TsOBMGnlpL3i7FVTBUmiV3rJKUx W4AeX8fRASOS5+yyuaNj02l1359ndZqgBwzG5xNIJ8OuOjM7g5P8L8gINHkcpbvysVSO v7bedg6/dJtghXPXLEqCd+KmN8FFpWhAoWbjmdPf3La44xu95XYxVyEB4bkUjOqFG7q5 VMNNJngFCSEM7Q1fGHJUruwk34slQc/EoJUyw7CO631NIk/iI+3iJ91Buzm6/X8HalpK qmlPPosqcgIC6w8wCq6ykG7+h9I9VnjTRxGMYzqun7GerJsvSTeOFJI0j2+wP+ZsRNSG um2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HA4g94uwW/lagrKjNocCwobz0qggFyCfk5kRTYgbypA=; b=Z2hcN2oAefKUsENibRlYtkis++wBm/XlkG+16h7XmSFsF6ZIfZZIKfm75JUWPvWSzD iFBKjF46/lndtzEpE6zlwxEXrI6yXE42xoPC5i3e/TzM31hwcIAF/rL//eUZ4f0XbfY1 8y43k4DN/WfJb6Au3oe9a35CxLzvfM3/pGg8xQ4VTivxS11SAQqDg4Gp3q6NCpdWo7OP 22hXzsZtX0lH2Q2EFigm35YEPevs7DTGgtvi/gw5HKoaQ8ir1NCmnyMGGhtM1w6JcAZL OXKKib7DFY3NNLEP9ga3Xnu3EVQYi/B1quVlbxNfFfwSwcHr2VWqpXiRACJnL+kaInfv YvsQ== X-Gm-Message-State: AMCzsaXw/XWu4uY1K/i92v+lkEW6oBjQ0iZSnqe3IgYcjfECz9rwIoEu 6GURWJvqC6b71ZrjMZls+3oFa3tHEpR6Np21CeDzyWUe X-Google-Smtp-Source: AOwi7QBVQoR8UqwyDSLOvTyYwmcxzsNYIi2zJNodK8Fg7tivCN/OI2n1GCnHFOixoccTyx6wundf0cY3h3Z69+Uk6SI= X-Received: by 10.36.167.5 with SMTP id a5mr3143903itf.69.1506625576610; Thu, 28 Sep 2017 12:06:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.12.74 with HTTP; Thu, 28 Sep 2017 12:06:15 -0700 (PDT) In-Reply-To: <13426777.FL7aYimd4u@ralph.baldwin.cx> References: <13426777.FL7aYimd4u@ralph.baldwin.cx> From: Xin LI Date: Thu, 28 Sep 2017 12:06:15 -0700 Message-ID: Subject: Re: lua in zfs To: John Baldwin Cc: freebsd-arch@freebsd.org, Ian Lepore , Andriy Gapon Content-Type: text/plain; charset="UTF-8" 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 19:06:18 -0000 On Thu, Sep 28, 2017 at 10:52 AM, John Baldwin wrote: > On Thursday, September 28, 2017 11:07:35 AM Warner Losh wrote: >> On Thu, Sep 28, 2017 at 10:50 AM, Andriy Gapon wrote: >> >> > On 28/09/2017 19:44, Andriy Gapon wrote: >> > > On 28/09/2017 18:55, Ian Lepore wrote: >> > >> Iirc, the big difference between 5.2.x and 5.3 is that the latter added >> > >> support for integers. It seems like that would be a good thing, in the >> > >> kernel. >> > > >> > > I am sure that the ZFS Lua represents numbers as integers and has no >> > floating >> > > point support at all. >> > >> > >> > Some more info: >> > https://github.com/illumos/illumos-gate/blob/master/usr/ >> > src/uts/common/fs/zfs/lua/README.zfs >> >> >> Reading this strongly suggests to me that we're going to have two versions >> of lua in the tree then: >> >> 1) This version is a modified version of 5.2.4 >> 2) Significant changes have been made to harden this interpreter, which >> won't be in 5.3.0 >> 3) A number of APIs have been removed, which makes it difficult to use as a >> general purpose thing. >> >> So I think that you should go ahead and import it. The level of work for my >> request is very high, and significantly diverges us from upstream. It's >> unfortunate that we'll have two versions. But this isn't really pure lua >> but a variant maybe better described as lua-zfs. > > Yes, that was my guess from Andriy's original e-mail. ZFS tends to be a bit > self-contained and includes its own version of zlib for example. In general > it seems to use its own version of 3rd party utils rather than sharing those > with other parts of the system. The zlib situation with ZFS is somewhat different, I think the goal was to share one copy of zlib in the whole Solaris kernel, and as such it was implemented as wrapper around regular zlib rather than a fork like in ZFS. The only reason it was imported this way, if I understood correctly, is that the zlib in FreeBSD kernel at the time was too old. Actually there was an attempt to unify zlib across the kernel a few years ago, by the way: https://svnweb.freebsd.org/base?view=revision&revision=199954 I'd be *really* happy to see we unify all zlib users into one, hopefully with the base userland contrib/zlib. Maybe a good hackathon goal? Similar situation applies to the LZ4 compression too, but the change in LZ4 is more intrusive than zlib: at the time it was added, there is no other consumers of LZ4, and there was no way to change memory allocator without making changes to LZ4 code itself (which was fixed by more recent LZ4 versions). If in the future we decided to have LZ4 in other FreeBSD kernel components, it would be beneficial to unify them too. The lua-zfs is different as many pointed out, and I think the benefit of importing the functionality is great enough to warrant having two copies of code at the same time, at least as an interim solution. Cheers,