public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/10741] Merge tandem locks
       [not found] <bug-10741-6586@http.sourceware.org/bugzilla/>
@ 2020-07-23 15:40 ` fche at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2020-07-23 15:40 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=10741

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=26296

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/10741] Merge tandem locks
  2009-10-06 20:20 [Bug translator/10741] New: " jistone at redhat dot com
  2009-11-20 19:43 ` [Bug translator/10741] " fche at redhat dot com
  2009-11-20 21:25 ` jistone at redhat dot com
@ 2009-11-20 21:28 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2009-11-20 21:28 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-11-20 21:28 -------
(In reply to comment #2)
> One concern is that we could lose atomicity this way.  

Clearly we must not risk that.

> If two probes share a
> read lock, and one wants to upgrade to write, it could timeout in waiting for
> the other to release.

We could preclude this situation by applying this optimization only
when we can prove that the code between the initial read-lock and
the later read-write-lock is all side-effect-free.  That way a timeout
on the read-write lock would be equivalent to an ordinary skip.


-- 


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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/10741] Merge tandem locks
  2009-10-06 20:20 [Bug translator/10741] New: " jistone at redhat dot com
  2009-11-20 19:43 ` [Bug translator/10741] " fche at redhat dot com
@ 2009-11-20 21:25 ` jistone at redhat dot com
  2009-11-20 21:28 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jistone at redhat dot com @ 2009-11-20 21:25 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-11-20 21:25 -------
(In reply to comment #1)
> archiving irc yak on topic:
> 
> fche anyway, I was thinking that another locking-related optimization could be
> done by escalating read-to-write locks within probe handlers

One concern is that we could lose atomicity this way.  If two probes share a
read lock, and one wants to upgrade to write, it could timeout in waiting for
the other to release.  Normally we can determine such skips on probe entry, so
the handler is all or nothing.

Or can we just allow the upgrade to block forever, since the shared probes are
bounded by MAXACTION?

-- 


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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/10741] Merge tandem locks
  2009-10-06 20:20 [Bug translator/10741] New: " jistone at redhat dot com
@ 2009-11-20 19:43 ` fche at redhat dot com
  2009-11-20 21:25 ` jistone at redhat dot com
  2009-11-20 21:28 ` fche at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2009-11-20 19:43 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-11-20 19:43 -------
archiving irc yak on topic:

fche anyway, I was thinking that another locking-related optimization could be
done by escalating read-to-write locks within probe handlers, suchly:
fche global foo       probe bar { if (foo) { foo++ } }
fche so the idea would be to initially read-lock foo, and only later upgrade it
to a write-lock
fche the theory being that some / many (??) probes start with some condition
checking, and some (???) of that time, a write does not actually end up happening
jistone hmm
jistone have to think about whether that could induce any lock inversion
fche oh yeah, lots of complications
fche just wanted to brain-dump here FWIW
jistone probe foo { if (++a) ++b } probe bar { if (++b) ++a } global a,b
jistone does the initial read lock solve that?  I think it might...


-- 


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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-23 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10741-6586@http.sourceware.org/bugzilla/>
2020-07-23 15:40 ` [Bug translator/10741] Merge tandem locks fche at redhat dot com
2009-10-06 20:20 [Bug translator/10741] New: " jistone at redhat dot com
2009-11-20 19:43 ` [Bug translator/10741] " fche at redhat dot com
2009-11-20 21:25 ` jistone at redhat dot com
2009-11-20 21:28 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).