Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2193 > unrolled thread
| Started by | aminer <aminer@toto.net> |
|---|---|
| First post | 2014-04-19 19:47 -0700 |
| Last post | 2014-04-19 19:47 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.programming.threads
Please read the following.... aminer <aminer@toto.net> - 2014-04-19 19:47 -0700
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2014-04-19 19:47 -0700 |
| Subject | Please read the following.... |
| Message-ID | <liv1u5$fl1$1@news.albasani.net> |
Hello, I have discovered a problem today, when you are using a Ticketspinlock or an array based lock, don't use the "pause" asm instruction only when you are spinning waiting for the lock or don't use a proportional backoff using the "pause" asm instruction only when you are spinning waiting for the lock, cause this can lead to a big problem that look like a lock convoy, if you start more threads than cores for example the system will switch between the threads and giving each thread it's quantum time even if the threads don't enter the Enter() method of the lock, and this will lead to a big problem , this can slow by much the threads entering the lock, this will look like a lock convoy and this is not acceptable, so the solution is to use a sleep(0) when you are spinning waiting for the lock inside the Enter() method of the lock, but i have noticed that sleep(0) lowers a lot the throughput... so this is very sad ! so from now on becarefull of this big problem ! Thank you, Amine Moulay Ramdane.
Back to top | Article view | comp.programming.threads
csiph-web