svn commit: r353485 - in head/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Mon Oct 14 04:17:57 UTC 2019
Author: glebius
Date: Mon Oct 14 04:17:56 2019
New Revision: 353485
URL: https://svnweb.freebsd.org/changeset/base/353485
Log:
Since EPOCH_TRACE had been moved to opt_global.h, we don't need to waste
extra space in struct thread.
Modified:
head/sys/kern/kern_thread.c
head/sys/kern/subr_epoch.c
head/sys/sys/proc.h
Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c Mon Oct 14 04:10:00 2019 (r353484)
+++ head/sys/kern/kern_thread.c Mon Oct 14 04:17:56 2019 (r353485)
@@ -668,7 +668,9 @@ thread_link(struct thread *td, struct proc *p)
LIST_INIT(&td->td_contested);
LIST_INIT(&td->td_lprof[0]);
LIST_INIT(&td->td_lprof[1]);
+#ifdef EPOCH_TRACE
SLIST_INIT(&td->td_epochs);
+#endif
sigqueue_init(&td->td_sigqueue, p);
callout_init(&td->td_slpcallout, 1);
TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist);
@@ -685,7 +687,9 @@ thread_unlink(struct thread *td)
struct proc *p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
+#ifdef EPOCH_TRACE
MPASS(SLIST_EMPTY(&td->td_epochs));
+#endif
TAILQ_REMOVE(&p->p_threads, td, td_plist);
p->p_numthreads--;
Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c Mon Oct 14 04:10:00 2019 (r353484)
+++ head/sys/kern/subr_epoch.c Mon Oct 14 04:17:56 2019 (r353485)
@@ -258,7 +258,9 @@ epoch_init(void *arg __unused)
DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, NULL, NULL,
"epoch call task");
}
+#ifdef EPOCH_TRACE
SLIST_INIT(&thread0.td_epochs);
+#endif
inited = 1;
global_epoch = epoch_alloc("Global", 0);
global_epoch_preempt = epoch_alloc("Global preemptible", EPOCH_PREEMPT);
Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h Mon Oct 14 04:10:00 2019 (r353484)
+++ head/sys/sys/proc.h Mon Oct 14 04:17:56 2019 (r353485)
@@ -367,7 +367,9 @@ struct thread {
void *td_lkpi_task; /* LinuxKPI task struct pointer */
struct epoch_tracker *td_et; /* (k) compat KPI spare tracker */
int td_pmcpend;
+#ifdef EPOCH_TRACE
SLIST_HEAD(, epoch_tracker) td_epochs;
+#endif
};
struct thread0_storage {
More information about the svn-src-all
mailing list