Reduce SMP contention on TT

Move TT object away from heavy write accessed NodesSincePoll
and also, inside TT isolate the heavy accessed writes variable.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-06-13 11:13:09 +01:00
parent 8bec65029d
commit 630fda2e2c
2 changed files with 10 additions and 4 deletions

View File

@@ -92,7 +92,13 @@ public:
private:
inline TTEntry* first_entry(const Key posKey) const;
unsigned size, writes;
// Be sure 'writes' is at least one cacheline away
// from read only variables.
unsigned char pad_before[64 - sizeof(unsigned)];
unsigned writes; // heavy SMP read/write access here
unsigned char pad_after[64];
unsigned size;
TTEntry* entries;
uint8_t generation;
};