From owner-p4-projects@FreeBSD.ORG Thu Jan 12 07:19:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15E6716A422; Thu, 12 Jan 2006 07:19:19 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD79716A41F for ; Thu, 12 Jan 2006 07:19:18 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC93043D45 for ; Thu, 12 Jan 2006 07:19:18 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0C7JIux068894 for ; Thu, 12 Jan 2006 07:19:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0C7JIPW068891 for perforce@freebsd.org; Thu, 12 Jan 2006 07:19:18 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 12 Jan 2006 07:19:18 GMT Message-Id: <200601120719.k0C7JIPW068891@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 89546 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 07:19:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=89546 Change 89546 by kmacy@kmacy:freebsd7_xen3 on 2006/01/12 07:18:18 in contigmalloc / contigfree add in functions for creating physically (in machine pages) contiguous extents Affected files ... .. //depot/projects/xen3/src/sys/vm/vm_contig.c#2 edit Differences ... ==== //depot/projects/xen3/src/sys/vm/vm_contig.c#2 (text+ko) ==== @@ -562,6 +562,7 @@ vm_page_t pages; vm_pindex_t npgs; + /* XXXEN should consider rounding to nearest power of two */ npgs = round_page(size) >> PAGE_SHIFT; mtx_lock(&Giant); if (vm_old_contigmalloc) { @@ -573,6 +574,14 @@ if (pages == NULL) { ret = NULL; } else { +#ifdef XEN + /* make the logically contiguous pages - physically contiguous in + * memory - note that we do not in fact need the pages to be logically + * contiguous, but I am leaving it as is for now for the sake of + * expediency - kmacy + */ + xen_create_contiguous_region(pages, npgs); +#endif ret = contigmalloc2(pages, npgs, flags); if (ret == NULL) vm_page_release_contig(pages, npgs); @@ -590,6 +599,9 @@ vm_pindex_t npgs; npgs = round_page(size) >> PAGE_SHIFT; +#ifdef XEN + xen_destroy_contiguous_region(addr, npgs); +#endif kmem_free(kernel_map, (vm_offset_t)addr, size); malloc_type_freed(type, npgs << PAGE_SHIFT); }