From owner-freebsd-mips@FreeBSD.ORG Mon Dec 6 17:04:32 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E18ED1065673 for ; Mon, 6 Dec 2010 17:04:32 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mx1.freebsd.org (Postfix) with ESMTP id B76E38FC20 for ; Mon, 6 Dec 2010 17:04:32 +0000 (UTC) Received: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id E0C0028F6FF; Mon, 6 Dec 2010 11:04:31 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id NiqJIphKCUBm; Mon, 6 Dec 2010 11:04:31 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id ACDC128F6F9; Mon, 6 Dec 2010 11:04:30 -0600 (CST) Message-ID: <4CFD179D.7000005@rice.edu> Date: Mon, 06 Dec 2010 11:04:29 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: "Jayachandran C." References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , freebsd-mips@freebsd.org Subject: Re: uma_small_alloc from direct mapped memory. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 17:04:33 -0000 Jayachandran C. wrote: > Hi all, > > The attached patch uses the mechanism used to allocate page table > pages for UMA small allocations too. This will make sure that all the > small UMA allocations comes from KSEG0 pages in 32 bit and XKPHYS in > 64bit. > > This reduces TLB misses in kernel code significantly, and can give > major performance advantage for applications that spent a lot of time > in kernel. > > Please let me know your comments. > > It looks ok. My only suggested change is that you follow the precedent of amd64, ia64, and powerpc, and place uma_small_alloc() and uma_small_free() in a new file, mips/mips/uma_machdep.c. Alan