From owner-freebsd-arm@FreeBSD.ORG Mon Mar 8 16:23:18 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 5FE551065670 for ; Mon, 8 Mar 2010 16:23:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1FC968FC12 for ; Mon, 8 Mar 2010 16:23:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o28GEpiU082496; Mon, 8 Mar 2010 09:14:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 08 Mar 2010 09:15:16 -0700 (MST) Message-Id: <20100308.091516.295937982770284454.imp@bsdimp.com> To: gjb@semihalf.com From: "M. Warner Losh" In-Reply-To: <4B951CE2.6040507@semihalf.com> References: <201003072125.o27LPfFb000968@casselton.net> <4B951CE2.6040507@semihalf.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: tinguely@casselton.net, freebsd-arm@freebsd.org Subject: Re: Performance of SheevaPlug on 8-stable 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: Mon, 08 Mar 2010 16:23:18 -0000 cIn message: <4B951CE2.6040507@semihalf.com> Grzegorz Bernacki writes: : This is probably caused by mechanism which turns of cache for shared : pages. : When I add applied following path: : : diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c : index 390dc3c..d17c0cc 100644 : --- a/sys/arm/arm/pmap.c : +++ b/sys/arm/arm/pmap.c : @@ -1401,6 +1401,8 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, : vm_offset_t va) : */ : : TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) { : + if (pv->pv_flags & PVF_EXEC) : + return; : /* generate a count of the pv_entry uses */ : if (pv->pv_flags & PVF_WRITE) { : if (pv->pv_pmap == pmap_kernel()) : : execution time of 'test' program is: : mv78100-4# time ./test : 5.000u 0.000s 0:05.40 99.8% 40+1324k 0+0io 0pf+0w : : and without this path is: : mv78100-4# time ./test : 295.000u 0.000s 4:56.01 99.7% 40+1322k 0+0io 0pf+0w : : : I think we need to handle executable pages in different way. Agreed. Why would we turn off caching for shared pages? I can understand read/write pages in a system that has a virtually index cache with the classic cache aliasing problems as a workaround for lousy hardware, but otherwise, this one has me scratching my head... And if there's only one copy of 'test' running, why does it hit the 'shared' case for this code? Warner