From owner-cvs-src-old@FreeBSD.ORG Wed Jul 21 18:33:30 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41EC2106564A for ; Wed, 21 Jul 2010 18:33:30 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1549E8FC1A for ; Wed, 21 Jul 2010 18:33:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LIXTCt099553 for ; Wed, 21 Jul 2010 18:33:29 GMT (envelope-from jchandra@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o6LIXTk7099552 for cvs-src-old@freebsd.org; Wed, 21 Jul 2010 18:33:29 GMT (envelope-from jchandra@repoman.freebsd.org) Message-Id: <201007211833.o6LIXTk7099552@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jchandra@repoman.freebsd.org using -f From: "Jayachandran C." Date: Wed, 21 Jul 2010 09:27:00 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/mips/include vmparam.h src/sys/mips/mips pmap.c src/sys/vm vm_page.c vm_page.h vm_phys.c vm_phys.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 18:33:30 -0000 jchandra 2010-07-21 09:27:00 UTC FreeBSD src repository Modified files: sys/mips/include vmparam.h sys/mips/mips pmap.c sys/vm vm_page.c vm_page.h vm_phys.c vm_phys.h Log: SVN rev 210327 on 2010-07-21 09:27:00Z by jchandra Redo the page table page allocation on MIPS, as suggested by alc@. The UMA zone based allocation is replaced by a scheme that creates a new free page list for the KSEG0 region, and a new function in sys/vm that allocates pages from a specific free page list. This also fixes a race condition introduced by the UMA based page table page allocation code. Dropping the page queue and pmap locks before the call to uma_zfree, and re-acquiring them afterwards will introduce a race condtion(noted by alc@). The changes are : - Revert the earlier changes in MIPS pmap.c that added UMA zone for page table pages. - Add a new freelist VM_FREELIST_HIGHMEM to MIPS vmparam.h for memory that is not directly mapped (in 32bit kernel). Normal page allocations will first try the HIGHMEM freelist and then the default(direct mapped) freelist. - Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist. The MIPS page table pages will be allocated using this function from the freelist containing direct mapped pages. - Move the page initialization code from vm_phys_alloc_contig() to a new function vm_page_alloc_init(), and use this function to initialize pages in vm_page_alloc_freelist() too. - Split the function vm_phys_alloc_pages(int pool, int order) to create vm_phys_alloc_freelist_pages(int flind, int pool, int order), and use this function from both vm_page_alloc_freelist() and vm_phys_alloc_pages(). Reviewed by: alc Revision Changes Path 1.6 +14 -4 src/sys/mips/include/vmparam.h 1.69 +34 -100 src/sys/mips/mips/pmap.c 1.419 +89 -0 src/sys/vm/vm_page.c 1.178 +3 -0 src/sys/vm/vm_page.h 1.14 +61 -74 src/sys/vm/vm_phys.c 1.7 +1 -0 src/sys/vm/vm_phys.h