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:	Sat, 17 Nov 2007 05:43:33 +1030
From:	David Newall <david@...idnewall.com>
To:	Micah Dowty <micah@...are.com>
CC:	Kyle Moffett <mrmacman_g4@....com>,
	Cyrus Massoumi <cyrusm@....net>,
	LKML Kernel <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>, Andrew Morton <akpm@...l.org>,
	Mike Galbraith <efault@....de>,
	Paul Menage <menage@...gle.com>,
	Christoph Lameter <clameter@....com>
Subject: Re: High priority tasks break SMP balancer?

There are a couple of points I would make about your python test 
harness.  Your program compares real+system jiffies for both cpus; an 
ideal result would be 1.00.  The measurement is taken over a relatively 
short period of approximately a half-second, and you kill the CPU hogs 
before taking final measurements, even wait for them to die first.  You 
repeat this measurement, starting and killing CPU hogs each time.  Why 
do you do that?

What happens if you start the hogs and take the baseline outside of the 
loop?

    from __future__ import division
    import sys, os, time

    def getCpuTimes():
        cpu0 = 0
        cpu1 = 1
        for line in open("/proc/stat"):
            tokens = line.split()
            if tokens[0] == "cpu0":
                cpu0 = int(tokens[1]) + int(tokens[3])
            elif tokens[0] == "cpu1":
                cpu1 = int(tokens[1]) + int(tokens[3])
        return cpu0, cpu1

    pid = os.spawnl(os.P_NOWAIT, "./priosched")
    baseline = getCpuTimes()
    while True:
        time.sleep(0.5)
        current = getCpuTimes()
        print "%.04f" % (current[0] - baseline[0]) / (current[1] -
    baseline[1])

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ