From owner-cvs-all@FreeBSD.ORG Sun Oct 28 21:08:34 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6CC216A41A; Sun, 28 Oct 2007 21:08:34 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id E132C13C48A; Sun, 28 Oct 2007 21:08:33 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l9SKd7fN046322; Sun, 28 Oct 2007 23:39:07 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l9SKd62j046321; Sun, 28 Oct 2007 23:39:06 +0300 (MSK) (envelope-from yar) Date: Sun, 28 Oct 2007 23:39:06 +0300 From: Yar Tikhiy To: Julian Elischer Message-ID: <20071028203906.GB27871@comp.chem.msu.su> References: <200710260800.l9Q80fee085818@repoman.freebsd.org> <20071028155337.GA4165@freefall.freebsd.org> <4724C19C.8050102@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4724C19C.8050102@elischer.org> User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Julian Elischer , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/top machine.c src/lib/libkvm kvm_proc.c src/bin/ps extern.h keyword.c print.c ps.c src/sys/kern init_main.c kern_exit.c kern_idle.c kern_intr.c kern_kthread.c kern_shutdown.c kern_thread.c sched_4bsd.c src/sys/sys kthread.h ... 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: Sun, 28 Oct 2007 21:08:34 -0000 On Sun, Oct 28, 2007 at 10:06:36AM -0700, Julian Elischer wrote: > Yar Tikhiy wrote: > >On Fri, Oct 26, 2007 at 08:00:41AM +0000, Julian Elischer wrote: > >>julian 2007-10-26 08:00:41 UTC > >> > >> FreeBSD src repository > >> > >> Modified files: > >> usr.bin/top machine.c > >> lib/libkvm kvm_proc.c > >> bin/ps extern.h keyword.c print.c ps.c > >> sys/kern init_main.c kern_exit.c kern_idle.c > >> kern_intr.c kern_kthread.c > >> kern_shutdown.c kern_thread.c > >> sched_4bsd.c > >> sys/sys kthread.h proc.h > >> Log: > >> Introduce a way to make pure kernal threads. > >> kthread_add() takes the same parameters as the old kthread_create() > >> plus a pointer to a process structure, and adds a kernel thread > >> to that process. > >> > >> kproc_kthread_add() takes the parameters for kthread_add, > >> plus a process name and a pointer to a pointer to a process instead of > >> just > >> a pointer, and if the proc * is NULL, it creates the process to the > >> specifications required, before adding the thread to it. > >> > >> All other old kthread_xxx() calls return, but act on (struct thread *) > >> instead of (struct proc *). One reason to change the name is so that > >> any old kernel modules that are lying around and expect kthread_create() > >> to make a process will not just accidentally link. > >> > >> fix top to show kernel threads by their thread name in -SH mode > >> add a tdnam formatting option to ps to show thread names. > >> > >> make all idle threads actual kthreads and put them into their own idled > >> process. > >> make all interrupt threads kthreads and put them in an interd process > >> (mainly for aesthetic and accounting reasons) > >> rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper' > >> > >> man page fixes to follow. > >> > >> Revision Changes Path > >> 1.38 +2 -1 src/bin/ps/extern.h > >> 1.77 +2 -0 src/bin/ps/keyword.c > >> 1.96 +21 -4 src/bin/ps/print.c > >> 1.112 +2 -1 src/bin/ps/ps.c > >> 1.95 +8 -1 src/lib/libkvm/kvm_proc.c > >> 1.286 +3 -2 src/sys/kern/init_main.c > >> 1.306 +3 -4 src/sys/kern/kern_exit.c > >> 1.50 +7 -9 src/sys/kern/kern_idle.c > >> 1.149 +18 -20 src/sys/kern/kern_intr.c > >> 1.40 +208 -3 src/sys/kern/kern_kthread.c > >> 1.185 +22 -0 src/sys/kern/kern_shutdown.c > >> 1.256 +0 -6 src/sys/kern/kern_thread.c > >> 1.107 +0 -2 src/sys/kern/sched_4bsd.c > >> 1.11 +27 -2 src/sys/sys/kthread.h > >> 1.492 +3 -2 src/sys/sys/proc.h > >> 1.83 +63 -47 src/usr.bin/top/machine.c > > > >FWIW, this commit seems to have broken "time" keyword in ps(1): > > > >: yar@behemoth:~$ps -o time > >: ps: time: keyword not found > >: ps: no valid keywords; valid keywords: > >: %cpu %mem acflag acflg args blocked caught comm command cpu cputime emul > >etime > >: f flags ignored inblk inblock jid jobc ktrace label lim lockname login > >logname > >: lstart lwp majflt minflt msgrcv msgsnd mwchan ni nice nivcsw nlwp > >nsignals > >: nsigs nswap nvcsw nwchan oublk oublock paddr pagein pcpu pending pgid > >pid pmem > >: ppid pri re rgid rgroup rss rtprio ruid ruser sid sig sigcatch sigignore > >: sigmask sl start stat state svgid svuid tdev time tdnam tpgid tsid tsiz > >tt tty > >: ucomm uid upr uprocp user usrpri vsize vsz wchan xstat > > > >I'm unsure why it happened; I can only see that the change to ps/keyword.c > >is next to the line for "time". > > > >Please also note that now the sortedness of the keywords is broken around > >tdnam. > > good point.. I changed tdnam from something else and forgot to re-order it.. Restoring the order has magically fixed the problem with "time". Perhaps a binary search is done over the array or something. Thanks! -- Yar