Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2011 09:13:20 -0500
From:      Mark Tinguely <marktinguely@gmail.com>
To:        =?UTF-8?B?0JLQu9Cw0LTQuNC80LjRgCDQpNC10YnQtdC90LrQvg==?= <vladimir-its@yandex.ru>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: S3C2440A strange perfomance issue
Message-ID:  <4DCBEB00.3040608@gmail.com>
In-Reply-To: <578421305188959@web64.yandex.ru>
References:  <578421305188959@web64.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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