summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@dator8>2010-10-27 20:35:01 +0200
committerMikael Ronstrom <mikael@dator8>2010-10-27 20:35:01 +0200
commitdea3152c92344abac1b7a08a8765a802a5dcdce2 (patch)
tree62495a264a7dbac7240bdfe368d35789985db424 /include
parent4dff0296f402ff4fa6ee69e0411b8136eb5cd816 (diff)
downloadmariadb-git-dea3152c92344abac1b7a08a8765a802a5dcdce2.tar.gz
Added more comments to THD wait service
Diffstat (limited to 'include')
-rw-r--r--include/mysql/service_thd_wait.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/mysql/service_thd_wait.h b/include/mysql/service_thd_wait.h
index 188aa0ab126..6f91c0acf43 100644
--- a/include/mysql/service_thd_wait.h
+++ b/include/mysql/service_thd_wait.h
@@ -50,6 +50,19 @@
extern "C" {
#endif
+/*
+ One should only report wait events that could potentially block for a
+ long time. A mutex wait is too short of an event to report. The reason
+ is that an event which is reported leads to a new thread starts
+ executing a query and this has a negative impact of usage of CPU caches
+ and thus the expected gain of starting a new thread must be higher than
+ the expected cost of lost performance due to starting a new thread.
+
+ Good examples of events that should be reported are waiting for row locks
+ that could easily be for many milliseconds or even seconds and the same
+ holds true for global read locks, table locks and other meta data locks.
+ Another event of interest is going to sleep for an extended time.
+*/
typedef enum _thd_wait_type_e {
THD_WAIT_SLEEP= 1,
THD_WAIT_DISKIO= 2,