aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2007-06-01 01:12:45 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-06-01 01:12:45 +0000
commit1c4bcd050a4f7163d68f608db860aef5fad81d6c (patch)
tree9c09dcc76185c3dc30b048a5f2eb972f3bb8a849 /sys/netinet
parent9163fee71f130ea1488b39a785bf5d08075936f5 (diff)
downloadsrc-1c4bcd050a4f7163d68f608db860aef5fad81d6c.tar.gz
src-1c4bcd050a4f7163d68f608db860aef5fad81d6c.zip
- 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)
Notes
Notes: svn path=/head/; revision=170174
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 3c0056c3ea5d..f35ea8c80026 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -11012,7 +11012,7 @@ sctp_lower_sosend(struct socket *so,
}
/* Ok, we will attempt a msgsnd :> */
if (p) {
- p->td_proc->p_stats->p_ru.ru_msgsnd++;
+ p->td_ru.ru_msgsnd++;
}
if (stcb) {
if (((srcv->sinfo_flags | temp_flags) & SCTP_ADDR_OVER) == 0) {