Bug #72718 CACHE_LINE_SIZE in innodb should be 128 on POWER
Submitted: 22 May 2014 6:49 Modified: 10 Oct 2014 18:51
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6, 5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: PowerPC

[22 May 2014 6:49] Stewart Smith
Description:
Through the cunning use of grep, I found that there is a CACHE_LINE_SIZE define in ut0counter.h that is used to ensure some things don't share cachelines.

The value of 64 is accurate for x86 AFAIK, but it should be 128 on power.

How to repeat:
grep! some in depth performance analysis

Suggested fix:
I'll attach the patch:

Index: mysql-5.6.17/storage/innobase/include/ut0counter.h
===================================================================
--- mysql-5.6.17.orig/storage/innobase/include/ut0counter.h
+++ mysql-5.6.17/storage/innobase/include/ut0counter.h
@@ -32,7 +32,11 @@ Created 2012/04/12 by Sunny Bains
 #include "os0thread.h"
 
 /** CPU cache line size */
+#ifdef __powerpc__
+#define CACHE_LINE_SIZE		128
+#else
 #define CACHE_LINE_SIZE		64
+#endif
 
 /** Default number of slots to use in
[22 May 2014 6:58] Stewart Smith
Patch

Attachment: power-cacheline-size.patch (text/x-patch), 579 bytes.

[22 May 2014 8:11] MySQL Verification Team
Hello Stewart,

Thank you for the report and contribution.

Thanks,
Umesh
[17 Sep 2014 2:13] Stewart Smith
any chance of this being merged any time soon?
[10 Oct 2014 18:51] Daniel Price
Fixed as of the 5.7.5 release, and here's the changelog entry:

"CACHE_LINE_SIZE" for PowerPC was changed from 64 bytes to 128 bytes.

Thank you for the bug report.