Subject: Re: alloc/free for mclpool
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 01/09/2001 08:31:34
On Tue, Jan 09, 2001 at 05:32:53PM +0900, Toru Nishimura wrote:

 > NetBSD/alpha and NetBSD/mips (and probably NetBSD/sh3) leave mb_map
 > global variable to have NULL.  For such the ports the invocation of
 > mclpool_alloc() callback would bring NULL pointer reference in
 > uvm_km_kmemalloc().  This is what I experienced with my own
 > DECstation kernel.   My Q is the reason why the two pools are managed
 > differently and the correct solution for my trouble.

I assume you're running with your new MIPS pmap module.  You should
you have:

/*
 * Alternate mapping hooks for pool pages.  Avoids thrashing the TLB.
 */
#define	PMAP_MAP_POOLPAGE(pa)	MIPS_PHYS_TO_KSEG0((pa))
#define	PMAP_UNMAP_POOLPAGE(va)	MIPS_KSEG0_TO_PHYS((va))

These cause mclpool_alloc()/mclpool_free() to be unused.  The mb_map
is left NULL as a way to indicate to sysctl code that nmclusters can
be modified on platforms that can use direct-mapped segments for pool
pages.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>