Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2004 10:35:28 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <bde@FreeBSD.org>, src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_glue.c
Message-ID:  <200401291035.28734.jhb@FreeBSD.org>
In-Reply-To: <200401291235.i0TCZBDG036160@repoman.freebsd.org>
References:  <200401291235.i0TCZBDG036160@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 29 January 2004 07:35 am, Bruce Evans wrote:
> bde         2004/01/29 04:35:11 PST
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/vm               vm_glue.c
>   Log:
>   Fixed breakage of scheduling in rev.1.29 of subr_4bsd.c.  The
>   "scheduler" here has very little to do with scheduling.  It is actually
>   the swapper, and it really must be the last SYSINIT'ed item like its
>   comment says, since proc0 metamorphoses into swapper by calling
>   scheduler() last in mi_start(), and scheduler() never returns..  Rev.1.29
>   of subr_4bsd.c broke this by adding another SI_ORDER_FIRST item
>   (kproc_start() for schedcpu_thread() onto the SI_SUB_RUN_SCHEDULER_LIST.
>   The sorting of SYSINITs with identical orders (at all levels) is
>   apparently nondeterministic, so this resulted in schedule() sometimes
>   being called second last and schedcpu_thread() not being called at all.
>
>   This quick fix just changes the code to almost match the comment
>   (SI_ORDER_FIRST -> SI_ORDER_ANY).  "LAST" is misspelled "ANY", and
>   there is no way to ensure that there is only 1 very lst SYSINIT.
>   A more complete fix would remove the SYSINIT obfuscation.

Wow, good catch.  My bad. :(

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401291035.28734.jhb>