Date: Tue, 05 Aug 2008 11:23:37 +0200 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: freebsd-arch@freebsd.org Subject: UMA MD Small Allocator Runtime Switching Message-ID: <48981C19.8060009@freebsd.org>
next in thread | raw e-mail | index | archive | help
I'm working on the PowerPC G5 port right now, and have run into a problem with the way the UMA small allocator works. On G3/G4 systems, there is a direct physical->virtual mapping, and on G5s there isn't. All of the infrastructure is in place to support both types of system with a single kernel image, except that UMA_MD_SMALL_ALLOC must be switched on/off at runtime. One solution is to put if (direct_map) use_nonsmall_case() into the MD small_alloc/free() routines and define UMA_MD_SMALL_ALLOC everywhere. This works well, except that the MI UMA code then sets booted = 1 too early in the boot process, before the kmem_alloc*() routines are available. Basically, I need to find a way have an MD UMA allocator without the MI UMA code assuming anything about how it works internally. Maybe adding a UMA_MD_ALLOC_LATE define to prevent setting booted=1 early on? -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48981C19.8060009>