This commit was manufactured by cvs2svn to create branch 'RELENG_3'.
Now we're -STABLE
MFC: rev 1.48 (PR docs/9603)
MFC: allow VM_KMEM_SIZE to be overriden from the kernel environment.
MFC: extra help for kernel tunable overrides.
MFC: Revert renaming of globals that broke make world.
MFC: Typo police.
    Backport from -4.x.  Move splmem() from after autoinit to before autoinit
    to handle possible initialization race.
    Backport from -4.x.  Not really a bug, but cleanup manual clearing of
    PG_BUSY to formal clearing using vm_page_wakeup().
    vm_page_sleep() can't just be called once with the assumption that the
    page will be unbusied, it doesn't work that way.   Fixed to call it in
    a loop until the page is truely unbusy.
    Backport from -4.x.  We are supposed to wait while the page is busy before
    messing with it, but the VM code was special-casing a m->busy page that
    was still valid ( i.e. usually a pageout ) and allowing it through.  The
    problem is that whatever m->busy'd the page is probably still depending on
    it not being messed with.  Specifically, I am thinking of the
    vm_pager_get_pages() code where the OBJT_VNODE pager converts PG_BUSY
    to m->busy for the read operation.    While this code may not be
    specifically broken for the case, it does initially set PG_BUSY and assume
    that it has the entire page to itself... but OBJT_VNODE converts it to
    m->busy.  It is just too dangerous to allow the special case optimization
    through.

    Removing the special optimization should have no discernable effect since
    pageout operates mark resident pmap pte's READ-ONLY rather then unmapping
    them, and so no fault normally occurs.
    Backport from -4.x

    We should never use vm_page_flag_clear() to clear PG_BUSY.  We need
    to use vm_page_wakeup() to handle side effects such as waking up waiters.
    Backport from -4.x

    PG_BUSY was being tested without splvm() protection.  We have to test
    it again with splvm() protection before we can actually sleep.
    Backport from -4.x

    I do not believe there is a bug here because we do check that no paging
    is in progress on the object.  However, the code is too fragile, we
    do not take any chances with PG_BUSY so we have a check for busy pages
    before we busy it ourself.
    Backport from -4.x.

    We cannot call vm_object_collapse() here because it could block and
    we are not holding any locks on our vm_object or vm_page_t.  If it
    were to block, the system might shred the objects that we assume remain
    consistent.

    John Dyson is not 100% sure that VM objects are collapsed properly
    in all cases ( i.e. 'garbage collected' ), and this code was originally
    put in to solve a related problem.  For now we assume that VM objects
    are collapsed properly.  If it turns out they are not, we will fix
    that problem.  The problem this patch fixes, however, could cause a crash
    and must be fixed now.
    Backport from -4.x

    Fix madvise().  We were only supposed to madvise() on default or swap
    store.  The old code was mostly broken and totally non-working, but
    even so there *were* some holes in the old code that let through things
__FreeBSD_version -> 300007 to indicate 3.0-stable branch.
MFC: Push version numbers up to 1.00.
MFC: fix multicast receive code
Fix read error not being detected.

Reported by: Andreas Klemm <andreas@klemm.gtn.com>