Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

HLE examples

Alexander_Herz
Beginner
435 Views

Are there any examples codes that show an actual speedup using HLE (or tbb::speculative_spin_mutex)?

I have some experimental code running on a Haswell where the HLE flag is set when checked with cpuid, so I suppose HLE is enabled (I read that the feature HLE was disabled because of some problems but I don't think my target machine has the update requird to disbale the feature but IÄm not sure..how do I check if HLE is really enabled??)

The code uses tbb::speculative_spin_mutex to protect a data structure where inside the lock very long read operations are peformed (and virtually 0 write operations). I would expect a decent speedup (and aparently it is possible to achieve that as shown by http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CDYQFjAC&url=http%3A%2F%2Fmcg.cs.tau.ac.il%2Fpapers%2Famir-levy-msc.pdf&ei=u1eRVKbKMaXTygPe84DABg&usg=AFQjCNFd7NMF0LslT2XeyjywVQo-kQc25w&sig2=qkGMv9yPG0ZOQ_XQh3mq0g&bvm=bv.81828268,bs.1,d.bGQ).

I haven't found any actual code on the net or in tbb that successfully uses HLE. Quite possible there is a problem in my code causing HLE to fail so I would like to run an example that is known to work.

Thx,

Alex

0 Kudos
1 Reply
Alexander_Herz
Beginner
435 Views

Ok, I've narrowed it down a little bit.

Running perf I see that 100% of my transactions are abborted.

The abborts caused by CAP-READ/CAP-WRITE are ok, but what is NEITHER which causes most of my abborts???

Samples: 233  of event 'cpu/el-abort/pp', Event count (approx.): 233                                                           +   0,86%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL NEITHER                        177362
+   0,86%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL NEITHER                        73260
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-READ                 18676
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                16558
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                14684
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                14455
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                14077
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                13105
+   0,43%  [.] uBinTree::addSlow_int_int_uBinTree(int, int)  EL ASYNC CAP-WRITE                12788

thx,

Alex

0 Kudos
Reply