[LU-6766] add support for arm64 Created: 25/Jun/15  Updated: 02/Jan/19  Resolved: 03/Sep/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.8.0

Type: Improvement Priority: Minor
Reporter: Arnaud Guignard Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: patch
Environment:

arm64


Issue Links:
Related
is related to LU-11832 ARM servers crashing on MDS startup Resolved
is related to LU-4199 Lustre client support for ARM platform Resolved
is related to LU-11200 Centos 8 arm64 server support Resolved
Rank (Obsolete): 9223372036854775807

 Description   

Expand lustre to support the ARM64 platform.

A first patch will be submitted shortly to enable basic compilation:

  • the architecture is reported as aarch64 so add that support to lustre-build-linux.m4,
  • for the Red Hat/Fedora packaging, strip the aarch64 suffix for the required kernel,
  • add definitions for lstat_t, lstat_f, fstat_f and fstatat_f for aarch64 architecture in lustre/include/lustre/lustre_user.h.

Moreover, the SYS_chown syscall is not available on arm64 (because as __ARCH_WANT_SYSCALL_NO_AT is not defined, __NR_chown is not defined in /usr/include/asm-generic/unistd.h). So the following call in lustre/utils/liblustreapi.c must be modified:

/* libc chown() will do extra check, and if the real owner is

  • the same as the ones to set, it won't fall into kernel, so
  • invoke syscall directly. */
    rc = syscall(SYS_chown, path, -1, -1);

This leaves several options:

  • the code dates back to 2007, glibc has evolved since then and it can be replaced with `chown()`.
  • replace it with `syscall(SYS_openat, ...)` and `syscall(SYS_fchownat, ...)`.
  • add `#ifdef _aarch64_` and a call to `chown()`.

Does someone more qualified have an opinion?



 Comments   
Comment by Gerrit Updater [ 25/Jun/15 ]

Arnaud Guignard (aguignard@gmail.com) uploaded a new patch: http://review.whamcloud.com/15395
Subject: LU-6766 build: add support for arm64
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5fd66dbeaee8f58387c59a1cf0149a8aaf1ef696

Comment by Gerrit Updater [ 25/Jun/15 ]

Arnaud Guignard (aguignard@gmail.com) uploaded a new patch: http://review.whamcloud.com/15396
Subject: LU-6766 utils: replace syscall() to SYS_chown by chown()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8707aff89d1f214022fc806f0a4a6f9e4c7634a7

Comment by James A Simmons [ 25/Jun/15 ]

Is this for big endian or little endian support?

Comment by Arnaud Guignard [ 25/Jun/15 ]

It has only been tested on little endian AArch64.

Comment by Oleg Drokin [ 03/Jul/15 ]

The big question I have is how do we go about ensuring this code stays working once accepted?
We do not have any arm or arm64 hardware in our test lab.
Without at least periodic testing this code will bit-rot, I fear (as has happened with many other bits that were not regularly tested and are now being removed or were already removed as broken).
What's your plan to ensure long-term viability of this code?

Comment by Aurelien Degremont (Inactive) [ 04/Jul/15 ]

These 2 patches ables Lustre to try to built on ARM64. There is no bitwise related code in theses patches. Just adding aarch64 to the list where architecture are managed.

For now, the client code runs on our ARM64 nodes. We agree there is no guarantee the code is fully ARM64 compatible. But, anyway, this architecture is not officially supported. Let's fix the built code which currently prevent Lustre from building on ARM64. This is the first step to have a broader testing of Lustre code on this arch. If it is easy to test it, more people will do it. Eventually this arch will be fully debugged and official.
Theses patches do not add several new files/headers specific for this arch.

Comment by Gerrit Updater [ 10/Jul/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15396/
Subject: LU-6766 utils: remove llapi_quotachown() and cb_quotachown()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fd6f11c92e2f6f54384d1ebd3474a77b0c0ded95

Comment by Peter Jones [ 10/Jul/15 ]

Landed for 2.8

Comment by Arnaud Guignard [ 10/Jul/15 ]

The issue is not resolved: the main patch http://review.whamcloud.com/#/c/15395/ has not been merged yet.

Comment by Peter Jones [ 10/Jul/15 ]

Apologies

Comment by Aurelien Degremont (Inactive) [ 22/Jul/15 ]

Only one of the 2 patches for this ticket is landed.

http://review.whamcloud.com/#/c/15395/ has all green lights and 3x "+1" (2 from Intel devs and 1 from James Simmons).

Is there any reason I missed preventing this 7-line patch from landing?

Comment by Aurelien Degremont (Inactive) [ 02/Sep/15 ]

This was just moved to 2.9 as the code freeze is approaching I assume.
However this patch and fix for this ticket is very ready for a while now without any issue at all.

I disappointed this patch is going to miss this window as it was ready for a while and it has only green lights and nobody really raised an problem...

Comment by Peter Jones [ 02/Sep/15 ]

Aurelien

It is still possible for this patch to make 2.8. The FixVersion change reflects that code freeze is approaching and the remaining fix is not critical to include. As I understand it, communication has been sent directly to CEA outside of this ticket about this remaining patch. As you have sent me a note directly, let's work out these details on that thread and then re-post hear when we have reached a conclusion.

Thanks

Peter

Comment by Gerrit Updater [ 03/Sep/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15395/
Subject: LU-6766 build: add support for arm64
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 79ec8eaa7b83e522f754bc685110915ad216e548

Comment by Joseph Gmitter (Inactive) [ 03/Sep/15 ]

Landed for 2.8.

Generated at Sat Feb 10 02:03:03 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.