Flush caches between writing and verifying test data.

Mostly we write and read large chunks of data which will make it likely
that the data is no longer in the cache when we come to verify it. But
this is not always true, and in any case, we shouldn't rely on it.
This commit is contained in:
Martin Whitaker
2021-12-23 11:00:10 +00:00
parent 11c0c6c2f5
commit d9fee4dcbb
10 changed files with 60 additions and 9 deletions

View File

@@ -78,4 +78,10 @@ testword_t random(int my_vcpu);
*/
void calculate_chunk(testword_t **start, testword_t **end, int my_vcpu, int segment, size_t chunk_align);
/*
* Flushes the CPU caches. If SMP is enabled, synchronises the threads before
* and after issuing the cache flush instruction.
*/
void flush_caches(int my_vcpu);
#endif // TEST_HELPER_H