Skip to content

Commit

Permalink
memory benchmark: use local memory as default operation
Browse files Browse the repository at this point in the history
During several CPUs writing to a small memory block(Ex, 1K), the CPUs
need to invalid CPU cache and trigger cache-to-cache synchronous
communication. It's a little difficult to find the root cause of this
scenario.

Use local memory to avoid this case, make it easy to use.

Signed-off-by: zhenwei pi <[email protected]>
  • Loading branch information
pizhenwei committed Jun 9, 2021
1 parent c019723 commit 4ff101e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/memory/sb_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static sb_test_t memory_test =

static ssize_t memory_block_size;
static long long memory_total_size;
static unsigned int memory_scope;
static unsigned int memory_scope = SB_MEM_SCOPE_LOCAL;
static unsigned int memory_oper;
static unsigned int memory_access_rnd;
#ifdef HAVE_LARGE_PAGES
Expand Down

0 comments on commit 4ff101e

Please sign in to comment.