dont recalculate load average for EVERY job in the queue
authorRick Adams <rick@ucbvax.Berkeley.EDU>
Mon, 16 Apr 1990 23:06:37 +0000 (15:06 -0800)
committerRick Adams <rick@ucbvax.Berkeley.EDU>
Mon, 16 Apr 1990 23:06:37 +0000 (15:06 -0800)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 5.21

usr/src/usr.sbin/sendmail/src/conf.c

index f1dae4f..39d5622 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     5.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     5.21 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/ioctl.h>
 #endif /* not lint */
 
 # include <sys/ioctl.h>
@@ -410,6 +410,9 @@ struct      nlist Nl[] =
        { 0 },
 };
 
        { 0 },
 };
 
+
+extern int la;
+
 getla()
 {
        static int kmem = -1;
 getla()
 {
        static int kmem = -1;
@@ -457,9 +460,6 @@ bool
 shouldqueue(pri)
        long pri;
 {
 shouldqueue(pri)
        long pri;
 {
-       int la;
-
-       la = getla();
        if (la < QueueLA)
                return (FALSE);
        return (pri > (QueueFactor / (la - QueueLA + 1)));
        if (la < QueueLA)
                return (FALSE);
        return (pri > (QueueFactor / (la - QueueLA + 1)));