Date: Tue, 1 Jan 2008 19:09:54 -1000 (HST) From: Jeff Roberson <jroberson@chesapeake.net> To: Rene Ladan <r.c.ladan@gmail.com> Cc: Peter Jeremy <peterjeremy@optushome.com.au>, freebsd-current@freebsd.org Subject: Re: idle priority scheduling broken in 7.0-BETA4 Message-ID: <20080101190607.B957@desktop> In-Reply-To: <476F81AF.7000505@gmail.com> References: <20071223092332.GJ25002@server.vk2pj.dyndns.org> <476F81AF.7000505@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Mon, 24 Dec 2007, Rene Ladan wrote:
> Peter Jeremy schreef:
>> In August, I reported that idprio was not working in -current.
>> Successive upgrades to 7.0-BETA2 and 7.0-BETA4, as well as switching
>> to ULE have not resolved the problem.
>>
>> The problem affects both boinc-einsteinathome and boinc-setiathome and
>> causes them to report "No heartbeat from core client for 31 sec -
>> exiting" and get repeatedly restarted. The boinc compute modules
>> (einstein@home, seti@home etc) use a SysV SHM segment to exchange
>> heartbeats with the boinc core client. The problem is that the core
>> client is not being scheduled whilst the compute module is running,
>> causing them to die.
>>
>> Previously, multiple idprio tasks were round-robined but it seems that
>> something has been changed and it appears that the last scheduled task
>> is now re-scheduled.
>>
>> Has anyone else seen this behaviour?
>>
> On my CURRENT 2007-12-23 dualcore (Intel T5600) i386 I get similar behaviour
> when using the ULE scheduler. With the 4BSD scheduler priorities are sometimes
> wrong, but boinc tasks (einstein,seti,simap) run continuously until preempted,
> they are kept in memory.
>
> last pid: 8141; load averages: 2.03, 2.14, 2.18 up 0+20:48:27 10:51:54
> 146 processes: 7 running, 120 sleeping, 19 waiting
> CPU states: % user, % nice, % system, % interrupt, % idle
> Mem: 373M Active, 1040M Inact, 223M Wired, 17M Cache, 112M Buf, 349M Free
> Swap: 4062M Total, 4062M Free
>
> PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
> 7315 boinc 171 i31 65960K 64904K CPU1 1 187:57 62.89% {einstein_S5R3_4.
> 7859 boinc 171 i31 13680K 12552K RUN 0 71:31 60.16% {simap_5.10_i686-
> 7859 boinc 20 i31 13680K 12552K kserel 0 71:31 10.45% {simap_5.10_i686-
> 5168 boinc 8 i31 41960K 37564K nanslp 0 205:14 0.00% {initial thread}
> 5168 boinc 8 19 41960K 37564K nanslp 0 205:14 0.00% {setiathome-5.27.
> 7315 boinc 20 i31 65960K 64904K ksesig 0 187:57 0.00% {einstein_S5R3_4.
> 7315 boinc 20 i31 65960K 64904K kserel 0 187:57 0.00% {einstein_S5R3_4.
> 7859 boinc 20 i31 13680K 12552K ksesig 0 71:31 0.00% {simap_5.10_i686-
> 22403 boinc 171 i31 9572K 6700K select 1 0:32 0.00% boinc_client
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.
Thanks,
Jeff
>
>
> Rene
> --
> GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 (subkeys.pgp.net)
>
> "It won't fit on the line."
> -- me, 2001
>
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>
[-- Attachment #2 --]
Index: sched_ule.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v
retrieving revision 1.220
diff -u -r1.220 sched_ule.c
--- sched_ule.c 21 Dec 2007 23:30:18 -0000 1.220
+++ sched_ule.c 2 Jan 2008 05:09:33 -0000
@@ -2186,17 +2186,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)
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?20080101190607.B957>
