-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] luawrapper: work with luajit on ARM64 #6512
Conversation
This reverts commit 45f9c8f.
Travis and Buildbot pass this as of 5a01fb3 |
This is ready for review, and, as far as I'm concerned, merge to master after some squashing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Am I understanding correctly that our current FFI
API
will not work on ARM64
or anything else that uses more than 47 bits of addresses?
Some benchmark results: https://gist.github.com/Habbie/4da8f77e66248ad0778d4481c9ef78f0 |
No, it's only lightuserdata that is affected by the 47 bit limit, as far as I can tell. |
But isn't that what we use for our |
Oh, yes. We'll have to look into that. |
Benchmarks look good, and as far as I understand it, it won't break the existing recursor |
Confirmed broken with or without this branch. |
The one ARM64 user we talked to is happy for now, without this merged (but with this sitting here!). I'd like to test/think about performance some more before we put this in. |
@Habbie, is there anything we can do to assist? I'm working with ARM64 at the moment, and I would prefer to use this patch over swapping LuaJIT for Lua wholesale. Thanks! |
Closing this until we figure out the performance impact. Still open, in parts, at: |
Short description
Lua
lightuserdata
on ARM64 with LuaJIT is limited to addresses that can fit in 47 bits. This PR removes all usage oflua_pushlightuserdata
from our copy of Luawrapper. TheValueInRegistry
andplain function pointer
changes are mostly harmless; the type index changes might have some performance impact.This makes the dnsdist test suite pass on Linux/ARM64.
PRing this now for reviews and comments. If it turns out the type index changes have real performance impact, I will consider making that a compile time choice.
When force applied to upstream Luawrapper, this breaks compilation of theFixed incustom_types
,movable
andmetatables
test suite components.Revert "no longer need this"
TODO
lua_pushlightuserdata
call (intemplate<> struct LuaContext::Pusher<const std::type_info*>
) - either make sure we never call it, or fix it. Just removing that template causes the upstream LuaWrapper failure mentioned above. I checked this box after adding an assert to that call, proving we do not rely on it.Checklist
I have: