svn commit: r353869 - in head/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Mon Oct 21 18:19:34 UTC 2019
Author: glebius
Date: Mon Oct 21 18:19:32 2019
New Revision: 353869
URL: https://svnweb.freebsd.org/changeset/base/353869
Log:
Remove epoch tracker from struct thread. It was an ugly crutch to emulate
locking semantics for if_addr_rlock() and if_maddr_rlock().
Modified:
head/sys/kern/init_main.c
head/sys/kern/kern_thread.c
head/sys/kern/subr_epoch.c
head/sys/sys/epoch.h
head/sys/sys/proc.h
Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c Mon Oct 21 18:17:03 2019 (r353868)
+++ head/sys/kern/init_main.c Mon Oct 21 18:19:32 2019 (r353869)
@@ -514,7 +514,6 @@ proc0_init(void *dummy __unused)
td->td_pflags = TDP_KTHREAD;
td->td_cpuset = cpuset_thread0();
td->td_domain.dr_policy = td->td_cpuset->cs_domain;
- epoch_thread_init(td);
prison0_init();
p->p_peers = 0;
p->p_leader = p;
Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c Mon Oct 21 18:17:03 2019 (r353868)
+++ head/sys/kern/kern_thread.c Mon Oct 21 18:19:32 2019 (r353869)
@@ -273,7 +273,6 @@ thread_init(void *mem, int size, int flags)
td->td_rlqe = NULL;
EVENTHANDLER_DIRECT_INVOKE(thread_init, td);
umtx_thread_init(td);
- epoch_thread_init(td);
td->td_kstack = 0;
td->td_sel = NULL;
return (0);
@@ -293,7 +292,6 @@ thread_fini(void *mem, int size)
turnstile_free(td->td_turnstile);
sleepq_free(td->td_sleepqueue);
umtx_thread_fini(td);
- epoch_thread_fini(td);
seltdfini(td);
}
Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c Mon Oct 21 18:17:03 2019 (r353868)
+++ head/sys/kern/subr_epoch.c Mon Oct 21 18:19:32 2019 (r353869)
@@ -842,17 +842,3 @@ epoch_drain_callbacks(epoch_t epoch)
PICKUP_GIANT();
}
-
-void
-epoch_thread_init(struct thread *td)
-{
-
- td->td_et = malloc(sizeof(struct epoch_tracker), M_EPOCH, M_WAITOK);
-}
-
-void
-epoch_thread_fini(struct thread *td)
-{
-
- free(td->td_et, M_EPOCH);
-}
Modified: head/sys/sys/epoch.h
==============================================================================
--- head/sys/sys/epoch.h Mon Oct 21 18:17:03 2019 (r353868)
+++ head/sys/sys/epoch.h Mon Oct 21 18:19:32 2019 (r353869)
@@ -93,8 +93,5 @@ void epoch_trace_list(struct thread *);
void epoch_enter(epoch_t epoch);
void epoch_exit(epoch_t epoch);
-void epoch_thread_init(struct thread *);
-void epoch_thread_fini(struct thread *);
-
#endif /* _KERNEL */
#endif /* _SYS_EPOCH_H_ */
Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h Mon Oct 21 18:17:03 2019 (r353868)
+++ head/sys/sys/proc.h Mon Oct 21 18:19:32 2019 (r353869)
@@ -365,7 +365,6 @@ struct thread {
int td_lastcpu; /* (t) Last cpu we were on. */
int td_oncpu; /* (t) Which cpu we are on. */
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;
More information about the svn-src-all
mailing list