1a59d1b8e0
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* cpufreq-bench CPUFreq microbenchmark
|
|
*
|
|
* Copyright (C) 2008 Christian Kornacker <ckornacker@suse.de>
|
|
*/
|
|
|
|
/* struct that holds the required config parameters */
|
|
struct config
|
|
{
|
|
long sleep; /* sleep time in µs */
|
|
long load; /* load time in µs */
|
|
long sleep_step; /* time value which changes the
|
|
* sleep time after every round in µs */
|
|
long load_step; /* time value which changes the
|
|
* load time after every round in µs */
|
|
unsigned int cycles; /* calculation cycles with the same sleep/load time */
|
|
unsigned int rounds; /* calculation rounds with iterated sleep/load time */
|
|
unsigned int cpu; /* cpu for which the affinity is set */
|
|
char governor[15]; /* cpufreq governor */
|
|
enum sched_prio /* possible scheduler priorities */
|
|
{
|
|
SCHED_ERR = -1,
|
|
SCHED_HIGH,
|
|
SCHED_DEFAULT,
|
|
SCHED_LOW
|
|
} prio;
|
|
|
|
unsigned int verbose; /* verbose output */
|
|
FILE *output; /* logfile */
|
|
char *output_filename; /* logfile name, must be freed at the end
|
|
if output != NULL and output != stdout*/
|
|
};
|
|
|
|
enum sched_prio string_to_prio(const char *str);
|
|
|
|
FILE *prepare_output(const char *dir);
|
|
|
|
int prepare_config(const char *path, struct config *config);
|
|
struct config *prepare_default_config();
|
|
|