Skip to content

Commit

Permalink
Merge pull request #133 from grooverdan/power-crc32
Browse files Browse the repository at this point in the history
MDEV-9288: Use POWER8 accelerated crc32
  • Loading branch information
Jan Lindström committed Dec 16, 2015
2 parents 1ac6640 + 60f09cd commit 953d568
Show file tree
Hide file tree
Showing 17 changed files with 3,592 additions and 6 deletions.
5 changes: 5 additions & 0 deletions extra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,15 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)

# We use the InnoDB code directly in case the code changes.
ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM")

enable_language(ASM)

SET(INNOBASE_SOURCES
../storage/innobase/buf/buf0checksum.cc
../storage/innobase/ut/ut0crc32.cc
../storage/innobase/ut/ut0ut.cc
../storage/innobase/ut/crc32_power8/crc32.S
../storage/innobase/ut/crc32_power8/crc32_wrapper.c
../storage/innobase/page/page0zip.cc
)

Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ IF(MSVC)
PROPERTIES COMPILE_FLAGS "/wd4003")
ENDIF()

enable_language(ASM)

SET(INNOBASE_SOURCES
api/api0api.cc
Expand Down Expand Up @@ -477,6 +478,8 @@ SET(INNOBASE_SOURCES
ut/ut0bh.cc
ut/ut0byte.cc
ut/ut0crc32.cc
ut/crc32_power8/crc32.S
ut/crc32_power8/crc32_wrapper.c
ut/ut0dbg.cc
ut/ut0list.cc
ut/ut0mem.cc
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/include/ut0crc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ typedef ib_uint32_t (*ib_ut_crc32_t)(const byte* ptr, ulint len);
extern ib_ut_crc32_t ut_crc32;

extern bool ut_crc32_sse2_enabled;
extern bool ut_crc32_power8_enabled;

#endif /* ut0crc32_h */
10 changes: 7 additions & 3 deletions storage/innobase/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1869,9 +1869,13 @@ innobase_start_or_create_for_mysql(void)

srv_boot();

ib_logf(IB_LOG_LEVEL_INFO,
"%s CPU crc32 instructions",
ut_crc32_sse2_enabled ? "Using" : "Not using");
if (ut_crc32_sse2_enabled) {
ib_logf(IB_LOG_LEVEL_INFO, "Using SSE crc32 instructions");
} else if (ut_crc32_power8_enabled) {
ib_logf(IB_LOG_LEVEL_INFO, "Using POWER8 crc32 instructions");
} else {
ib_logf(IB_LOG_LEVEL_INFO, "Using generic crc32 instructions");
}

if (!srv_read_only_mode) {

Expand Down
Loading

0 comments on commit 953d568

Please sign in to comment.