lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Apr 2011 10:17:58 +0200
From:	Robert Richter <robert.richter@....com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Ingo Molnar <mingo@...e.hu>, Stephane Eranian <eranian@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] perf, x86: Fix event scheduler to solve complex
 scheduling problems

On 17.04.11 13:23:25, Robert Richter wrote:

>  $ perl counter-scheduling.pl | grep Num
>  Number of counters:  2, loops:  10, redos:   4, ratio: 2.5
>  Number of counters:  3, loops:  26, redos:   7, ratio: 3.7
>  Number of counters:  4, loops:  53, redos:  11, ratio: 4.8
>  Number of counters:  5, loops:  89, redos:  15, ratio: 5.9
>  Number of counters:  6, loops: 134, redos:  19, ratio: 7.1
>  Number of counters:  7, loops: 188, redos:  23, ratio: 8.2
>  Number of counters:  8, loops: 251, redos:  27, ratio: 9.3
>  Number of counters:  9, loops: 323, redos:  31, ratio: 10.4
>  Number of counters: 10, loops: 404, redos:  35, ratio: 11.5
>  Number of counters: 11, loops: 494, redos:  39, ratio: 12.7
>  Number of counters: 12, loops: 593, redos:  43, ratio: 13.8

Wrong, wrong, wrong!

Before wasting your time with this, the script is buggy storing the
correct state:

@@ -35,7 +35,7 @@ while ($scheduled < $num_events) {
     }
 
     $used_mask |= (1 << $idx);
-    push @sched_log, $idx;
+    $sched_log[$scheduled] = $idx;
     printf "Scheduling event #%d on counter #%d\n", $scheduled, $idx;
     $scheduled++;
 }

It's not possible do the calculation for 11 counters in reasonable
time:

 $ perl counter-scheduling.pl | grep Num
 Number of counters:  2, loops:  10, redos:   4, ratio: 2.5
 Number of counters:  3, loops:  48, redos:  15, ratio: 3.2
 Number of counters:  4, loops: 260, redos:  64, ratio: 4.1
 Number of counters:  5, loops: 1630, redos: 325, ratio: 5.0
 Number of counters:  6, loops: 11742, redos: 1956, ratio: 6.0
 Number of counters:  7, loops: 95900, redos: 13699, ratio: 7.0
 Number of counters:  8, loops: 876808, redos: 109600, ratio: 8.0
 Number of counters:  9, loops: 8877690, redos: 986409, ratio: 9.0
 Number of counters: 10, loops: 98641010, redos: 9864100, ratio: 10.0

Updated script attached.

Sorry,

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center

View attachment "counter-scheduling.pl" of type "text/x-perl" (993 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ