Re: Scheduler weirdness

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 15 Oct 2009 07:41:41 -0400
On Monday 12 October 2009 12:41:59 am Taku YAMAMOTO wrote:
> On Sun, 11 Oct 2009 17:59:52 -0500
> "Larry Rosenman" <ler_at_lerctr.org> wrote:
> 
> > 
> > Ok, running RELENG_8 from Friday (10/9/2009).
> > 
> > If I have 4 Folding-at-home processes running (they nice themselves) the
> > system is slow as a dog.
> 
> Ah, I reminded a local patch regarding SCHED_ULE against niced threads.
> Something like this:
> 
> --- sys/kern/sched_ule.c.orig	2009-04-29 12:26:30.000000000 +0900
> +++ sys/kern/sched_ule.c	2009-04-30 08:13:30.951440396 +0900
> _at__at_ -1406,7 +1406,7 _at__at_ sched_priority(struct thread *td)
>  	 * score.  Negative nice values make it easier for a thread to be
>  	 * considered interactive.
>  	 */
> -	score = imax(0, sched_interact_score(td) - td->td_proc->p_nice);
> +	score = imax(0, sched_interact_score(td) + td->td_proc->p_nice);
>  	if (score < sched_interact) {
>  		pri = PRI_MIN_REALTIME;
>  		pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact)

Thanks, I've committed this after Jeff reviewed it and will MFC it soon.

-- 
John Baldwin
Received on Thu Oct 15 2009 - 10:44:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC