Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2011 21:31:15 +0400
From:      =?koi8-r?B?98zBxMnNydIg5sXdxc7Lzw==?= <vladimir-its@yandex.ru>
To:        Mark Tinguely <marktinguely@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: S3C2440A strange perfomance issue
Message-ID:  <881651305221476@web156.yandex.ru>
In-Reply-To: <4DCBEB00.3040608@gmail.com>
References:  <578421305188959@web64.yandex.ru> <4DCBEB00.3040608@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
12.05.2011, 18:13, "Mark Tinguely" <marktinguely@gmail.com>:
> 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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?881651305221476>