Hi all,
Happy holidays.
I am trying to enable eBPF on ARM64 on Hikey620 platform. Following up
the instructions on the page [1] to install bcc on debian platform;
there have two dependency libs are missed on Debian/Jessie releasing,
the two libs are luajit and libluajit-5.1-dev.
I could see lubjit has supported arm but missed for ARM64, so want to
check if I understand correctly for this? And very appreciate if you
coudl give me more info for current status for luajit and libluajit-dev
for supporting ARM64.
Also welcome if you could share experience if you have enabled eBPF on
ARM64 platform.
[1] https://github.com/iovisor/bcc/blob/master/INSTALL.md
Thanks,
Leo Yan
FYI
---------- Forwarded message ----------
From: Mike Pall <mikelj-1705(a)mike.de>
Date: Mon, May 1, 2017 at 10:03 PM
Subject: [ANN] LuaJIT-2.1.0-beta3
To: luajit(a)freelists.org
LuaJIT 2.1.0-beta3 has been released.
This is the third beta release for the new v2.1 branch.
The major addition over beta2 is the LJ_GC64 mode JIT compiler
backend contributed by Peter Cawley. Previously, only the x64 and
ARM64 interpreters could be built in this mode. This mode removes
the 32 bit limitation for garbage collected memory on 64 bit systems.
LuaJIT for x64 can optionally be built for LJ_GC64 mode by
enabling the -DLUAJIT_ENABLE_GC64 line in src/Makefile or via
'msvcbuild.bat gc64'.
Cisco Systems, Inc. and Linaro have sponsored the development of
the JIT compiler backend for ARM64. Contributors are Djordje
Kovacevic and Stefan Pejic from RT-RK, Charles Baylis from Linaro
and Zheng Xu from ARM. ARM64 big endian mode is now supported, too.
Cisco Systems, Inc. has sponsored the development of the MIPS64
interpreter and JIT compiler backend. Contributors are Djordje
Kovacevic and Stefan Pejic from RT-RK.
Peter Cawley has contributed the changes for full exception
interoperability on Windows/x86 (32 bit).
François Perrad has contributed various extensions from Lua 5.2 and
Lua 5.3. Note: some left-over compatibility defines for Lua 5.0
have been removed from the header files.
Various minor issues have been fixed, too. Please check the git
commit log for more details.
Here's a direct link to the download page:
http://luajit.org/download.html
If you find any issues with this release, please report them at the
GitHub issue tracker:
https://github.com/luajit/luajit/issues
What is LuaJIT?
---------------
LuaJIT is a Just-In-Time (JIT) Compiler for Lua. It's upwards
compatible with standard Lua 5.1 and can significantly boost the
performance of your Lua programs.
LuaJIT is open source software, released under the MIT license.
LuaJIT builds out-of-the-box on most x86 or x64 operating systems
(Linux, Windows, OSX etc.) and can be cross-compiled for embedded
systems based on x64 (PS4, Xbox One), ARM/ARM64 (Android, iOS),
PPC (PS3, Xbox 360) and MIPS/MIPS64 CPUs.
--Mike
Hi, all,
OpenResty core tests <https://github.com/openresty/lua-resty-core> crash
with "bad light userdata pointer" on ARM64 with 48-bit kernel. We proposed
a workaround to fix it in LuaJIT, but LuaJIT upstream suggests fix this
issue in application rather than on LuaJIT itself.
<https://github.com/LuaJIT/LuaJIT/pull/230#issuecomment-260205661> Below is
the suggestion from LuaJIT upstream on how we should change the
applications.
Have a look what they did to change the (few) libraries that didn't play
nicely:
- lightuserdata used as a unique table key, e.g. for the registry:
with lua_pushlightuserdata(L,
&x) and x on the C stack, replace x with a static variable.
- lightuserdata used as some kind of cross-object pointer: don't do that
-- it doesn't play nicely with the GC, anyway. Replace with proper
userdata references.
- lightuserdata used as a misguided userdata replacement, possibly even
setting the lightuserdatametatable (ugh): throw away any such library,
replace with a proper FFI binding.
Do you think the suggestion can nicely work for LuaJIT applications? If
not, do you have any cases which can strongly support your argument?
Since currently, upstream is aware of this issue. I think it is the right
time to raise your concerns directly on the above GitHub pull request.
--
Best regards,
Zhongwei
Hi, all,
I've created a pull request in LuaJIT upstream for fixing lightud for 48
bit VA:
https://www.freelists.org/post/luajit/fix-lightud-type-for-48bit-virtual-ad…
Please help take a look if you have time, thanks!
Because this issue introduces changes in generic code base and may also
affect other platform with 48 bit virtual address configuration, I feel
discuss it in upstream may be more appropriate.
--
Best regards,
Zhongwei
Hi everyone,
Will anyone be going to FOSDEM 2017? We plan to propose a talk (current
state, improvements for selected 64-bit architecures) for the lua-devroom,
if you are there and interested, that would be a good time to discuss LuaJIT
limits and future work (in case you plan any).
Regards,
Petar
Hi Petar, Djordje, Stefan,
Could you update is on the progress of the clean up work you are doing
to prepare the ARM64 Luajit port for upstreaming?
Thanks
Charles
Hi all,
So far we found 2 issues in the LuaJIT project :
- light userdata problem on 48-bit VA kernel.
- Currently, Zhongwei is looking into it. The plan is to get a
workable solution and push to upstream to discuss the problem.
- wrk doesn't work with LuaJIT.(Unknown cause, reproduced on SoftIron)
- Currently, we don't have bandwidth to look into that.
So for the wrk related issue, it would be very appreciated if anyone can
take a look.
Steps to reproduce the problem :
- Build and install wrk
echo "===== Install libssl-dev which is needed by wrk"
apt-get -y install libssl-dev
echo "===== Download, build and install LuaJIT-2.1 which is also needed by
wrk"
wget -O /root/LuaJIT-2.1.zip
https://github.com/LuaJIT/LuaJIT/archive/v2.1.zip # having problems with
both on upstream and linaro branches
unzip /root/LuaJIT-2.1.zip -d /root/
make PREFIX=/usr install -C /root/LuaJIT-2.1
ln -sf luajit-2.1.0-beta2 /usr/bin/luajit
echo "===== Download wrk"
wget -O /root/wrk-4.0.2.zip https://github.com/wg/wrk/archive/4.0.2.zip
unzip /root/wrk-4.0.2.zip -d /root/
echo "===== Patch wrk to use luajit-2.1 rather than luajit-2.0"
sed -i 's/luajit-2.0/luajit-2.1/g' /root/wrk-4.0.2/src/*
echo "===== Build and install wrk"
make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -C /root/wrk-4.0.2
cp /root/wrk-4.0.2/wrk /usr/bin/
- run
wrk -d 1s -c 1 http://www.google.com
PANIC: unprotected error in call to Lua API
Regards,
Zheng
Hi everyone,
Once the latest pull-requests from Stefan and Djordje get merged, we should
have functionally correct LuaJIT AARCH64 port with LJ_GC64 JIT enabled.
What remains to be done is a clean-up effort (w/some small optimizations)
before the code can be presented to Mike.
I suggest this to be done by one side only, to avoid different code styles
and such issues. I would nominate Stefan and/or Djordje to do this, if no
one objects.
What do you say? Ryan?
Regards,
Petar
Hi all,
Fathi helped us to create some Jenkins jobs to run some basic tests for
LuaJIT project. It will run some basic tests for each commit.
https://ci.linaro.org/user/zheng.xu@linaro.org/my-views/view/LuaJIT/
Currently, no one is notified. I would like to notify
luajit(a)lists.linaro.org for unstable builds. Do everyone in the mailing
list feel OK to be included?
Regards,
Zheng