analysis of polling in systemtap

Martin Hunt hunt@redhat.com
Mon Dec 19 20:27:00 GMT 2005


On Fri, 2005-12-16 at 15:18 -0500, Mathieu Desnoyers wrote:

> You could also keep two arrays for your data. Your poller would first atomically
> switch the pointer to the "empty" array before doing its sorting of the "full"
> array. Once the pointer is changed, just wait until every writer to the "full"
> array has finished (you might want to use a small lock for this, or RCU of your
> timer can wait (if it's a thread)) and then play freely with your data.

This is a good idea for maps.  But there is a problem of how the
translator determines when it should be done. If the maps are not
cleared in the timer probes, we don't want this. And it only applies to
maps, not pmaps. 

There is a tradeoff here. Additional accuracy during polling of maps vs
additional memory and complexity. It may not be worth it. Timer events
that print data then clear are probably only used in situations where
high accuracy isn't necessary.

Martin





More information about the Systemtap mailing list