From 396ed947f6606e1c43668a24471edd3bc2d2303a Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 6 Dec 2006 06:34:57 +0000 Subject: Threading cleanup.. part 2 of several. Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it. Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable. The ULE scheduler compiles again but I have no idea if it works. The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit. Tested by David Xu, and Dan Eischen using libthr and libpthread. --- sys/kern/subr_trap.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'sys/kern/subr_trap.c') diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index a6eca02..5e7446c 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -149,9 +149,6 @@ ast(struct trapframe *framep) { struct thread *td; struct proc *p; -#ifdef KSE - struct ksegrp *kg; -#endif struct rlimit rlim; int sflag; int flags; @@ -163,9 +160,6 @@ ast(struct trapframe *framep) td = curthread; p = td->td_proc; -#ifdef KSE - kg = td->td_ksegrp; -#endif CTR3(KTR_SYSC, "ast: thread %p (pid %d, %s)", td, p->p_pid, p->p_comm); @@ -204,7 +198,7 @@ ast(struct trapframe *framep) /* * XXXKSE While the fact that we owe a user profiling - * tick is stored per KSE in this code, the statistics + * tick is stored per thread in this code, the statistics * themselves are still stored per process. * This should probably change, by which I mean that * possibly the location of both might change. @@ -264,11 +258,7 @@ ast(struct trapframe *framep) ktrcsw(1, 1); #endif mtx_lock_spin(&sched_lock); -#ifdef KSE - sched_prio(td, kg->kg_user_pri); -#else sched_prio(td, td->td_user_pri); -#endif mi_switch(SW_INVOL, NULL); mtx_unlock_spin(&sched_lock); #ifdef KTRACE -- cgit v1.1