You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2018/04/19 00:26:17 UTC
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10110
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
KUDU-2378. Fix unaligned loads of int128 from rows
Our row format doesn't ensure any alignment of data. This is usually fine on
x86 where unaligned loads of ints don't need any special instruction and
carry a relatively low performance penalty. However, loads of int128_t may
generate a 'movdqa' (aligned load) instruction which crashes if the
operand is not 16-byte aligned.
This fixes a bunch of spots where we are dereferencing a reinterpret_casted
int and replaces them with new UnalignedLoad<> and UnalignedStore<>
template functions. These use simple reinterpret_cast dereferences for
<=64bit types. For int128_t we use memcpy. The compiler should already
treat memcpy as an intrinsic and this will end up being a single
instruction.
Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Reviewed-on: http://gerrit.cloudera.org:8080/9848
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Grant Henke <gr...@apache.org>
(cherry picked from commit 35940a12aa38dedeff7e932f91448d2562163302)
---
M src/kudu/cfile/bshuf_block.cc
M src/kudu/cfile/bshuf_block.h
M src/kudu/cfile/plain_block.h
M src/kudu/cfile/rle_block.h
M src/kudu/common/partial_row.cc
M src/kudu/common/types.h
M src/kudu/gutil/port.h
M src/kudu/integration-tests/all_types-itest.cc
8 files changed, 93 insertions(+), 45 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/10/10110/1
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/10110 )
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
Patch Set 1:
Yeah it's the old thirdparty issue. Not sure if these were cleared since the fix.
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 20:48:14 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/10110 )
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
Patch Set 1: Verified+1
Marking verified. The failures are due to Jenkins workspace issues.
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Sat, 21 Apr 2018 16:14:58 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10110 )
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
KUDU-2378. Fix unaligned loads of int128 from rows
Our row format doesn't ensure any alignment of data. This is usually fine on
x86 where unaligned loads of ints don't need any special instruction and
carry a relatively low performance penalty. However, loads of int128_t may
generate a 'movdqa' (aligned load) instruction which crashes if the
operand is not 16-byte aligned.
This fixes a bunch of spots where we are dereferencing a reinterpret_casted
int and replaces them with new UnalignedLoad<> and UnalignedStore<>
template functions. These use simple reinterpret_cast dereferences for
<=64bit types. For int128_t we use memcpy. The compiler should already
treat memcpy as an intrinsic and this will end up being a single
instruction.
Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Reviewed-on: http://gerrit.cloudera.org:8080/9848
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Grant Henke <gr...@apache.org>
(cherry picked from commit 35940a12aa38dedeff7e932f91448d2562163302)
Reviewed-on: http://gerrit.cloudera.org:8080/10110
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Grant Henke <gr...@apache.org>
---
M src/kudu/cfile/bshuf_block.cc
M src/kudu/cfile/bshuf_block.h
M src/kudu/cfile/plain_block.h
M src/kudu/cfile/rle_block.h
M src/kudu/common/partial_row.cc
M src/kudu/common/types.h
M src/kudu/gutil/port.h
M src/kudu/integration-tests/all_types-itest.cc
8 files changed, 93 insertions(+), 45 deletions(-)
Approvals:
Todd Lipcon: Looks good to me, approved
Grant Henke: Verified
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/10110 )
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
Patch Set 1: Code-Review+2
Any idea why this isn't building properly? Do we need to clear out the branch-1.7.x build trees or somesuch?
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 19 Apr 2018 20:46:14 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.7.x) KUDU-2378. Fix unaligned loads of int128 from rows
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has removed a vote on this change.
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/10110
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a
Gerrit-Change-Number: 10110
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>