Skip to content
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

Add support for ARM64v8 architecture #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

odidev
Copy link

@odidev odidev commented Aug 7, 2018

This PR has been generated based on the ongoing discussion at aerospike/aerospike-server.docker#33 .

Along with the mentioned changes i have also modified submodules being used in aerospike.
These are:
Use LuaJIT-2.1.0-beta3

      - git clone  http://luajit.org/git/luajit-2.0.git
      - git checkout v2.1.0-beta3

Please have a look and let know your valuable feedback.
I am open to do any kind of experimental changes if required to confirm and enhance aerospike for arm64v8 architecture.

Regards,

xorphox and others added 8 commits Jun 8, 2018
Pre-commit failure in exchange missed skipping exchange state change.
AFter abandon exchange still was in the ready to commit state. The
retry mechanism kicks in and completes exchange.

Fixed by making sure precommit failure does not change exchange state.
 - Use ARM64 specific register set.
 - Use LuaJIT-2.1.0-beta3 which has support for arm64v8.

Signed-off-by: Odidev <odidev@puresoftware.com>
@odidev
Copy link
Author

@odidev odidev commented Aug 28, 2018

This PR is raised in accordance with the ongoing discussion at aerospike/aerospike-server.docker#33.

Please have a look at Commit ID: 897920b
Aerospike is working pretty well over arm64v8 after these changes an I can provide build and run logs as well.

I am also ready to perofrm test cases if required for further confirmation.
Regards,

@odidev
Copy link
Author

@odidev odidev commented Aug 28, 2018

In case you feel unavailability of platform for confirmation then please refer to this:

Shippable supports free Arm64 CI/CD and I believe Codefresh does too (both 64-bit and 32-bit for both providers):

https://blog.shippable.com/shippable-arm-packet-deliver-native-ci-cd-for-arm-architecture
http://docs.shippable.com/platform/tutorial/workflow/run-ci-builds-on-arm/

CodeFresh Beta signup: https://goo.gl/forms/aDhlk56jZcblYokj1

If you need raw infrastructure the WorksOnArm project will supply full servers if you want to deal with metal: https://github.com/worksonarm/cluster/

Do have a look and let me know if anything else is required to see Aerospike over arm64v8.
Regards,

@bbulkow
Copy link

@bbulkow bbulkow commented Sep 11, 2018

Hey Oidev,
Thanks for your work and contribution - I'm following up internally, sorry for the delay.

Have you filed a contributor licence agreement ( CLA ) which is standard and very similar to Google's CLA and the Apache CLA? https://www.aerospike.com/community/contributor/

If so, can you respond here with the rough date of your CLA submission?

We can't accept code changes without a valid CLA for your account - thanks.

@odidev
Copy link
Author

@odidev odidev commented Sep 11, 2018

@bbulkow
Hi Brian,
It's great that you finally decided to have a look at the changes.
I have submitted CLA around August 23, 2018.

Do let me know, if there is somthing else required from my end.

Thanks for your cooperation 😄 👌
Regards,

@bbulkow
Copy link

@bbulkow bbulkow commented Sep 11, 2018

Thanks, that helps me track things down.

@odidev
Copy link
Author

@odidev odidev commented Oct 12, 2018

@bbulkow
Hi Brian,

Is there any update regarding the work in the direction of support for arm64v8?
Eagerly waiting to see Aerospike in the official support list of arm64v8.

Regards

@odidev
Copy link
Author

@odidev odidev commented Oct 31, 2018

Hi Guys,
Sorry to bother you again.

Is there any update w.r.t. ARM64?
Regards,

@brihh
Copy link

@brihh brihh commented Nov 1, 2018

Greetings. Have you been able to run multi-node cluster tests on ARM?

thx.bri.

@lag-linaro
Copy link

@lag-linaro lag-linaro commented Dec 4, 2018

@odidev I'm trying to replicate your build.

After pulling this Pull Request I ran:

$ git submodule init
$ git submodule update
$ make all

But I get:

make: *** No rule to make target '/src/luaconf.h.orig', needed by '/src/luaconf.h'. Stop.

Which comes from this part of the Makefile:

$(LUAJIT)/src/luaconf.h: $(LUAJIT)/src/luaconf.h.orig
        ln -s $(notdir $<) $@

How did you fix this?

@odidev
Copy link
Author

@odidev odidev commented Dec 4, 2018

Hi @lag-linaro
It is really great to see you getting involved in this module.
Sincere Thanks for this 😄

I am still stuck in trying to get multi-nodes working.

Please use below changes to get going:

Create symlink of src/luaconf.h -> src/luaconf.h.orig

You will also require LuaJIT for ARM64, for this, use this:

##### replace luaJIT ####
git clone http://luajit.org/git/luajit-2.0.git
git checkout v2.1.0-beta3
#### add this to modules/luajit-2.0/src/lauxlib.h
#define luaL_reg	luaL_Reg

Please let me know when it works for you

Regards,

@odidev
Copy link
Author

@odidev odidev commented Dec 7, 2018

Hi @lag-linaro

Did you get success in compiling the Aerospike with informed changes?

Regards,

@odidev
Copy link
Author

@odidev odidev commented Dec 10, 2018

Apart from above, you will require changes in following submodules too:

  • mod-lua
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ ifeq ($(USE_LUAJIT),1)
   CC_FLAGS += -DUSE_LUAJIT
 endif
 
-ifneq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le))
+ifneq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le, aarch64))
 CC_FLAGS += -march=nocona
 endif
  • common
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ CC_FLAGS += -fno-common -fno-strict-aliasing
 CC_FLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE $(EXT_CFLAGS)
 
 ifneq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le))
-CC_FLAGS += -march=nocona
+#CC_FLAGS += -march=nocona
 endif
 
  • luajit-2.0
--- a/src/lauxlib.h
+++ b/src/lauxlib.h
@@ -158,4 +158,5 @@ LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);
 
 /* }====================================================== */
 
+#define luaL_reg	luaL_Reg
 #endif

All the above changes can't be upstreamed as they are not part of Aerospike module

Regards,

@skynet4ps
Copy link

@skynet4ps skynet4ps commented Aug 8, 2019

Sorry to bother you guys, but it has been a long time.
Is there any update w.r.t. work in direction of ARM64v8?

@kportertx
Copy link
Contributor

@kportertx kportertx commented Aug 8, 2019

@akhilgupta74

Supporting architectures other than x86-64 is not a current priority. As Aerospike does make use of memory ordering guarantees provided by the x86-64 architecture, officially supporting architectures with weaker guarantees would require a significant financial and time investment, increase code complexity, and potentially reduce performance on x86-64.

If supporting ARM64v8 is a blocker for your company, I suggest negotiating with our sales team.

@Halfi
Copy link

@Halfi Halfi commented Jun 2, 2021

@kportertx in case of apple m1 released your last message looks offensively.

@kportertx
Copy link
Contributor

@kportertx kportertx commented Jun 2, 2021

@Halfi, I'm not sure what you find offensive, please clarify.

@Halfi
Copy link

@Halfi Halfi commented Jun 3, 2021

@kportertx first of all , all of your competitors support arm64 (actually multi-arch builds). Now arm64 architecture become much more popular after apple m1 released. And I can't find more information about your position about arm64 architecture. Only low priority for this task and your comment.
I got that you use specific x86 instructions, but @ObiDev made it works with quit small pull request.

@kportertx
Copy link
Contributor

@kportertx kportertx commented Jun 3, 2021

The difficulty isn't the use of x86 specific instructions, those are relatively trivial to fix, the difficulty comes from the difference in memory ordering guarantees. This PR isn't complete (it doesn't address the memory ordering issues) and would require a significant investment to approach completion. Developments like AWS Graviton2 and Apple's M1 have significantly increased pressure to support ARM and support is on our roadmap.

@romahat
Copy link

@romahat romahat commented Jan 29, 2022

@odidev Sorry to bother you about this old topic...

Do you probably have the built docker image for arm64 you could share?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet