| Thread Tools | Search this thread |
|---|
Dmitriy Vyukov
| May 3, 2009 6:36 AM PDT _tm_release() in STM Compiler/ABI | ||||
I had some conversations with Serge Preis regarding "partial commits" and "partly overlapping transactions" which are intended to increase STM scalability for manipulations on linked-lists, trees, etc. Following proposal is a reincarnation of those ideas. It's inspired by (directly borrowed from) AMD's ASF proposal (http://developer.amd.com/cpu/ASF/Pages/default.aspx). They propose a nice way to aviod read-set explosion. The idea is to add _tm_release() function into STM Compiler and/or _ITM_Release() function into STM ABI. Inclusion into STM ABI has more preference since allows future support in STM compiler[s]. The function is intended solely for optimization, thus may be implemented as a no-op in run-time and not used/exposed by compiler. The semantics of the function is that it [optionally] releases single memory location from a read-set. If indicated memory location is in the write-set then function makes no action. The idea behind is that if some memory location is used only to locate and acquire another memory location, then the former mamory location may be released from the read-set as soon as the latter memory location is acquired. Holding only the lattter memory location in the read-set must be enough to ensure user-level consistency. Though verification of the previuous statement is on a user's conscience (incorrect usage of the function may sacrifice correctness). Here is a sketch of the iteration over linked-list (when node is removed from the list it's links must be zeroized): node* cur, next, prev; ... next = _tm_read(cur->next); _tm_release(prev); prev = cur; cur = next; ... So, regardless of the size of the list we are always holding no more than 3 nodes in the read-set. The trick can be applied to trees as well. The ultimate goal is to keep size of the read-set constant. | |||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
| 8470 users have contributed to 31601 threads and 100640 posts to date. |
|---|
| In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s). In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d Please welcome our newest member kopernikus |