`  Hello,  here is the next iteration of my flexible proportions code. Changes sincev2 are:  * use timer instead of workqueue for triggering period switch  * arm timer only if aging didn't zero out all fractions, re-arm timer when    new event arrives again  * set period length to 3s  Some introduction for first time readers:  The idea of this patch set is to provide code for computing event proportionswhere aging period is not dependent on the number of events happening (sothat aging works well both with fast storage and slow USB sticks in the samesystem).  The basic idea is that we compute proportions as:p_j = (\Sum_{i>=0} x_{i,j}/2^{i+1}) / (\Sum_{i>=0} x_i/2^{i+1})  Where x_{i,j} is j's number of events in i-th last time period and x_i istotal number of events in i-th last time period.  Note that when x_i's are all the same (as is the case with currentproportion code), this expression simplifies to the expression definingcurrent proportions which is:p_j =  \Sum_{i>=0} x_{i,j}/2^{i+1} / t  where t is the lenght of the aging period.  In fact, if we are in the middle of the period, the proportion computed bythe current code is:p_j = (x_0 + \Sum_{i>=1} x_{i,j}/2^{i+1}) / (t' + t)  where t' is total number of events in the running period and t is the lenghtof the aging period. So there is event more similarity.  Similarly as with current proportion code, it is simple to compute updateproportion after several periods have elapsed. For each proportion we storethe numerator of our fraction and the number of period when the proportionwas last updated. In global proportion structure we compute the denominatorof the fraction which is the same for all event types. So catch up with missedperiods boils down to shifting the numerator by the number of missed periodsand that's it. For more details, please see the code.  I've also run a few tests (I've created a userspace wrapper to allow me torun proportion code in userpace and arbitrarily generate events for it) tocompare the behavior of old and new code. You can see them athttp://beta.suse.com/private/jack/flex_proportions/ In all the tests new codeshowed faster convergence to current event proportions (I tried torealistically set period_shift for fixed proportions).  Also in the last testwe see that if period_shift is decreased, then current proportions become moresensitive to short term fluctuations in event rate so just decreasingperiod_shift isn't a good solution to slower convergence. If anyone has otheridea what to try, I can do that - it should be simple enough to implement inmy testing tool.								Honza`