The following reply was made to PR kern/187668; it has been noted by GNATS.

From: [email protected] (dfilter service)
To: [email protected]
Cc:  
Subject: Re: kern/187668: commit references a PR
Date: Wed, 23 Apr 2014 12:46:31 +0000 (UTC)

 Author: mav
 Date: Wed Apr 23 12:46:27 2014
 New Revision: 264821
 URL: http://svnweb.freebsd.org/changeset/base/264821
 
 Log:
   MFC r264550:
   Fix VIRTUAL and PROF interval timers for short intervals, broken at r247903.
   
   Due to the way those timers are implemented, we can't handle very short
   intervals.  In addition to that mentioned patch caused math overflows
   for short intervals.  To avoid that round those intervals to 1 tick.
   
   PR:          kern/187668
 
 Modified:
   stable/10/sys/kern/kern_time.c
 Directory Properties:
   stable/10/   (props changed)
 
 Modified: stable/10/sys/kern/kern_time.c
 ==============================================================================
 --- stable/10/sys/kern/kern_time.c     Wed Apr 23 12:16:36 2014        
(r264820)
 +++ stable/10/sys/kern/kern_time.c     Wed Apr 23 12:46:27 2014        
(r264821)
 @@ -774,6 +774,14 @@ kern_setitimer(struct thread *td, u_int 
                                timevalsub(&oitv->it_value, &ctv);
                }
        } else {
 +              if (aitv->it_interval.tv_sec == 0 &&
 +                  aitv->it_interval.tv_usec != 0 &&
 +                  aitv->it_interval.tv_usec < tick)
 +                      aitv->it_interval.tv_usec = tick;
 +              if (aitv->it_value.tv_sec == 0 &&
 +                  aitv->it_value.tv_usec != 0 &&
 +                  aitv->it_value.tv_usec < tick)
 +                      aitv->it_value.tv_usec = tick;
                PROC_SLOCK(p);
                *oitv = p->p_stats->p_timer[which];
                p->p_stats->p_timer[which] = *aitv;
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "[email protected]"
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to