Subject: kern/9423: Cleanup/consolidation of MAXSLP
To: None <gnats-bugs@gnats.netbsd.org>
From: None <erik@mediator.uni-c.dk>
List: netbsd-bugs
Date: 02/15/2000 13:05:34
>Number:         9423
>Category:       kern
>Synopsis:       Cleanup/consolidation of MAXSLP
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 15 13:03:00 2000
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 15 Feb 2000
>Environment:
	
System: NetBSD erik-be.uni-c.dk 1.4S NetBSD 1.4S (ERIKBE) #347: Mon Feb 14 07:51:33 MET 2000 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386


>Description:
	Recently (while hunting something else) I discovered that all NetBSD ports
	define MAXSLP in arch/<port>/include/vmparam.h in the following way:


	/*
	 * The time for a process to be blocked before being very swappable.
         * This is a number of seconds which the system takes as being a non-trivial
	 * amount of real time.  You probably shouldn't change this;
	 * it is used in subtle ways (fractions and multiples of it are, that is, like
	 * half of a ``long time'', almost a long time, etc.)
	 * It is related to human patience and other factors which don't really
	 * change over time.
	*/

	#define MAXSLP          20

	The only use of MAXSLP in the kernel is to initialize maxslp in uvm/uvm_meter.c,
	and maxslp is only used in that file and in uvm_glue.c.

	The comment cited above is not entirely correct, as maxslp is used in straight
	comparisons, and in one case it is halved, but no other fractions, multiples,
	or "almost"s.

>How-To-Repeat:
>Fix:
	Move the definition of MAXSLP into a MI header file, possibly <uvm/???.h>
	and possibly update the comment -- then delete all the identicatl definitions
	from all the MD vmparam.h's (more than 20 of them).

	best regards
	Erik Bertelsen
>Audit-Trail:
>Unformatted: