From owner-svn-src-user@FreeBSD.ORG Fri May 22 20:04:07 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F97B1065694; Fri, 22 May 2009 20:04:07 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 629518FC08; Fri, 22 May 2009 20:04:07 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4MK47Bp017275; Fri, 22 May 2009 20:04:07 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4MK471x017274; Fri, 22 May 2009 20:04:07 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200905222004.n4MK471x017274@svn.freebsd.org> From: Kip Macy Date: Fri, 22 May 2009 20:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192598 - user/kmacy/releng_7_2_fcs/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 20:04:08 -0000 Author: kmacy Date: Fri May 22 20:04:07 2009 New Revision: 192598 URL: http://svn.freebsd.org/changeset/base/192598 Log: - remove dead KSE code - remove duplicated HWPMC code - use new switch stats mechanism Modified: user/kmacy/releng_7_2_fcs/sys/kern/subr_trap.c Modified: user/kmacy/releng_7_2_fcs/sys/kern/subr_trap.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/kern/subr_trap.c Fri May 22 19:28:13 2009 (r192597) +++ user/kmacy/releng_7_2_fcs/sys/kern/subr_trap.c Fri May 22 20:04:07 2009 (r192598) @@ -96,11 +96,9 @@ userret(struct thread *td, struct trapfr thread_unlock(td); PROC_UNLOCK(p); #endif - #ifdef KTRACE KTRUSERRET(td); #endif - /* * If this thread tickled GEOM, we need to wait for the giggling to * stop before we return to userland @@ -120,22 +118,12 @@ userret(struct thread *td, struct trapfr PROC_UNLOCK(p); } -#ifdef KSE - /* - * Do special thread processing, e.g. upcall tweaking and such. - */ - if (p->p_flag & P_SA) - thread_userret(td, frame); -#endif - /* * Charge system time if profiling. */ if (p->p_flag & P_PROFIL) { - addupc_task(td, TRAPF_PC(frame), td->td_pticks * psratio); } - /* * Let the scheduler adjust our priority etc. */ @@ -173,11 +161,6 @@ ast(struct trapframe *framep) td->td_frame = framep; td->td_pticks = 0; -#ifdef KSE - if ((p->p_flag & P_SA) && (td->td_mailbox == NULL)) - thread_user_enter(td); -#endif - /* * This updates the td_flag's for the checks below in one * "atomic" operation with turning off the astpending flag. @@ -207,13 +190,6 @@ ast(struct trapframe *framep) td->td_profil_ticks = 0; td->td_pflags &= ~TDP_OWEUPC; } -#if defined(HWPMC_HOOKS) - if (td->td_pflags & TDP_CALLCHAIN) { - PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_USER_CALLCHAIN, - (void *) framep); - td->td_pflags &= ~TDP_CALLCHAIN; - } -#endif if (flags & TDF_ALRMPEND) { PROC_LOCK(p); psignal(p, SIGVTALRM); @@ -248,8 +224,7 @@ ast(struct trapframe *framep) #endif thread_lock(td); sched_prio(td, td->td_user_pri); - SCHED_STAT_INC(switch_needresched); - mi_switch(SW_INVOL, NULL); + mi_switch(SW_INVOL | SWT_NEEDRESCHED, NULL); thread_unlock(td); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -273,6 +248,7 @@ ast(struct trapframe *framep) thread_suspend_check(0); PROC_UNLOCK(p); } + userret(td, framep); mtx_assert(&Giant, MA_NOTOWNED); }