-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
kernel unaligned access on sparc64 #7642
Comments
With advice from Andreas Dilger on the zfs-devel mailing list, I opened this ticket. Also, his suggestion to work around this problem was successful for me. The following change to and near SA_COPY_DATA in
The post from the thread where this was discussed, including Andreas' note that the above is not likely the best place for this fix, is http://list.zfsonlinux.org/pipermail/zfs-devel/2018-June/000169.html. |
Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#7642
@cross and @adilger thanks for doing all the leg work on this. I've opened #7684 with a proposed fix for review which relies on |
@behlendorf can do. I'm rebuilding an unmodified source of Debian's zfs-0.7.9 now, will install that and confirm I can reproduce the original error. Then I'll apply the diff in that commit and verify it's gone away. Will report back here when I have results. Hopefully this weekend. |
I have applied the patch in that commit, at least most of it. Given Debian packaging and DKMS and other things, it didn't apply whole-hog. But, three out of four files patched in multiple trees, and certainly the piece to modules/zfs/sa.c was enough to remove the unaligned access warnings for me on my sparc. If you've tested it on other platforms which should have |
@cross thanks for making to time to get this verified this on sparc. I'll get this merged since it has been tested on the other relevant platforms. |
Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7642 Closes openzfs#7684
Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7642 Closes openzfs#7684
Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7642 Closes openzfs#7684
Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7642 Closes openzfs#7684
System information
Describe the problem you're observing
When accessing nfs filesystems on my sparc64 Debian system, I see periodic messages from the kernel:
Describe how to reproduce the problem
Install ZFS on a sparc64 Linux system, perform reads/writes on ZFS filesystems.
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: