Try to fetch thread mailbox address in page fault trap, so when thread
blocks in page fault hanlder, and upcall thread can be scheduled. It is useful if process is doing lots of mmap based I/O.
This commit is contained in:
parent
8e63ac0e38
commit
91407731e5
@ -315,6 +315,9 @@ trap(frame)
|
||||
break;
|
||||
|
||||
case T_PAGEFLT: /* page fault */
|
||||
if (td->td_flags & TDF_SA)
|
||||
thread_user_enter(p, td);
|
||||
|
||||
i = trap_pfault(&frame, TRUE, eva);
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
if (i == -2) {
|
||||
|
@ -1498,7 +1498,8 @@ trapsignal(struct thread *td, int sig, u_long code)
|
||||
|
||||
p = td->td_proc;
|
||||
if (td->td_flags & TDF_SA) {
|
||||
thread_user_enter(p, td);
|
||||
if (td->td_mailbox == NULL)
|
||||
thread_user_enter(p, td);
|
||||
PROC_LOCK(p);
|
||||
if (td->td_mailbox) {
|
||||
SIGDELSET(td->td_sigmask, sig);
|
||||
|
Loading…
x
Reference in New Issue
Block a user