You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/02/11 00:02:46 UTC

[GitHub] [trafficserver] ywkaras commented on a change in pull request #7452: Change Debug, add TSFDbg macros for debug output, faster checking to see if enabled.

ywkaras commented on a change in pull request #7452:
URL: https://github.com/apache/trafficserver/pull/7452#discussion_r574172417



##########
File path: include/tscore/OneWriterMultiReader.h
##########
@@ -0,0 +1,225 @@
+/** @file
+

Review comment:
       In the scenario I tested, I saw more than double the requests per second using my shared mutex implementation.
   
   But, in truth, if we go with the second option (where each Debug() call has an instance of DbgCtl, even if it has to create it itself), it will be moot, the lock will almost never need to be locked.
   
   Aside from better performance, my shared mutex has logic to prevent writer starvation.  But it's not recursive.
   
   It was actually a mistake that I implemented my own shared mutex, I didn't realize pthreads (and C++17) had one.  But looking like a lucky accident.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org