Date: Sun, 2 Dec 2007 00:20:55 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 129928 for review Message-ID: <200712020020.lB20KtjM004897@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129928 Change 129928 by peter@peter_daintree on 2007/12/02 00:20:54 Give cpu_set_upcall_kse a more appropriate name. It is used to set the initial function call in a new thread, so call it that. Affected files ... .. //depot/projects/bike_sched/sys/amd64/amd64/vm_machdep.c#6 edit .. //depot/projects/bike_sched/sys/arm/arm/vm_machdep.c#5 edit .. //depot/projects/bike_sched/sys/i386/i386/vm_machdep.c#5 edit .. //depot/projects/bike_sched/sys/ia64/ia64/vm_machdep.c#3 edit .. //depot/projects/bike_sched/sys/kern/kern_fork.c#6 edit .. //depot/projects/bike_sched/sys/kern/kern_switch.c#6 edit .. //depot/projects/bike_sched/sys/kern/kern_synch.c#6 edit .. //depot/projects/bike_sched/sys/kern/kern_thr.c#6 edit .. //depot/projects/bike_sched/sys/kern/kern_thread.c#9 edit .. //depot/projects/bike_sched/sys/kern/subr_witness.c#3 edit .. //depot/projects/bike_sched/sys/powerpc/powerpc/vm_machdep.c#3 edit .. //depot/projects/bike_sched/sys/sparc64/sparc64/vm_machdep.c#3 edit .. //depot/projects/bike_sched/sys/sun4v/sun4v/vm_machdep.c#2 edit .. //depot/projects/bike_sched/sys/sys/proc.h#5 edit Differences ... ==== //depot/projects/bike_sched/sys/amd64/amd64/vm_machdep.c#6 (text+ko) ==== @@ -317,7 +317,7 @@ * for the new thread to make a specific call as its first act. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { ==== //depot/projects/bike_sched/sys/arm/arm/vm_machdep.c#5 (text+ko) ==== @@ -299,7 +299,7 @@ * for the new thread to make a specific call as its first act. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf = td->td_frame; ==== //depot/projects/bike_sched/sys/i386/i386/vm_machdep.c#5 (text+ko) ==== @@ -452,7 +452,7 @@ * for the new thread to make a specific call as its first act. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { ==== //depot/projects/bike_sched/sys/ia64/ia64/vm_machdep.c#3 (text+ko) ==== @@ -172,7 +172,7 @@ } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct ia64_fdesc *fd; ==== //depot/projects/bike_sched/sys/kern/kern_fork.c#6 (text+ko) ==== @@ -763,7 +763,7 @@ p = td->td_proc; KASSERT(p->p_state == PRS_NORMAL, ("executing process is still new")); - CTR4(KTR_PROC, "fork_exit: new thread %p (kse %p, pid %d, %s)", + CTR4(KTR_PROC, "fork_exit: new thread %p (td %p, pid %d, %s)", td, td->td_sched, p->p_pid, td->td_name); sched_fork_exit(td); ==== //depot/projects/bike_sched/sys/kern/kern_switch.c#6 (text+ko) ==== @@ -526,7 +526,7 @@ ts = TAILQ_FIRST(rqh); KASSERT(ts != NULL, ("runq_choose: no proc on busy queue")); CTR4(KTR_RUNQ, - "runq_choose_from: pri=%d kse=%p idx=%d rqh=%p", + "runq_choose_from: pri=%d ts=%p idx=%d rqh=%p", pri, ts, ts->ts_rqindex, rqh); return (ts); } ==== //depot/projects/bike_sched/sys/kern/kern_synch.c#6 (text+ko) ==== @@ -414,7 +414,7 @@ td->td_generation++; /* bump preempt-detect counter */ PCPU_INC(cnt.v_swtch); PCPU_SET(switchticks, ticks); - CTR4(KTR_PROC, "mi_switch: old thread %ld (kse %p, pid %ld, %s)", + CTR4(KTR_PROC, "mi_switch: old thread %ld (ts %p, pid %ld, %s)", td->td_tid, td->td_sched, p->p_pid, td->td_name); #if (KTR_COMPILE & KTR_SCHED) != 0 if (TD_IS_IDLETHREAD(td)) @@ -431,15 +431,11 @@ td, td->td_name, td->td_priority, td->td_inhibitors, td->td_wmesg, td->td_lockname); #endif - /* - * We call thread_switchout after the KTR_SCHED prints above so kse - * selecting a new thread to run does not show up as a preemption. - */ sched_switch(td, newtd, flags); CTR3(KTR_SCHED, "mi_switch: running %p(%s) prio %d", td, td->td_name, td->td_priority); - CTR4(KTR_PROC, "mi_switch: new thread %ld (kse %p, pid %ld, %s)", + CTR4(KTR_PROC, "mi_switch: new thread %ld (ts %p, pid %ld, %s)", td->td_tid, td->td_sched, p->p_pid, td->td_name); /* ==== //depot/projects/bike_sched/sys/kern/kern_thr.c#6 (text+ko) ==== @@ -214,7 +214,7 @@ stack.ss_sp = stack_base; stack.ss_size = stack_size; /* Set upcall address to user thread entry function. */ - cpu_set_upcall_kse(newtd, start_func, arg, &stack); + cpu_set_upcall_func(newtd, start_func, arg, &stack); /* Setup user TLS address and TLS pointer register. */ error = cpu_set_user_tls(newtd, tls_base); if (error != 0) { ==== //depot/projects/bike_sched/sys/kern/kern_thread.c#9 (text+ko) ==== @@ -259,7 +259,7 @@ #ifdef ZOMBIES /* - * Reap zombie kse resource. + * Reap zombie threads. */ void thread_reap(void) ==== //depot/projects/bike_sched/sys/kern/subr_witness.c#3 (text+ko) ==== @@ -447,7 +447,6 @@ #endif { "clk", &lock_class_mtx_spin }, { "mprof lock", &lock_class_mtx_spin }, - { "kse lock", &lock_class_mtx_spin }, { "zombie lock", &lock_class_mtx_spin }, { "ALD Queue", &lock_class_mtx_spin }, #ifdef __ia64__ ==== //depot/projects/bike_sched/sys/powerpc/powerpc/vm_machdep.c#3 (text+ko) ==== @@ -338,7 +338,7 @@ } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; ==== //depot/projects/bike_sched/sys/sparc64/sparc64/vm_machdep.c#3 (text+ko) ==== @@ -182,7 +182,7 @@ } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; ==== //depot/projects/bike_sched/sys/sun4v/sun4v/vm_machdep.c#2 (text+ko) ==== @@ -166,7 +166,7 @@ } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall_func(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; ==== //depot/projects/bike_sched/sys/sys/proc.h#5 (text+ko) ==== @@ -502,11 +502,6 @@ int p_boundary_count;/* (c) Num threads at user boundary */ int p_pendingcnt; /* how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ - int p_numupcalls; /* (j) Num upcalls. */ - int p_upsleeps; /* (c) Num threads in kse_release(). */ - struct kse_thr_mailbox *p_completed; /* (c) Completed thread mboxes. */ - int p_nextupcall; /* (n) Next upcall time. */ - int p_upquantum; /* (n) Quantum to schedule an upcall. */ /* End area that is zeroed on creation. */ #define p_endzero p_magic @@ -821,7 +816,7 @@ /* New in KSE. */ void cpu_set_upcall(struct thread *td, struct thread *td0); -void cpu_set_upcall_kse(struct thread *, void (*)(void *), void *, stack_t *); +void cpu_set_upcall_func(struct thread *, void (*)(void *), void *, stack_t *); int cpu_set_user_tls(struct thread *, void *tls_base); void cpu_thread_alloc(struct thread *); void cpu_thread_clean(struct thread *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712020020.lB20KtjM004897>
