Move TDP_GEOM check from userret() to ast(); this code path is quite
infrequent. Reviewed by: kib No objections: mav Tested by: pho MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26374
This commit is contained in:
parent
92b87529e3
commit
067e33842f
@ -374,6 +374,9 @@ g_post_event_x(g_event_t *func, void *arg, int flag, int wuflag, struct g_event
|
||||
if (epp != NULL)
|
||||
*epp = ep;
|
||||
curthread->td_pflags |= TDP_GEOM;
|
||||
thread_lock(curthread);
|
||||
curthread->td_flags |= TDF_ASTPENDING;
|
||||
thread_unlock(curthread);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -137,13 +137,6 @@ userret(struct thread *td, struct trapframe *frame)
|
||||
td_softdep_cleanup(td);
|
||||
MPASS(td->td_su == NULL);
|
||||
|
||||
/*
|
||||
* If this thread tickled GEOM, we need to wait for the giggling to
|
||||
* stop before we return to userland
|
||||
*/
|
||||
if (__predict_false(td->td_pflags & TDP_GEOM))
|
||||
g_waitidle();
|
||||
|
||||
/*
|
||||
* Charge system time if profiling.
|
||||
*/
|
||||
@ -286,6 +279,13 @@ ast(struct trapframe *framep)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* If this thread tickled GEOM, we need to wait for the giggling to
|
||||
* stop before we return to userland
|
||||
*/
|
||||
if (__predict_false(td->td_pflags & TDP_GEOM))
|
||||
g_waitidle();
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (p->p_numthreads == 1 && (flags & TDF_NEEDSIGCHK) == 0) {
|
||||
PROC_LOCK(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user