Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2000 11:33:44 -0700 (PDT)
From:      Brian Feldman <green@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_synch.c src/sys/sys param.h proc.h resource.h
Message-ID:  <200004301833.LAA32559@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
green       2000/04/30 11:33:44 PDT

  Modified files:
    sys/kern             kern_synch.c 
    sys/sys              param.h proc.h resource.h 
  Log:
  Change the scheduler to actually respect the PUSER barrier.  It's been
  wrong for many years that negative niceness would lower the priority
  of a process below PUSER, and once below PUSER, there were conditionals
  in the code that are required to test for whether a process was in
  the kernel which would break.
  
  The breakage could (and did) cause lock-ups, basically nothing else
  but the least nice program being able to run in some conditions.  The
  algorithm which adjusts the priority now subtracts PRIO_MIN to do
  things properly, and the ESTCPULIM() algorithm was updated to use
  PRIO_TOTAL (PRIO_MAX - PRIO_MIN) to calculate the estcpu.
  
  NICE_WEIGHT is now 1 to accomodate the full range of priorities better
  (a -20 process with full CPU time has the priority of a +0 process with
  no CPU time).  There are now 20 queues (exactly; 80 priorities) for
  use in user processes' scheduling, and PUSER has been lowered to 48
  to accomplish this.
  
  This means, to the user, that things will be scheduled more correctly
  (noticeable), there is no lock-up anymore WRT a niced -20 process
  never releasing the CPU time for other processes.  In this fair system,
  tsleep()ed < PUSER processes now will get the proper higher priority
  than priority >= PUSER user processes.
  
  The detective work of this was done by me, along with part of the
  solution.  Luoqi Chen has provided most of the solution, and really
  helped me understand what was happening better, to boot :)
  
  Submitted by:   luoqi
  Concept reviewed by:    bde
  
  Revision  Changes    Path
  1.90      +2 -2      src/sys/kern/kern_synch.c
  1.65      +2 -2      src/sys/sys/param.h
  1.103     +5 -5      src/sys/sys/proc.h
  1.13      +4 -1      src/sys/sys/resource.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004301833.LAA32559>