Date: Fri, 11 Nov 2005 19:14:49 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 86662 for review Message-ID: <200511111914.jABJEnRC028175@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=86662 Change 86662 by millert@millert_ibook on 2005/11/11 19:14:16 Remove my horrible hack to make M_NOWAIT sort of work. It is too specific to the size of the policy to be loaded and doesn't really help anything. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#11 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#20 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#11 (text+ko) ==== @@ -103,7 +103,7 @@ #define kmalloc(size, flags) sebsd_malloc(size, flags) #define kfree(addr) sebsd_free(addr) #define __get_free_page(flags) sebsd_malloc(PAGE_SIZE, flags) -#define GFP_ATOMIC M_NOWAIT +#define GFP_ATOMIC M_WAITOK /* XXX - want M_NOWAIT but too early */ #define GFP_KERNEL M_WAITOK /* TBD: no boot-time tunable support yet */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#20 (text+ko) ==== @@ -76,27 +76,6 @@ #include <vm/vm_kern.h> #include <kern/kalloc.h> -/* - * XXX - * Hack to populate the free list with lots of small allocations. - * Needed to make non-blocking allocations work early on in the - * boot sequence. Otherwise we crash in avc_init(). - * XXX - */ -void -sebsd_malloc_init(void) -{ - int i; - vm_offset_t prealloc[512]; - - for (i = 0; i < 512; i++) { - if ((prealloc[i] = kalloc(64)) == NULL) - break; - } - while (i--) - kfree(prealloc[i], 64); -} - void * sebsd_malloc(size_t size, int flags) { @@ -153,7 +132,6 @@ { printf("sebsd:: init\n"); - sebsd_malloc_init(); avc_init(); //sebsd_register_sysctls(); if (security_init()) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511111914.jABJEnRC028175>