Date: Sun, 7 May 2006 21:19:29 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96786 for review Message-ID: <200605072119.k47LJTdu021065@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96786 Change 96786 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/05/07 21:19:03 limit the range that vm_page_alloc_contig can allocate from to work around its poor handling of small memory ranges scrub hash table when a process exits as a workaround for finding entries in the hash that don't exist in the pv list Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#25 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#25 (text+ko) ==== @@ -180,7 +180,6 @@ uma_zone_set_obj(thzone, &thzone_obj, tte_hash_max); } - tte_hash_t tte_hash_kernel_create(vm_offset_t va, uint64_t size) { @@ -195,7 +194,6 @@ return th; } - tte_hash_t tte_hash_create(uint64_t context, uint64_t *scratchval) { @@ -212,17 +210,17 @@ m = NULL; while (m == NULL) { - m = vm_page_alloc_contig(HASH_SIZE, 2*PAGE_SIZE_4M, - (1UL<<34), PAGE_SIZE, (1UL<<34)); + m = vm_page_alloc_contig(HASH_SIZE, phys_avail[0], + phys_avail[1], PAGE_SIZE, (1UL<<34)); if (m == NULL) { printf("vm_page_alloc_contig failed - waiting to retry\n"); VM_WAIT; } } - for (i = 0, tm = m; i < HASH_SIZE; i++, tm++) { + for (i = 0, tm = m; i < HASH_SIZE; i++, tm++) if ((tm->flags & PG_ZERO) == 0) pmap_zero_page(tm); - } + th->th_hashtable = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m)); m = NULL; while (m == NULL) { @@ -268,6 +266,9 @@ fh->thf_head.fh_free_head = 0; if (th->th_entries != 0) panic("%d remaining entries", th->th_entries); +#ifndef DONT_SCRUB_ENTRIES + pmap_scrub_pages(TLB_DIRECT_TO_PHYS((vm_offset_t)th->th_hashtable), th->th_size*PAGE_SIZE); +#endif } static __inline void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605072119.k47LJTdu021065>