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]

RE: analysis of polling in systemtap


Frank Ch. Eigler wrote:
> hunt wrote:
>> [...] The real problem I want to solve is how to better handle timer
>> events that print data and then clear a pmap. Because clearing a
>> large pmap can be expensive and could be done for free while
>> aggregating it.
> 
> This idiom (iterating then clearing an array) may well be frequent
> enough to justify yet another addition to the "foreach" syntax, say a
> "delete" keyword somewhere in the mix.  Before long, we'll get to the
> Common Lisp LOOP macro.
> 
> - FChE

Perhaps it's the wrong approach to invent a new syntax for everything
that users might want to do atomically on an array.  Can we instead
allow the user to explicitly lock/release variables?

This would give the user a lot of power over synchronization, but it
should still be safe.  We already have dynamic deadlock detection, so
that's ok.  It should be easy to add a dynamic check to make sure that
any locks acquired are released before the probe exits.  (This may even
be possible to check statically, though much harder.)  So the worst a
user could do with a buggy script is deadlock themselves and terminate;
the system remains unharmed.

We can still provide syntax to optimize some things, like the "aggregate
and clear" case that Martin describes, but it seems to me that we need a
more general functionality as well.


Josh


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