This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/2056] avoid locking within foreach iteration for maps & pmaps


------- Additional Comments From fche at redhat dot com  2006-01-05 22:08 -------
(In reply to comment #4)
> Maybe I'm missing something, but the problem is the writelock.  Why does the
> generated code take a writelock on the pmap when it is reading stats?  [...]

We would hold an exclusive ("write") lock around a pmap iteration in order to
prevent concurrent updates to it.  This is exactly analogous to taking a shared
("read") lock around a scalar foreach.

With the changes of bug #2057, there is now no translator-emitted locking around
accumulation, which may now expose us to this problem.  The translator should
probably do what I originally intended: emit a shared ("read") lock around
accumulation, and rely in no way on spinlocks in the runtime.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2056

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]