Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21601 )

Change subject: KUDU-613: SLRU Cache Benchmark
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21601/2/src/kudu/util/cache-bench.cc
File src/kudu/util/cache-bench.cc:

http://gerrit.cloudera.org:8080/#/c/21601/2/src/kudu/util/cache-bench.cc@193
PS2, Line 193: often.exchange(!often)
> The idea was to have each thread either performing one of the two behaviors
I guess ASAN issued warnings because there was an issue with updating the index 
in the main thread and the spawn thread accessing the value, since everything 
was passed by reference to the thread (because of the "[&]" notation).

To address that, all you need to do is to either copy the boolean value of (i % 
2 == 0) into a local variable and pass that by value, or pass index 'i' itself 
by value to each of the threads spawned.

Please simplify the code as described above and get rid of the 'often' atomic 
there -- it's too confusing to see it there.

Once it's done, please re-run the benchmarks and update the results in the 
commit message.  It seems some non-deterministic factor was present in flipping 
the atomic by threads being spawned, at least it would be great to have some 
results when it's clear how many actors of what type were present to produce 
such results.

Thanks!



--
To view, visit http://gerrit.cloudera.org:8080/21601
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c128a9f047497373ce3e740056eaa89a352261b
Gerrit-Change-Number: 21601
Gerrit-PatchSet: 2
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Comment-Date: Tue, 13 Aug 2024 18:04:12 +0000
Gerrit-HasComments: Yes

Reply via email to