From owner-freebsd-arm@FreeBSD.ORG Tue Feb 7 23:36:07 2012 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 460A2106567E for ; Tue, 7 Feb 2012 23:36:07 +0000 (UTC) (envelope-from marktinguely@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id ECADE8FC15 for ; Tue, 7 Feb 2012 23:36:06 +0000 (UTC) Received: by vbbfa15 with SMTP id fa15so7692464vbb.13 for ; Tue, 07 Feb 2012 15:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=uR9X5ms/T0TyBtmEmxd1pX3D7QGXbNzcCsRRY/oUv2s=; b=htqu2mTSJZhDzd4kNJf0+i7YShgnibySWPZanhlowlVOlyCcpKMplw0c5WByOFO1sp JZ6MwEPRoXEM1VcYBCfJyKGth6MUFq3GqHGelvTRGedZJCD756qoaUgt73yzy7LfVyKd W7gtZYZF2W4gD946fFi3WgW2D9YFqINsJKdJM= MIME-Version: 1.0 Received: by 10.52.66.225 with SMTP id i1mr4999689vdt.65.1328656215360; Tue, 07 Feb 2012 15:10:15 -0800 (PST) Received: by 10.220.156.206 with HTTP; Tue, 7 Feb 2012 15:10:15 -0800 (PST) In-Reply-To: <1328507292.3546.67.camel@revolution.hippie.lan> References: <1327980703.1662.240.camel@revolution.hippie.lan> <1328025245.1662.289.camel@revolution.hippie.lan> <5FB4965A-66C9-4C99-8B61-5AC605F9ECC5@bsdimp.com> <1328030999.1662.324.camel@revolution.hippie.lan> <20120204234319.GR52468@funkthat.com> <1328507292.3546.67.camel@revolution.hippie.lan> Date: Tue, 7 Feb 2012 17:10:15 -0600 Message-ID: From: Mark Tinguely To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Tue, 07 Feb 2012 23:36:07 -0000 On Sun, Feb 5, 2012 at 11:48 PM, Ian Lepore > Okay, I've just confirmed that the problem as I described it above still > exists in 9.0 ... > > =A0 =A0 =A0 =A0# uname -a > =A0 =A0 =A0 =A0FreeBSD =A09.0-RELEASE FreeBSD 9.0-RELEASE #7: Mon Feb =A0= 6 04:38:59 > =A0 =A0 =A0 =A0UTC 2012 > =A0 =A0 =A0 =A0root@revolution.hippie.lan:/usr/obj/arm.arm/usr/src/sys/TF= LEX > =A0 =A0 =A0 =A0arm > > =A0 =A0 =A0 =A0# /usr/tsc/bin/testsimple > =A0 =A0 =A0 =A0Elapsed 0.782453 > =A0 =A0 =A0 =A0# /usr/tsc/bin/testsimple > =A0 =A0 =A0 =A0Elapsed 0.782539 > > =A0 =A0 =A0 =A0# cat /usr/tsc/bin/testsimple >/dev/null > > =A0 =A0 =A0 =A0# /usr/tsc/bin/testsimple > =A0 =A0 =A0 =A0Elapsed 10.090336 > =A0 =A0 =A0 =A0# /usr/tsc/bin/testsimple > =A0 =A0 =A0 =A0Elapsed 10.090611 > > The testsimple program is just a little loop that repeatedly assigns a > volatile variable (had to fool the optimizer into generating some code). > I statically linked it to avoid any variability based on the race > between paging and readahead when loading shared libs. =A0I'm just showin= g > here that the base problem still exists: =A0when executable pages get int= o > the vfs buffer cache they (semi-)permanently lose their i-cache bit. > > I also applied my patches from the start of this thread and re-tested > and they appear to still be a usable workaround for the problem in 9. > But they are just a workaround, we need to figure out a real fix for > this. =A0(I had to enable the #if in ffs_read() as well as the one in > ffs_write() for this test, since my quick 'cat' test is reading the file > to get it into the cache.) > > -- Ian I dug out my files from that era. I was looking at the cases where the page is marked executable and writable= : 1) were they shared or single mappings? 2) are all the shared mappings executable? 3) was the page mapped several time in one process? 4) was the all the writers a kernel process? 5) was there many kernel mappings I was think something like (pardon the bad formatting) if (exec && (exec =3D=3D entries + kentries) && #ifndef test1 (writable =3D=3D 0 || (writable =3D=3D kwritable)) && #else (writable =3D=3D 0 || (writable =3D=3D 1 && kwritable =3D=3D 1)) && #endif (ncaches =3D=3D 0)) { return; /* bypass the cache fix routine */ } this test is just before the comment that says /* * check if the user duplicate mapping has * been removed. */ I never felt brave enough with this test though. --Mark.