Date: Fri, 9 Jun 2000 20:28:06 -0400 (EDT) From: Brian Fundakowski Feldman <green@FreeBSD.org> To: "Jacob A. Hart" <c9710216@studentmail.newcastle.edu.au> Cc: Doug Barton <DougB@gorean.org>, Sheldon Hearn <sheldonh@uunet.co.za>, FreeBSD-CURRENT <freebsd-current@FreeBSD.ORG> Subject: Re: Scheduler changes? Message-ID: <Pine.BSF.4.21.0006092009520.59266-100000@green.dyndns.org> In-Reply-To: <20000528135331.A241@carcass.au.hartware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 28 May 2000, Jacob A. Hart wrote: > I remember the scheduler bug you're talking about. My system feels much > the same as it did during 4.0-CURRENT when that bug was active. I had a > collection of wrapper scripts for CPU intensive programs that suspended > rc5des, ran the program, then reenabled it again. Should have held on to > them, I guess. Check out http://people.FreeBSD.org/~green/mean.c. > > If this change > > fixes things for you, please report it asap, since my understanding is > > that this problem is rather elusive and annoying. > > No, it didn't work, unfortunately. To test it, I renice'd rc5des to a > couple of different values while encoding an MP3. It's an issue. Nice values count for less than before due to fixes that Luoqi Chen made (and I committed). The behavior now isn't optimal, but it is better than the system locking up. NICE_WEIGHT might be okay to keep at 2. Try the attached diff; I'm pretty sure it won't blow things up :) The diff should make a process at -20 which uses all available CPU schedule just slightly the ahead of a process at +20 which uses no CPU. A process which uses full CPU at 0 niceness would have a priority of 128, whereas a process using no CPU at 0 niceness would have a priority of 90. All processes will always have a priority less than or equal to 128, which is the priority at which a process with a niceness of +20 always runs at. A +20 process won't get better priority than anything else, period. Try it out, see how it works for you:) -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' --- /usr/src/sys/sys/proc.h Fri May 26 20:15:46 2000 +++ /home/green/tmp/proc.h Fri Jun 9 20:13:30 2000 @@ -405,10 +405,10 @@ * the range 100-256 Hz (approximately). */ #define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level) */ -#define NICE_WEIGHT 1 /* priorities per nice level */ +#define NICE_WEIGHT 2 /* priorities per nice level */ #define PPQ (128 / NQS) /* priorities per queue */ #define ESTCPULIM(e) \ - min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * PRIO_TOTAL - PPQ) + \ + min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * PRIO_TOTAL / 2 - PPQ) + \ INVERSE_ESTCPU_WEIGHT - 1) extern u_long ps_arg_cache_limit; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0006092009520.59266-100000>