[BACK]Return to subr_pool.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/subr_pool.c between version 1.30 and 1.31

version 1.30, 1999/08/29 00:26:01 version 1.31, 2000/02/14 19:28:19
Line 449  pool_init(pp, size, align, ioff, flags, 
Line 449  pool_init(pp, size, align, ioff, flags, 
         pp->pr_nout = 0;          pp->pr_nout = 0;
         pp->pr_hardlimit = UINT_MAX;          pp->pr_hardlimit = UINT_MAX;
         pp->pr_hardlimit_warning = NULL;          pp->pr_hardlimit_warning = NULL;
         pp->pr_hardlimit_ratecap = 0;          pp->pr_hardlimit_ratecap.tv_sec = 0;
         memset(&pp->pr_hardlimit_warning_last, 0,          pp->pr_hardlimit_ratecap.tv_usec = 0;
             sizeof(pp->pr_hardlimit_warning_last));          pp->pr_hardlimit_warning_last.tv_sec = 0;
           pp->pr_hardlimit_warning_last.tv_usec = 0;
   
         /*          /*
          * Decide whether to put the page header off page to avoid           * Decide whether to put the page header off page to avoid
Line 620  _pool_get(pp, flags, file, line)
Line 621  _pool_get(pp, flags, file, line)
                         pr_enter(pp, file, line);                          pr_enter(pp, file, line);
                         goto startover;                          goto startover;
                 }                  }
                 if (pp->pr_hardlimit_warning != NULL) {  
                         /*                  /*
                          * Log a message that the hard limit has been hit.                   * Log a message that the hard limit has been hit.
                          */                   */
                         struct timeval curtime, logdiff;                  if (pp->pr_hardlimit_warning != NULL &&
                         int s = splclock();                      ratecheck(&pp->pr_hardlimit_warning_last,
                         curtime = mono_time;                                &pp->pr_hardlimit_ratecap))
                         splx(s);                          log(LOG_ERR, "%s\n", pp->pr_hardlimit_warning);
                         timersub(&curtime, &pp->pr_hardlimit_warning_last,  
                             &logdiff);  
                         if (logdiff.tv_sec >= pp->pr_hardlimit_ratecap) {  
                                 pp->pr_hardlimit_warning_last = curtime;  
                                 log(LOG_ERR, "%s\n", pp->pr_hardlimit_warning);  
                         }  
                 }  
   
                 if (flags & PR_URGENT)                  if (flags & PR_URGENT)
                         panic("pool_get: urgent");                          panic("pool_get: urgent");
Line 1182  pool_sethardlimit(pp, n, warnmess, ratec
Line 1176  pool_sethardlimit(pp, n, warnmess, ratec
   
         pp->pr_hardlimit = n;          pp->pr_hardlimit = n;
         pp->pr_hardlimit_warning = warnmess;          pp->pr_hardlimit_warning = warnmess;
         pp->pr_hardlimit_ratecap = ratecap;          pp->pr_hardlimit_ratecap.tv_sec = ratecap;
         memset(&pp->pr_hardlimit_warning_last, 0,          pp->pr_hardlimit_warning_last.tv_sec = 0;
             sizeof(pp->pr_hardlimit_warning_last));          pp->pr_hardlimit_warning_last.tv_usec = 0;
   
         /*          /*
          * In-line version of pool_sethiwat(), because we don't want to           * In-line version of pool_sethiwat(), because we don't want to

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

CVSweb <webmaster@jp.NetBSD.org>