cvs commit: src/sys/sys proc.h src/sys/kern init_main.c kern_proc.c kern_resource.c kern_synch.c kern_thread.c

Robert Watson rwatson at FreeBSD.org
Fri Apr 11 08:47:37 UTC 2008


rwatson     2008-04-11 08:47:36 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/sys              proc.h 
    sys/kern             init_main.c kern_proc.c kern_resource.c 
                         kern_synch.c kern_thread.c 
  Log:
  Merge init_main.c:1.290, kern_proc.c:1.261, kern_resource.c:1.182,
  kern_sync.c:1.305, proc.h:1.499 from HEAD to RELENG_7:
  
    Don't zero td_runtime when billing thread CPU usage to the process;
    maintain a separate td_incruntime to hold unbilled CPU usage for
    the thread that has the previous properties of td_runtime.
  
    When thread information is requested using the thread monitoring
    sysctls, export thread td_runtime instead of process rusage runtime
    in kinfo_proc.
  
    This restores the display of individual ithread and other kernel
    thread CPU usage since inception in ps -H and top -SH, as well for
    libthr user threads, valuable debugging information lost with the
    move to try kthreads since they are no longer independent processes.
  
    There is universal agreement that we should rewrite the process and
    thread export sysctls, but this commit gets things going a bit
    better in the mean time.  Likewise, there are resevations about the
    continued validity of statclock given the speed of modern processors.
  
    Reviewed by:            attilio, emaste, jhb, julian
  
  Note: in MFC, td_incruntime is added to the end of struc thread,
  rather than the pre-zero'd section, and manually zero'd on thread
  creation, in order to avoid a negative ABI impact for third-party
  kernel modules.
  
  Revision   Changes    Path
  1.283.2.3  +4 -0      src/sys/kern/init_main.c
  1.252.2.8  +13 -7     src/sys/kern/kern_proc.c
  1.180.2.2  +3 -3      src/sys/kern/kern_resource.c
  1.302.2.1  +4 -2      src/sys/kern/kern_synch.c
  1.255.2.3  +1 -0      src/sys/kern/kern_thread.c
  1.491.2.3  +1 -0      src/sys/sys/proc.h


More information about the cvs-src mailing list