Home | History | Annotate | Download | only in procfs
History log of /src/sys/miscfs/procfs/procfs_status.c
RevisionDateAuthorComments
 1.40  23-May-2020  ad Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
 1.39  29-Sep-2017  kre Use %ju and (intmax_t) to unbreak i386 build.
 1.38  29-Sep-2017  christos Split the status printing routines (one for NetBSD and one for Linux) for
simplicity (Robert Swindelis)
 1.37  14-Nov-2016  kre Return the "true" parent's pid as the parent pid (ppid) via the
various sysctl/procfs interfaces that allow it to be interrogated.
(This is rather than the temporary parent's pid when a process is
being traced and has been reparented.)

XXX The ppid in elf32 core files has not been similarly adjusted,
XXX Should it be ?
 1.36  21-Oct-2009  rmind branches: 1.36.22; 1.36.40; 1.36.44;
Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.35  11-Jan-2009  christos merge christos-time_t
 1.34  24-Apr-2008  ad branches: 1.34.2; 1.34.10;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.33  24-Apr-2008  ad Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
be sent from a hardware interrupt handler. Signal activity must be
deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
 1.32  09-Mar-2007  ad branches: 1.32.36; 1.32.38; 1.32.40;
- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.
 1.31  17-Feb-2007  pavel Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
 1.30  09-Feb-2007  ad branches: 1.30.2;
Merge newlock2 to head.
 1.29  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.28  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.27  14-May-2006  elad branches: 1.27.8; 1.27.10;
integrate kauth.
 1.26  11-Dec-2005  christos branches: 1.26.4; 1.26.6; 1.26.8; 1.26.10; 1.26.12;
merge ktrace-lwp.
 1.25  29-May-2005  christos branches: 1.25.2;
- sprinkle const
- avoid shadowed variables.
 1.24  26-Feb-2005  perry nuke trailing whitespace
 1.23  22-Apr-2004  itojun branches: 1.23.4; 1.23.6;
sprintf -> snprintf
 1.22  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.21  29-Jun-2003  fvdl branches: 1.21.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.20  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.19  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18  07-Nov-2002  thorpej Fix signed/unsigned comparison warnings.
 1.17  10-Nov-2001  lukem add RCSIDs
 1.16  30-Dec-2000  david branches: 1.16.2; 1.16.4; 1.16.6; 1.16.8;
Increase psbuf size as in FreeBSD patch. We don't have jail(8), so the
recent bugtraq exploit doesn't apply, but it could be exploitable in
other ways.
 1.15  09-Aug-1998  perry branches: 1.15.12;
bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.14  14-Feb-1998  thorpej Prevent the session ID from disappearing if the session leader exits
(thus causing s_leader to become NULL) by storing the session ID separately
in the session structure. Export the session ID to userspace in the
eproc structure.

Submitted by Tom Proett <proett@nas.nasa.gov>.
 1.13  13-Oct-1996  christos backout previous kprintf changes
 1.12  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11  16-Mar-1996  christos Fix printf format follies.
 1.10  01-Jun-1995  jtc Moved egid credential from cr_groups[0] to new field cr_gid. POSIX.1
requires that sgid executables and the setuid() syscall *not* change
the supplemental group list.
 1.9  29-Jun-1994  cgd New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.8  15-Jun-1994  mycroft Minor update from JSP after merging my changes.
 1.7  15-Jun-1994  mycroft Fix a bug pointed out by JSP.
 1.6  08-Jun-1994  mycroft Update to 4.4-Lite fs code, with local changes.
 1.5  05-May-1994  cgd lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
 1.4  04-May-1994  cgd Rename a lot of process flags.
 1.3  10-Jan-1994  ws Fix sign extension bug
 1.2  09-Jan-1994  ws Bug fixes and enhancements:
Make NFS serving work (BUT DON'T USE "attach" TO /proc/*/ctl FOR NOW!!!)
Make `curproc' a symbolic link
Add `.' and `..' entries to the directories.
Return better guesses on the size of the files.
 1.1  05-Jan-1994  cgd branches: 1.1.1;
add new procfs code, from Jan-Simon Pendry, jsp@sequent.com.
This is pretty-much "virgin", so that diffs can be done later.
 1.1.1.2  01-Mar-1998  fvdl Import 4.4BSD-Lite2
 1.1.1.1  01-Mar-1998  fvdl Import 4.4BSD-Lite for reference
 1.15.12.1  05-Jan-2001  bouyer Sync with HEAD
 1.16.8.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.16.6.2  13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.16.6.1  07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.16.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.3  11-Nov-2002  nathanw Catch up to -current
 1.16.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.16.2.1  05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.21.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.21.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.21.2.2  03-Aug-2004  skrll Sync with HEAD
 1.21.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.23.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.23.4.1  29-Apr-2005  kent sync with -current
 1.25.2.4  03-Sep-2007  yamt sync with head.
 1.25.2.3  26-Feb-2007  yamt sync with head.
 1.25.2.2  30-Dec-2006  yamt sync with head.
 1.25.2.1  21-Jun-2006  yamt sync with head.
 1.26.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.26.10.2  06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.26.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.26.8.1  24-May-2006  yamt sync with head.
 1.26.6.1  01-Jun-2006  kardel Sync with head.
 1.26.4.1  09-Sep-2006  rpaulo sync with head
 1.27.10.2  10-Dec-2006  yamt sync with head.
 1.27.10.1  22-Oct-2006  yamt sync with head
 1.27.8.3  18-Nov-2006  ad Sync with head.
 1.27.8.2  17-Nov-2006  ad Checkpoint work in progress.
 1.27.8.1  21-Oct-2006  ad - Make this compile. XXX Needs more work on locking.
- Do FILE_UNUSE() as the current LWP, otherwise we will wipe out the
target's advisory locks. XXX Double check.
 1.30.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.30.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.32.40.1  18-May-2008  yamt sync with head.
 1.32.38.3  09-Nov-2008  christos account for major and minor being unsigned long long
 1.32.38.2  01-Nov-2008  christos Sync with head.
 1.32.38.1  29-Mar-2008  christos Welcome to the time_t=long long dev_t=uint64_t branch.
 1.32.36.2  17-Jan-2009  mjf Sync with HEAD.
 1.32.36.1  02-Jun-2008  mjf Sync with HEAD.
 1.34.10.1  19-Jan-2009  skrll Sync with HEAD.
 1.34.2.2  11-Mar-2010  yamt sync with head
 1.34.2.1  04-May-2009  yamt sync with head.
 1.36.44.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.36.40.1  05-Dec-2016  skrll Sync with HEAD
 1.36.22.1  03-Dec-2017  jdolecek update from HEAD

RSS XML Feed