Date: Tue, 5 Sep 2000 15:11:13 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern init_main.c kern_exec.c kern_exit.c kern_fork.c kern_proc.c kern_prot.c kern_resource.c uipc_socket.c uipc_socket2.c uipc_usrreq.c vfs_aio.c src/sys/sys proc.h resourcevar.h ucred.h Message-ID: <200009052211.PAA70424@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
truckman 2000/09/05 15:11:13 PDT Modified files: sys/kern init_main.c kern_exec.c kern_exit.c kern_fork.c kern_proc.c kern_prot.c kern_resource.c uipc_socket.c uipc_socket2.c uipc_usrreq.c vfs_aio.c sys/sys proc.h resourcevar.h ucred.h Log: Remove uidinfo hash table lookup and maintenance out of chgproccnt() and chgsbsize(), which are called rather frequently and may be called from an interrupt context in the case of chgsbsize(). Instead, do the hash table lookup and maintenance when credentials are changed, which is a lot less frequent. Add pointers to the uidinfo structures to the ucred and pcred structures for fast access. Pass a pointer to the credential to chgproccnt() and chgsbsize() instead of passing the uid. Add a reference count to the uidinfo structure and use it to decide when to free the structure rather than freeing the structure when the resource consumption drops to zero. Move the resource tracking code from kern_proc.c to kern_resource.c. Move some duplicate code sequences in kern_prot.c to separate helper functions. Change KASSERTs in this code to unconditional tests and calls to panic(). Revision Changes Path 1.141 +4 -2 src/sys/kern/init_main.c 1.113 +3 -2 src/sys/kern/kern_exec.c 1.100 +3 -2 src/sys/kern/kern_exit.c 1.80 +4 -2 src/sys/kern/kern_fork.c 1.74 +2 -137 src/sys/kern/kern_proc.c 1.63 +71 -21 src/sys/kern/kern_prot.c 1.61 +143 -1 src/sys/kern/kern_resource.c 1.82 +3 -3 src/sys/kern/uipc_socket.c 1.65 +4 -3 src/sys/kern/uipc_socket2.c 1.60 +3 -3 src/sys/kern/uipc_usrreq.c 1.80 +3 -1 src/sys/kern/vfs_aio.c 1.110 +2 -3 src/sys/sys/proc.h 1.17 +21 -1 src/sys/sys/resourcevar.h 1.15 +3 -1 src/sys/sys/ucred.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?200009052211.PAA70424>