Set CACHE_LINE_SIZE for s390, PPC, ARM64
Summary: Closes https://github.com/facebook/rocksdb/pull/2579 Differential Revision: D5427667 Pulled By: maysamyabandeh fbshipit-source-id: cd0b076aa0cd38d3554516f01723c548713ece61
This commit is contained in:
parent
67510eeff3
commit
ccf5f08f88
@ -186,7 +186,13 @@ typedef pthread_once_t OnceType;
|
|||||||
extern void InitOnce(OnceType* once, void (*initializer)());
|
extern void InitOnce(OnceType* once, void (*initializer)());
|
||||||
|
|
||||||
#ifndef CACHE_LINE_SIZE
|
#ifndef CACHE_LINE_SIZE
|
||||||
#define CACHE_LINE_SIZE 64U
|
#if defined(__s390__)
|
||||||
|
#define CACHE_LINE_SIZE 256U
|
||||||
|
#elif defined(__powerpc__) || defined(__aarch64__)
|
||||||
|
#define CACHE_LINE_SIZE 128U
|
||||||
|
#else
|
||||||
|
#define CACHE_LINE_SIZE 64U
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PREFETCH(addr, rw, locality) __builtin_prefetch(addr, rw, locality)
|
#define PREFETCH(addr, rw, locality) __builtin_prefetch(addr, rw, locality)
|
||||||
|
Loading…
Reference in New Issue
Block a user