diff options
| author | 2019-07-15 20:44:48 +0000 | |
|---|---|---|
| committer | 2019-07-15 20:44:48 +0000 | |
| commit | 764fc8a08437c4c7edc08f1ff70fc52a78b3ac27 (patch) | |
| tree | 6002134d44be0420a961fbd2843548df88e63d90 /sys/kern/kern_resource.c | |
| parent | explain escaping of end-of-sentence characters; (diff) | |
| download | wireguard-openbsd-764fc8a08437c4c7edc08f1ff70fc52a78b3ac27.tar.xz wireguard-openbsd-764fc8a08437c4c7edc08f1ff70fc52a78b3ac27.zip | |
Stop calling resched_proc() after changing the nice(3) value of a process.
Changing the scheduling priority of a process happens rarely, so it isn't
strictly necessary to update the current priority of every threads
instantly.
Moreover resched_proc() isn't well suited to perform this action: it doesn't
consider the state of each thread nor move them to another runqueue.
ok visa@
Diffstat (limited to 'sys/kern/kern_resource.c')
| -rw-r--r-- | sys/kern/kern_resource.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 760f7a73bb8..341315d03e0 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_resource.c,v 1.67 2019/07/08 18:53:18 mpi Exp $ */ +/* $OpenBSD: kern_resource.c,v 1.68 2019/07/15 20:44:48 mpi Exp $ */ /* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */ /*- @@ -214,7 +214,6 @@ donice(struct proc *curp, struct process *chgpr, int n) SCHED_LOCK(s); TAILQ_FOREACH(p, &chgpr->ps_threads, p_thr_link) { setpriority(p, p->p_estcpu, n); - resched_proc(p, p->p_usrpri); } SCHED_UNLOCK(s); return (0); |
