From owner-cvs-all@FreeBSD.ORG Fri Jun 1 01:12:46 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9BB616A421; Fri, 1 Jun 2007 01:12:46 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 944FC13C455; Fri, 1 Jun 2007 01:12:46 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l511CkmL036763; Fri, 1 Jun 2007 01:12:46 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l511CkV6036759; Fri, 1 Jun 2007 01:12:46 GMT (envelope-from jeff) Message-Id: <200706010112.l511CkV6036759@repoman.freebsd.org> From: Jeff Roberson Date: Fri, 1 Jun 2007 01:12:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/gnu/fs/ext2fs ext2_bmap.c src/sys/kern init_main.c kern_acct.c kern_clock.c kern_exit.c kern_fork.c kern_proc.c kern_resource.c kern_sig.c kern_synch.c kern_thread.c subr_trap.c uipc_socket.c vfs_aio.c vfs_bio.c vfs_cluster.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2007 01:12:46 -0000 jeff 2007-06-01 01:12:45 UTC FreeBSD src repository Modified files: sys/gnu/fs/ext2fs ext2_bmap.c sys/kern init_main.c kern_acct.c kern_clock.c kern_exit.c kern_fork.c kern_proc.c kern_resource.c kern_sig.c kern_synch.c kern_thread.c subr_trap.c uipc_socket.c vfs_aio.c vfs_bio.c vfs_cluster.c sys/netinet sctp_output.c sys/nfs4client nfs4_vnops.c sys/nfsclient nfs_vnops.c sys/sys proc.h resource.h resourcevar.h sys/ufs/ffs ffs_inode.c sys/ufs/ufs ufs_bmap.c sys/vm vm_fault.c vm_glue.c Log: - Move rusage from being per-process in struct pstats to per-thread in td_ru. This removes the requirement for per-process synchronization in statclock() and mi_switch(). This was previously supported by sched_lock which is going away. All modifications to rusage are now done in the context of the owning thread. reads proceed without locks. - Aggregate exiting threads rusage in thread_exit() such that the exiting thread's rusage is not lost. - Provide a new routine, rufetch() to fetch an aggregate of all rusage structures from all threads in a process. This routine must be used in any place requiring a rusage from a process prior to it's exit. The exited process's rusage is still available via p_ru. - Aggregate tick statistics only on demand via rufetch() or when a thread exits. Tick statistics are kept in the thread and protected by sched_lock until it exits. Initial patch by: attilio Reviewed by: attilio, bde (some objections), arch (mostly silent) Revision Changes Path 1.64 +1 -1 src/sys/gnu/fs/ext2fs/ext2_bmap.c 1.277 +1 -0 src/sys/kern/init_main.c 1.91 +5 -5 src/sys/kern/kern_acct.c 1.199 +4 -6 src/sys/kern/kern_clock.c 1.299 +17 -9 src/sys/kern/kern_exit.c 1.274 +1 -1 src/sys/kern/kern_fork.c 1.248 +1 -1 src/sys/kern/kern_proc.c 1.172 +103 -22 src/sys/kern/kern_resource.c 1.345 +2 -2 src/sys/kern/kern_sig.c 1.297 +5 -27 src/sys/kern/kern_synch.c 1.245 +11 -8 src/sys/kern/kern_thread.c 1.294 +2 -18 src/sys/kern/subr_trap.c 1.301 +3 -3 src/sys/kern/uipc_socket.c 1.231 +8 -10 src/sys/kern/vfs_aio.c 1.524 +3 -3 src/sys/kern/vfs_bio.c 1.176 +2 -2 src/sys/kern/vfs_cluster.c 1.31 +1 -1 src/sys/netinet/sctp_output.c 1.37 +1 -1 src/sys/nfs4client/nfs4_vnops.c 1.276 +1 -1 src/sys/nfsclient/nfs_vnops.c 1.478 +10 -7 src/sys/sys/proc.h 1.31 +18 -20 src/sys/sys/resource.h 1.50 +5 -2 src/sys/sys/resourcevar.h 1.108 +1 -1 src/sys/ufs/ffs/ffs_inode.c 1.66 +1 -1 src/sys/ufs/ufs/ufs_bmap.c 1.230 +4 -9 src/sys/vm/vm_fault.c 1.222 +2 -2 src/sys/vm/vm_glue.c