Re: [patch 9/9] Scheduler profiling - Use conditional calls

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Friday, June 1, 2007 - 8:54 am

* Andrew Morton (akpm@linux-foundation.org) wrote:

Sure, here is the result of a small test comparing:
1 - Branch depending on a cache miss (has to fetch in memory, caused by a 128
    bytes stride)). This is the test that is likely to look like what
    side-effect the original profile_hit code was causing, under the
    assumption that the kernel is already using L1 and L2 caches at
    their full capacity and that a supplementary data load would cause
    cache trashing.
2 - Branch depending on L1 cache hit. Just for comparison.
3 - Branch depending on a load immediate in the instruction stream.

It has been compiled with gcc -O2. Tests done on a 3GHz P4.

In the first test series, the branch is not taken:

number of tests : 1000
number of branches per test : 81920
memory hit cycles per iteration (mean) : 48.252
L1 cache hit cycles per iteration (mean) : 16.1693
instruction stream based test, cycles per iteration (mean) : 16.0432


In the second test series, the branch is taken and an integer is
incremented within the block:

number of tests : 1000
number of branches per test : 81920
memory hit cycles per iteration (mean) : 48.2691
L1 cache hit cycles per iteration (mean) : 16.396
instruction stream based test, cycles per iteration (mean) : 16.0441

Therefore, the memory fetch based test seems to be 200% slower than the
load immediate based test.

(I am adding these results to the documentation)

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Wed May 30, 7:00 am)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, William Lee Irwin III, (Wed May 30, 1:59 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Thu May 31, 2:12 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Thu May 31, 2:36 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Thu May 31, 3:07 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, William Lee Irwin III, (Thu May 31, 4:41 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Fri Jun 1, 8:54 am)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Fri Jun 1, 9:33 am)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Mon Jun 4, 3:20 pm)
Re: [patch 9/9] Scheduler profiling - Use conditional calls, Mathieu Desnoyers, (Mon Jun 4, 3:20 pm)