From owner-freebsd-arm@FreeBSD.ORG Tue Jul 20 17:10:42 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D541106566B; Tue, 20 Jul 2010 17:10:42 +0000 (UTC) (envelope-from marktinguely@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 041318FC14; Tue, 20 Jul 2010 17:10:41 +0000 (UTC) Received: by gwb19 with SMTP id 19so3012595gwb.13 for ; Tue, 20 Jul 2010 10:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=dKnCJPM0gWy6viym9dAwJiS5D6RYY8CHS0XG/MhCZq4=; b=mCAEofPOeKAE/RmOop0xysVOgSb0U8tSz9yvqM1Sj8T+Ahm6Oqbp4xctrpjf2T87HB IoBQxekfqDX7RkNuJGwMDGPemJ7MLEZRlIiSBf3O0y2jnLxCAJyFEE9ufde8A3KGmjX3 WiG7MQ4Wxh0TmunTicrTYLKlgoNdnl8wFbN/8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=mLFYKg1HB0NevRUUjIgRH+YUf9lsVqVgjmFx9/cnZARcFKQRc2/CrmID/qgUtUmlH7 zL7F1VkdBqHnibHpZ+YKtc1pHiNYeXM8OYxVMQWXkJTX6eohjMpkvLSdY35Uk/EfSxkC sRMkm390eQOGCeUlNCXejwQMV9N/qNE4K8LwU= Received: by 10.150.208.1 with SMTP id f1mr642361ybg.331.1279645838244; Tue, 20 Jul 2010 10:10:38 -0700 (PDT) Received: from [192.168.0.3] (71-38-48-15.frgo.qwest.net [71.38.48.15]) by mx.google.com with ESMTPS id e8sm27759384ibb.20.2010.07.20.10.10.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 10:10:37 -0700 (PDT) Message-ID: <4C45D88A.30107@gmail.com> Date: Tue, 20 Jul 2010 12:10:34 -0500 From: Mark Tinguely User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org Subject: Revision 209887 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:10:42 -0000 This is a FYI on the pmap_qenter() change in the i386/amd64 - revision 209887. PS to last week's email. Sorry I did not keep the message-id consistent. A similar change in the ARM pmap_kenter_internal() seems to help significantly. Running a port (bash3) compile on a modified GUMSTIX kernel on an emulator, I am getting mid-teen percentages of mapping request that we do not have to do. An example snapshot of the counts: 2475 kenter()s not needed. 11479 enters required. All 11479 old ptes were zero because we aggressively remove dangling allocation. As the compilation continues, the ratio between kenter()s not needed per kenters() needed goes up. The numbers above assume a patch for vfs_unbusy_pages() that is the duplicate to the one in bufdone_finish(). In theory the vfs_unbusy_pages() should help keep the number of unnecessary pmap_qenter() calls down, so the above numbers could only be higher without that patch. I also propose to removed the calls to pmap_wb_page() in pmap_qenter() and pmap_inv_page() in pmap_qremove(): In pmap_qenter(), pmap_fix_cache() will write back the page mappings and turn off caching if shared. If the page was shared when pmap_qremove() is called, the caches will already be turned off, and pmap_kremove() will writeback and invalidate this mapping during the removal process. --Mark.