aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2008-03-19 06:19:01 +0000
committerJeff Roberson <jeff@FreeBSD.org>2008-03-19 06:19:01 +0000
commit374ae2a39338777f5f9ef0ed726fff2a5dee6485 (patch)
tree720fece23c8482c35e341e275a0f4068ee43126f /sys/sys/proc.h
parentb23372cd8ee7abcc1b32caf4cf72d5bd12f7102f (diff)
downloadsrc-374ae2a39338777f5f9ef0ed726fff2a5dee6485.tar.gz
src-374ae2a39338777f5f9ef0ed726fff2a5dee6485.zip
- Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from
requiring the per-process spinlock to only requiring the process lock. - Reflect these changes in the proc.h documentation and consumers throughout the kernel. This is a substantial reduction in locking cost for these fields and was made possible by recent changes to threading support.
Notes
Notes: svn path=/head/; revision=177368
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 90b152bd335d..8acb08478ca0 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -431,7 +431,7 @@ struct rusage_ext {
*/
struct proc {
LIST_ENTRY(proc) p_list; /* (d) List of all processes. */
- TAILQ_HEAD(, thread) p_threads; /* (j) all threads. */
+ TAILQ_HEAD(, thread) p_threads; /* (c) all threads. */
struct mtx p_slock; /* process spin lock */
struct ucred *p_ucred; /* (c) Process owner's identity. */
struct filedesc *p_fd; /* (b) Open files. */
@@ -466,7 +466,7 @@ struct proc {
#define p_startzero p_oppid
pid_t p_oppid; /* (c + e) Save ppid in ptrace. XXX */
struct vmspace *p_vmspace; /* (b) Address space. */
- u_int p_swtick; /* (j) Tick when swapped in or out. */
+ u_int p_swtick; /* (c) Tick when swapped in or out. */
struct itimerval p_realtimer; /* (c) Alarm timer. */
struct rusage p_ru; /* (a) Exit information. */
struct rusage_ext p_rux; /* (cj) Internal resource usage. */
@@ -507,13 +507,13 @@ struct proc {
struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */
struct pargs *p_args; /* (c) Process arguments. */
rlim_t p_cpulimit; /* (c) Current CPU limit in seconds. */
- signed char p_nice; /* (c + j) Process "nice" value. */
+ signed char p_nice; /* (c) Process "nice" value. */
/* End area that is copied on creation. */
#define p_endcopy p_xstat
u_short p_xstat; /* (c) Exit status; also stop sig. */
struct knlist p_klist; /* (c) Knotes attached to this proc. */
- int p_numthreads; /* (j) Number of threads. */
+ int p_numthreads; /* (c) Number of threads. */
struct mdproc p_md; /* Any machine-dependent fields. */
struct callout p_itcallout; /* (h + c) Interval timer callout. */
u_short p_acflag; /* (c) Accounting flags. */