Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2003 20:58:45 +0000
From:      Bosko Milekic <bmilekic@technokratis.com>
To:        Bosko Milekic <bmilekic@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/alpha/alpha pmap.c src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c src/sys/ia64/ia64 pmap.c src/sys/powerpc/powerpc pmap.c
Message-ID:  <20030731205845.GA14545@technokratis.com>
In-Reply-To: <200307310339.h6V3dpH9006124@repoman.freebsd.org>
References:  <200307310339.h6V3dpH9006124@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, Jul 30, 2003 at 08:39:51PM -0700, Bosko Milekic wrote:
> bmilekic    2003/07/30 20:39:51 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/alpha/alpha      pmap.c 
>     sys/amd64/amd64      pmap.c 
>     sys/i386/i386        pmap.c 
>     sys/ia64/ia64        pmap.c 
>     sys/powerpc/powerpc  pmap.c 
>   Log:
>   Make sure that when the PV ENTRY zone is created in pmap, that it's
>   created not only with UMA_ZONE_VM but also with UMA_ZONE_NOFREE.  In
>   the i386 case in particular, the pmap code would hook a special
>   page allocation routine that allocated from kernel_map and not kmem_map,
>   and so when/if the pageout daemon drained the zones, it could actually
>   push out slabs from the PV ENTRY zone but call UMA's default page_free,
>   which resulted in pages allocated from kernel_map being freed to
>   kmem_map; bad.  kmem_free() ignores the return value of the
>   vm_map_delete and just returns.  I'm not sure what the exact
>   repercussions could be, but it doesn't look good.
>   
>   In the PAE case on i386, we also set-up a zone in pmap, so be
>   conservative for now and make that zone also ZONE_NOFREE and
>   ZONE_VM.  Do this for the pmap zones for the other archs too,
>   although in some cases it may not be entirely necessarily.  We'd
>   rather be safe than sorry at this point.

  Upon further consideration, it turns out that the pageout daemon is
  only initialized much after proc0, where the PV ENTRY zone has an
  object set and hence has NOFREE set implicitly by UMA.

  I'll have to consider this a little further to make sure, but I still
  think that explicitly creating the zone NOFREE is a good idea, just to
  be on the safe side (and to make it clear, particularly since the
  pmap_zone_set_obj() is done much later).

>   Perhaps all UMA_ZONE_VM zones should by default be also
>   UMA_ZONE_NOFREE?
>   
>   May fix some of silby's crashes on the PV ENTRY zone.
>   
>   Revision  Changes    Path
>   1.132     +1 -1      src/sys/alpha/alpha/pmap.c
>   1.427     +1 -1      src/sys/amd64/amd64/pmap.c
>   1.420     +3 -2      src/sys/i386/i386/pmap.c
>   1.117     +2 -2      src/sys/ia64/ia64/pmap.c
>   1.62      +2 -2      src/sys/powerpc/powerpc/pmap.c
> 

-- 
Bosko Milekic  *  bmilekic@technokratis.com  *  bmilekic@FreeBSD.org
TECHNOkRATIS Consulting Services  *  http://www.technokratis.com/



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