Remove epoch tracker from struct thread. It was an ugly crutch to emulate

locking semantics for if_addr_rlock() and if_maddr_rlock().
This commit is contained in:
Gleb Smirnoff 2019-10-21 18:19:32 +00:00
parent 19e09f447f
commit 279b9aabe3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353869
5 changed files with 0 additions and 21 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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_ */

View File

@ -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;