From owner-freebsd-current@FreeBSD.ORG Thu Oct 15 12:44:56 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BDD7106568D for ; Thu, 15 Oct 2009 12:44:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2CEE78FC12 for ; Thu, 15 Oct 2009 12:44:56 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CE6F546B1A; Thu, 15 Oct 2009 08:44:55 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1A7F28A01F; Thu, 15 Oct 2009 08:44:55 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 15 Oct 2009 07:41:41 -0400 User-Agent: KMail/1.9.7 References: <6729ad0409e449f8dbda69ecd8feb618.squirrel@webmail.lerctr.org> <20091012134159.8f6e4d66.taku@tackymt.homeip.net> In-Reply-To: <20091012134159.8f6e4d66.taku@tackymt.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910150741.41569.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 15 Oct 2009 08:44:55 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Taku YAMAMOTO , Larry Rosenman Subject: Re: Scheduler weirdness X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2009 12:44:56 -0000 On Monday 12 October 2009 12:41:59 am Taku YAMAMOTO wrote: > On Sun, 11 Oct 2009 17:59:52 -0500 > "Larry Rosenman" 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 > @@ -1406,7 +1406,7 @@ 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