Date: Wed, 2 Jan 2008 03:31:34 -1000 (HST) From: Jeff Roberson <jroberson@chesapeake.net> To: Peter Jeremy <peterjeremy@optushome.com.au> Cc: freebsd-current@freebsd.org Subject: Re: idle priority scheduling broken in 7.0-BETA4 Message-ID: <20080102033011.P957@desktop> In-Reply-To: <20080102105049.GA903@server.vk2pj.dyndns.org> References: <20071223092332.GJ25002@server.vk2pj.dyndns.org> <476F81AF.7000505@gmail.com> <20080101190607.B957@desktop> <20080102105049.GA903@server.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, 2 Jan 2008, Peter Jeremy wrote:
> On Tue, Jan 01, 2008 at 07:09:54PM -1000, Jeff Roberson wrote:
>> Can you please try this experimental patch for ULE? It re-enables the time
>> slicing code for idle prio and realtime tasks that are not fifo.
>
> I still had boinc running at "nice -n 19" and the system wouldn't
> boot: It started boinc, reported it was checking the apache.conf and
> didn't go any further. I couldn't kill boinc or setiathome from ddb
> and had to push the reset button. I will look at the patch more
> closely tomorrow but it looks suspiciously like it stopped
> time-slicing.
ah, I'm sorry. the new line with PRI_FIFO should read PRI_FIFO_BIT. I
tested the patch but not with any idle prio tasks that run forever.
Enclosed is a new patch.
Thanks,
Jeff
>
> --
> Peter Jeremy
> Please excuse any delays as the result of my ISP's inability to implement
> an MTA that is either RFC2821-compliant or matches their claimed behaviour.
>
[-- Attachment #2 --]
Index: sched_ule.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v
retrieving revision 1.214.2.2
diff -u -r1.214.2.2 sched_ule.c
--- sched_ule.c 20 Dec 2007 07:15:40 -0000 1.214.2.2
+++ sched_ule.c 2 Jan 2008 13:31:10 -0000
@@ -2183,17 +2183,16 @@
tdq->tdq_ridx = tdq->tdq_idx;
}
ts = td->td_sched;
- /*
- * We only do slicing code for TIMESHARE threads.
- */
- if (td->td_pri_class != PRI_TIMESHARE)
+ if (td->td_pri_class & PRI_FIFO_BIT)
return;
- /*
- * We used a tick; charge it to the thread so that we can compute our
- * interactivity.
- */
- td->td_sched->ts_runtime += tickincr;
- sched_interact_update(td);
+ if (td->td_pri_class == PRI_TIMESHARE) {
+ /*
+ * We used a tick; charge it to the thread so
+ * that we can compute our interactivity.
+ */
+ td->td_sched->ts_runtime += tickincr;
+ sched_interact_update(td);
+ }
/*
* We used up one time slice.
*/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080102033011.P957>
