From owner-freebsd-arm@FreeBSD.ORG Mon Mar 22 15:06:31 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 D8B431065670 for ; Mon, 22 Mar 2010 15:06:31 +0000 (UTC) (envelope-from mlfbsd@kanar.ci0.org) Received: from kanar.ci0.org (unknown [IPv6:2a01:e0b:1:50:40:63ff:feea:93a]) by mx1.freebsd.org (Postfix) with ESMTP id 75C6D8FC19 for ; Mon, 22 Mar 2010 15:06:31 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id o2MF6X2i018392; Mon, 22 Mar 2010 16:06:33 +0100 (CET) (envelope-from mlfbsd@kanar.ci0.org) Received: (from mlfbsd@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id o2MF6XF7018391; Mon, 22 Mar 2010 16:06:33 +0100 (CET) (envelope-from mlfbsd) Date: Mon, 22 Mar 2010 16:06:33 +0100 From: Olivier Houchard To: Mark Tinguely Message-ID: <20100322150633.GA18277@ci0.org> References: <4B951CE2.6040507@semihalf.com> <201003221455.o2MEt4V5068925@casselton.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003221455.o2MEt4V5068925@casselton.net> User-Agent: Mutt/1.4.2.1i Cc: 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, 22 Mar 2010 15:06:31 -0000 On Mon, Mar 22, 2010 at 09:55:04AM -0500, Mark Tinguely wrote: > On Mon, 08 Mar 2010 16:50:58, Grzegorz Bernacki said: > > > 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. > > > > grzesiek > > Good going Oliver and thank-you on the pmap_enter_pv kernel map patch Revision > 205425. > > Last week, before this patch, Maks Verver was so kind to put some statements > in the VM (vm_page_free_toq()) for the SheevaPlug because I could not cause > these paths with the Gumstix emulator. Maks, could you add to > vm_phys_free_pages(): > > if (m->md.pv_kva) > + { > + printf("vm_phys_free_pages: md.pv_kva 0x%08x\n", m->md.pv_kva); > m->md.pv_kva = 0; > + } > > Even on the Gumstix emulator with the current patch, pmap_fix_cache() still > has many executable pages that have both a kernel and user pv_entry. Looks > like something like the above patch is still needed. > I added a few printf and saw the same thing, however isn't assuming we shouldn't modify the cache settings if the page is executable a bit dangerous ? Or did I misread your patch ? Olivier