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


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




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