diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 7110933bc39f..516925fb8792 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.101 1997/07/20 08:37:23 bde Exp $ + * $Id: trap.c,v 1.102 1997/08/09 00:02:52 dyson Exp $ */ /* @@ -144,6 +144,19 @@ userret(p, frame, oticks) while ((sig = CURSIG(p)) != 0) postsig(sig); + +#if !defined(NO_SCHEDULE_MODS) + if (!want_resched && + (p->p_priority <= p->p_usrpri) && + (p->p_rtprio.type == RTP_PRIO_NORMAL)) { + int newpriority; + p->p_estcpu += 1; + newpriority = PUSER + p->p_estcpu / 4 + 2 * p->p_nice; + newpriority = min(newpriority, MAXPRI); + p->p_usrpri = newpriority; + } +#endif + p->p_priority = p->p_usrpri; if (want_resched) { /* diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 7110933bc39f..516925fb8792 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.101 1997/07/20 08:37:23 bde Exp $ + * $Id: trap.c,v 1.102 1997/08/09 00:02:52 dyson Exp $ */ /* @@ -144,6 +144,19 @@ userret(p, frame, oticks) while ((sig = CURSIG(p)) != 0) postsig(sig); + +#if !defined(NO_SCHEDULE_MODS) + if (!want_resched && + (p->p_priority <= p->p_usrpri) && + (p->p_rtprio.type == RTP_PRIO_NORMAL)) { + int newpriority; + p->p_estcpu += 1; + newpriority = PUSER + p->p_estcpu / 4 + 2 * p->p_nice; + newpriority = min(newpriority, MAXPRI); + p->p_usrpri = newpriority; + } +#endif + p->p_priority = p->p_usrpri; if (want_resched) { /* diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 42d1d21a1104..bfa7c0111ca8 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id$ + * $Id: kern_physio.c,v 1.19 1997/02/22 09:39:08 peter Exp $ */ #include @@ -112,7 +112,11 @@ physio(strategy, bp, dev, rw, minp, uio) spl = splbio(); while ((bp->b_flags & B_DONE) == 0) +#if defined(NO_SCHEDULE_MODS) tsleep((caddr_t)bp, PRIBIO, "physstr", 0); +#else + tsleep((caddr_t)bp, curproc->p_usrpri, "physstr", 0); +#endif splx(spl); /* release mapping into kernel space */ diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 7110933bc39f..516925fb8792 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.101 1997/07/20 08:37:23 bde Exp $ + * $Id: trap.c,v 1.102 1997/08/09 00:02:52 dyson Exp $ */ /* @@ -144,6 +144,19 @@ userret(p, frame, oticks) while ((sig = CURSIG(p)) != 0) postsig(sig); + +#if !defined(NO_SCHEDULE_MODS) + if (!want_resched && + (p->p_priority <= p->p_usrpri) && + (p->p_rtprio.type == RTP_PRIO_NORMAL)) { + int newpriority; + p->p_estcpu += 1; + newpriority = PUSER + p->p_estcpu / 4 + 2 * p->p_nice; + newpriority = min(newpriority, MAXPRI); + p->p_usrpri = newpriority; + } +#endif + p->p_priority = p->p_usrpri; if (want_resched) { /* diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index f2477e56c771..1239dfb9c4ae 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.120 1997/06/13 08:30:40 bde Exp $ + * $Id: vfs_bio.c,v 1.121 1997/06/15 17:56:49 dyson Exp $ */ /* @@ -1717,7 +1717,11 @@ biowait(register struct buf * bp) s = splbio(); while ((bp->b_flags & B_DONE) == 0) +#if defined(NO_SCHEDULE_MODS) tsleep(bp, PRIBIO, "biowait", 0); +#else + tsleep(bp, curproc->p_usrpri, "biowait", 0); +#endif splx(s); if (bp->b_flags & B_EINTR) { bp->b_flags &= ~B_EINTR;