From owner-freebsd-arm@FreeBSD.ORG Thu May 12 17:31:42 2011 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 B471F106564A for ; Thu, 12 May 2011 17:31:42 +0000 (UTC) (envelope-from vladimir-its@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mx1.freebsd.org (Postfix) with ESMTP id 649898FC14 for ; Thu, 12 May 2011 17:31:42 +0000 (UTC) Received: from web156.yandex.ru (web156.yandex.ru [95.108.131.169]) by forward15.mail.yandex.net (Yandex) with ESMTP id 439D09E0C41; Thu, 12 May 2011 21:31:19 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1305221479; bh=ZDlakgG27CPZHF86XUdgSmDlYfRh1HD2HLu+TFQ8p94=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=OHHrB2fV4jPnCyl3dPfCKZCntUNfYKg5bbR4ex16IV6f5dkvs1RiFRtb8UjCsi/cg aERUFV0x/SKacbxbbu/QwE/aBYCzUKq0eaRfa5mxZtzATx9/hAlcENnDMs3gF3tGBE mvzQjCEhASCdE1yQWkWxCg8YbqamruxkGtMW/uig= Received: from localhost (localhost.localdomain [127.0.0.1]) by web156.yandex.ru (Yandex) with ESMTP id 2E7E542381D7; Thu, 12 May 2011 21:31:19 +0400 (MSD) X-Yandex-Spam: 1 Received: from 91.206.19.225.base-net.ru (91.206.19.225.base-net.ru [91.206.19.225]) by mail.yandex.ru with HTTP; Thu, 12 May 2011 21:31:15 +0400 From: =?koi8-r?B?98zBxMnNydIg5sXdxc7Lzw==?= To: Mark Tinguely In-Reply-To: <4DCBEB00.3040608@gmail.com> References: <578421305188959@web64.yandex.ru> <4DCBEB00.3040608@gmail.com> MIME-Version: 1.0 Message-Id: <881651305221476@web156.yandex.ru> Date: Thu, 12 May 2011 21:31:15 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-Mailman-Approved-At: Thu, 12 May 2011 18:13:55 +0000 Cc: freebsd-arm@freebsd.org Subject: Re: S3C2440A strange perfomance issue 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: Thu, 12 May 2011 17:31:42 -0000 12.05.2011, 18:13, "Mark Tinguely" : > On 5/12/2011 3:29 AM, ÷ÌÁÄÉÍÉÒ æÅÝÅÎËÏ wrote: > >> š%cc -O0 -o test test.c >> >> šand execute it: >> >> šCode: >> >> š%/usr/bin/time -l ./test >> šššššššš120.16 real šššššš119.44 user šššššššš0.16 sys >> ššššššš12177 šinvoluntary context switches >> >> štime of execution is over 120 sec ... but after system reboot: >> >> šCode: >> >> š%/usr/bin/time -l ./test >> šššššššššš2.85 real šššššššš2.55 user šššššššš0.25 sys >> ššššššššš292 šinvoluntary context switches >> >> šexecution time is 2.85(!) sec, but it's not all! >> >> šCode: >> >> š%cat test> š/dev/null >> >> š%/usr/bin/time -l ./test >> šššššššš120.40 real šššššš119.51 user šššššššš0.23 sys >> ššššššš12201 šinvoluntary context switches >> >> šOnce the file has been opened for reading (cat test> š/dev/null), execution time again increased to 120 sec (until the next reboot). >> >> šWhat is it?! > > Sounds like the executable cache gets disabled on the executable page > that is also writable issue that we talked about year or so ago. If you > want a quick test, in pmap_fix_cache(), and exit the routine immediately > if the mapping is executable. I did some tracing, and there are cases > where this is not the correct solution - executable mappings that are > really shared and cache should be disabled. I have a idea level patch > for this but never tested it well enough. > > I also notice a huge jump in "involuntary context switch" counts in your > runs. > > --Mark Tinguely please, i want code sample for use pmap_fix_cache() :) may be this issue is caching problem ... but why 'open for read' make this effect?