Subject: kern/3805: unused variable pageproc and bclnlist
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 06/28/1997 23:45:09
>Number:         3805
>Category:       kern
>Synopsis:       unused variable pageproc and bclnlist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 28 08:05:01 1997
>Last-Modified:
>Originator:     enami tsugutomo
>Organization:
>Release:        NetBSD-current 1977 June 26
>Environment:
System: NetBSD red-glasses.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (RED_GLASSES) #81: Sat Jun 28 23:08:05 JST 1997 enami@red-glasses.enami.ba2.so-net.or.jp:/usr/src/sys/arch/alpha/compile/RED_GLASSES alpha


>Description:
	There is unused variable pageproc and bclnlist in kernel.
>How-To-Repeat:
	Grep all kernel source by pageproc and bclnlist.  No one seems to
	assign bclnlist, and no one is sleeping waiting pageproc.
>Fix:
	I applied following patch with my NetBSD/alpha box, build and running
	kernel.  But there seems no problem.

Index: kern/init_main.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/kern/init_main.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 init_main.c
--- init_main.c	1997/06/15 03:10:38	1.1.1.11
+++ init_main.c	1997/06/28 14:40:52
@@ -102,7 +102,7 @@
 struct	plimit limit0;
 struct	vmspace vmspace0;
 struct	proc *curproc = &proc0;
-struct	proc *initproc, *pageproc;
+struct	proc *initproc;
 
 int	cmask = CMASK;
 extern	struct user *proc0paddr;
@@ -550,7 +550,6 @@
 	/*
 	 * Now in process 2.
 	 */
-	pageproc = p;
 	p->p_flag |= P_INMEM | P_SYSTEM;	/* XXX */
 	bcopy("pagedaemon", curproc->p_comm, sizeof ("pagedaemon"));
 	vm_pageout();
Index: kern/kern_synch.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/kern/kern_synch.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 kern_synch.c
--- kern_synch.c	1997/05/08 13:13:46	1.1.1.4
+++ kern_synch.c	1997/06/28 14:40:52
@@ -223,8 +223,6 @@
 		splx(s);
 	}
 	vmmeter();
-	if (bclnlist != NULL)
-		wakeup((caddr_t)pageproc);
 	timeout(schedcpu, (void *)0, hz);
 }
 
Index: sys/buf.h
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/sys/buf.h,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 buf.h
--- buf.h	1997/04/13 16:16:21	1.1.1.3
+++ buf.h	1997/06/28 14:40:52
@@ -157,7 +157,6 @@
 struct	buf *swbuf;		/* Swap I/O buffer headers. */
 int	nswbuf;			/* Number of swap I/O buffer headers. */
 struct	buf bswlist;		/* Head of swap I/O buffer headers free list. */
-struct	buf *bclnlist;		/* Head of cleaned page list. */
 
 __BEGIN_DECLS
 void	allocbuf __P((struct buf *, int));
Index: sys/proc.h
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/sys/proc.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 proc.h
--- proc.h	1997/04/28 23:19:25	1.1.1.4
+++ proc.h	1997/06/28 14:40:52
@@ -280,7 +280,7 @@
 LIST_HEAD(proclist, proc);
 extern struct proclist allproc;		/* List of all processes. */
 extern struct proclist zombproc;	/* List of zombie processes. */
-struct proc *initproc, *pageproc;	/* Process slots for init, pager. */
+struct proc *initproc;			/* Process slots for init. */
 
 #define	NQS	32			/* 32 run queues. */
 int	whichqs;			/* Bit mask summary of non-empty Q's. */
>Audit-Trail:
>Unformatted: