This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/2056] avoid locking within foreach iteration for maps & pmaps
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 5 Jan 2006 22:08:45 -0000
- Subject: [Bug translator/2056] avoid locking within foreach iteration for maps & pmaps
- References: <20051214214948.2056.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.