Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2000 00:11:06 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Anton Berezin <tobez@tobez.org>
Cc:        Alfred Perlstein <bright@wintelcom.net>, ps@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: vm_pageout_scan badness
Message-ID:  <200010260711.e9Q7B6q32884@earth.backplane.com>
References:  <20001024112708.E28123@fw.wintelcom.net> <200010242010.e9OKAJK19739@earth.backplane.com> <20001025123154.A56298@heechee.tobez.org>

next in thread | previous in thread | raw e-mail | index | archive | help
:On Tue, Oct 24, 2000 at 01:10:19PM -0700, Matt Dillon wrote:
:>     Ouch.  The original VM code assumed that pages would not often be
:>     ripped out from under the pageadaemon, so it felt free to restart
:>     whenever.  I think you are absolutely correct in regards to the
:>     clustering code causing nearby-page ripouts.
:> 
:>     I don't have much time available, but let me take a crack at the
:>     problem tonight.
:
:While you are at it, would you care and have a look at PR19672.  It
:seems to be at least remotely relevant.  ;-)

    Hmmm.  Blech.  contigmalloc is aweful.  I'm not even sure if what
    it is doing is legal!  If it can't find contiguous space it
    tries to flush the entire inactive and active queues.  Every
    single page!  not to mention the insane restarting.  The 
    algorithm is O(N^2) on an idle machine, and even worse on
    machines that might be doing something.

    There is no easy fix.  contigmalloc would have to be completely
    rewritten.  We could use the placemarker idea to make the loop
    'retry' the page that blocked rather then restart at the beginning,
    but the fact that contigmalloc tries to flush the entire page
    queue means that it could very trivially get stuck on dead devices
    (e.g. like a dead NFS mount).  Also, if we don't restart, there is
    less of a chance that contigmalloc can find sufficient free space.
    When it frees pages it does so half-hazzardly, and when it flushes
    pages out it makes no attempt to free them so an active process
    may reuse the page instantly.  Bleh.

    I'm afraid I don't have the time to rewrite contigmalloc myself, but
    my brain is available to answer questions if someone else wants to
    have a go at it.

					    -Matt

:Cheers,
:%Anton.
:-- 
:<img align="lawful"> and <img align="chaotic"> would be a nice addition
:to HTML specification.
:



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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