git: dsched_fq - Avoid int64 overflow on total_budget

Alex Hornung alexh at crater.dragonflybsd.org
Thu Apr 15 13:26:42 PDT 2010


commit 0746e1609bd535bbea4d3f6037080d32813e0265
Author: Alex Hornung <ahornung at gmail.com>
Date:   Fri Apr 9 21:59:39 2010 +0000

    dsched_fq - Avoid int64 overflow on total_budget
    
    * Avoid an int64 overflow when calculating the total disk budget by
      losing bits of precision if needed.
    
    * Note that this might not quite fix the issue yet, as there is one
      other place where the int64 overflow can happen, although it is less
      likely.
    
    * While here, make the rebalancing happen every 0.5s instead of every
      1s, effectively reducing the chance of int64 overflows.
    
    Reported-by: Antonio Huete (tuxillo@)

Summary of changes:
 sys/dsched/fq/dsched_fq_core.c |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0746e1609bd535bbea4d3f6037080d32813e0265


-- 
DragonFly BSD source repository





More information about the Commits mailing list