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:   Sun, 11 Nov 2018 16:20:34 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Linux PM <linux-pm@...r.kernel.org>,
        Giovanni Gherdovich <ggherdovich@...e.cz>,
        Doug Smythies <dsmythies@...us.net>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Mel Gorman <mgorman@...e.de>,
        Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: Re: [RFC/RFT][PATCH v5] cpuidle: New timer events oriented governor
 for tickless systems

On Thu, Nov 08, 2018 at 06:25:07PM +0100, Rafael J. Wysocki wrote:
> +/*
> + * The SPIKE value is added to metrics when they grow and the DECAY_SHIFT value
> + * is used for decreasing metrics on a regular basis.
> + */
> +#define SPIKE		1024
> +#define DECAY_SHIFT	3

> +	if (idx_timer >= 0) {
> +		unsigned int hits = cpu_data->states[idx_timer].hits;
> +		unsigned int misses = cpu_data->states[idx_timer].misses;
> +
> +		hits -= hits >> DECAY_SHIFT;
> +		misses -= misses >> DECAY_SHIFT;
> +
> +		if (idx_timer > idx_hit) {
> +			misses += SPIKE;
> +			if (idx_hit >= 0)
> +				cpu_data->states[idx_hit].early_hits += SPIKE;
> +		} else {
> +			hits += SPIKE;
> +		}
> +
> +		cpu_data->states[idx_timer].misses = misses;
> +		cpu_data->states[idx_timer].hits = hits;
> +	}

That's a pulse-density-modulator, with a signal bound of:

  1024 == x/8 -> x := 8192

Anyway; I would suggest s/SPIKE/PULSE/ because of that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ