Browse Source

MDEV-6533 - MySQL Bug#72718 - CACHE_LINE_SIZE in innodb should be 128 on POWER

This patch is suggested by Stewart Smith.
Define CACHE_LINE_SIZE to 128 on POWER.
Sergey Vojtovich 11 years ago
parent
commit
5e1fad8512
  1. 4
      storage/innobase/include/ut0counter.h
  2. 4
      storage/xtradb/include/ut0counter.h
  3. 4
      storage/xtradb/srv/srv0srv.cc

4
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 ib_counter_t */
#define IB_N_SLOTS 64

4
storage/xtradb/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 ib_counter_t */
#define IB_N_SLOTS 64

4
storage/xtradb/srv/srv0srv.cc

@ -504,7 +504,11 @@ UNIV_INTERN ulint srv_available_undo_logs = 0;
/* Ensure status variables are on separate cache lines */
#ifdef __powerpc__
#define CACHE_LINE_SIZE 128
#else
#define CACHE_LINE_SIZE 64
#endif
#define CACHE_ALIGNED __attribute__ ((aligned (CACHE_LINE_SIZE)))
UNIV_INTERN byte

Loading…
Cancel
Save