From owner-freebsd-mips@FreeBSD.ORG Fri Apr 30 11:04:37 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7BC81065672; Fri, 30 Apr 2010 11:04:37 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mx1.freebsd.org (Postfix) with ESMTP id 75AFA8FC18; Fri, 30 Apr 2010 11:04:37 +0000 (UTC) Received: by pzk39 with SMTP id 39so39609pzk.7 for ; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=Fz93eR0U4hKIHr6gMcdan7RoNoxJGNrRkCmGjnDWJic=; b=mdmS3/8FOTyGjXopS5n7QLan51pi94X/uVcubJR3VkT190Qqr4eAGFX62TdBi8mYL9 M5j8CRPf4Ur8AM4Ot1TY0PryS9wlafo/dxcrDPLye1MBXXDSZH0BMnooICOkD/abp2ap DoYLOyq1jF6aBYjiF2mWlegUNma5x8uiklyl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=Evsj1AIRn9lVQdoG6Nq27za37NdsFWoyzA0dt4mXp9JzuY8Ax05DDjgO6nUFPt9qeo pwpC47Rll8tFpe2sv8/SFaj+9on43YtAuUVPXpJdY1Cj9OCstQJ4JXZo99LtoqKvl1iw c9Fa7U05R3Eu7+4K5jG5iSC61eqFCtZB54ok4= MIME-Version: 1.0 Received: by 10.140.58.2 with SMTP id g2mr682711rva.172.1272625465473; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) Date: Fri, 30 Apr 2010 16:34:25 +0530 Message-ID: From: "C. Jayachandran" To: freebsd-mips@freebsd.org, Randall Stewart Content-Type: multipart/mixed; boundary=001636b2ac73cd39ad0485723460 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Alternate scheme for page table page allocation 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: Fri, 30 Apr 2010 11:04:37 -0000 --001636b2ac73cd39ad0485723460 Content-Type: text/plain; charset=ISO-8859-1 I was looking at a hang I get during 'make -j32 buildworld' on XLR SMP, and as far as I can see, it is caused by the way page table pages are allocated when we have >512MB memory. The attached patch (http://sites.google.com/site/cjayachandran/files//pmap-page-alloc.patch) changes the way pages for the PTE/PDE entries are allocated in systems with >512M. This scheme uses vm_phys_alloc_contig to allocate page table pages KSEG0 region and has a UMA zone to cache them. This will allow us to avoid multi-TLB misses that happen when we access page table entires in the TLB miss handler. I think a similar approach can be taken to allocate 8K page-pairs for N32(for >4GB RAM) and N64. With this patch, 'make -j32 buildworld' consistently works with 32 cpus on an XLR is booted SMP with 4GB RAM. With the current page alloc code, I get a hang about an hour into buildworld. The patch is based off r206712 - I still have not found a fix for the crashes I see in versions after that. Please let me know your comments, especially if you can think of a better way of doing this. I can make a version of this patch for HEAD if this is acceptable. JC. --001636b2ac73cd39ad0485723460--