Displaying 4 results from an estimated 4 matches for "max_cpu_nr".
Did you mean:
max_cpu_id
2011 Dec 21
2
[PATCH] xenpm: assorted adjustments
...}
}
- printf(" Avg freq\t%d\tKHz\n", avgfreq[i]);
}
/* some clean up and then exits */
@@ -542,23 +535,23 @@ void start_gather_func(int argc, char *a
}
usec_start = tv.tv_sec * 1000000UL + tv.tv_usec;
- sum = malloc(sizeof(uint64_t) * 2 * max_cpu_nr);
+ sum = calloc(2 * max_cpu_nr, sizeof(*sum));
if ( sum == NULL )
return ;
- cxstat = malloc(sizeof(struct xc_cx_stat) * 2 * max_cpu_nr);
+ cxstat = calloc(2 * max_cpu_nr, sizeof(*cxstat));
if ( cxstat == NULL )
{
free(sum);
return ;
}
- p...
2012 Sep 14
1
[PATCH] xenpm: make argument parsing and error handling more consistent
...y in the (partial) success case (there may still be a small
number of questionable cases).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/tools/misc/xenpm.c
+++ b/tools/misc/xenpm.c
@@ -36,7 +36,7 @@
#define CPUFREQ_TURBO_ENABLED 1
static xc_interface *xc_handle;
-static int max_cpu_nr;
+static unsigned int max_cpu_nr;
/* help message */
void show_help(void)
@@ -77,6 +77,33 @@ void help_func(int argc, char *argv[])
show_help();
}
+static void parse_cpuid(const char *arg, int *cpuid)
+{
+ if ( sscanf(arg, "%d", cpuid) != 1 || *cpuid < 0 )
+ {
+...
2012 May 29
0
[PATCH] xenpm: Fix reporting of C0 residence times
...trovsky <boris.ostrovsky@amd.com>
diff -r 53e0571f94e4 -r 3d52d9fe6255 tools/misc/xenpm.c
--- a/tools/misc/xenpm.c Fri May 25 08:21:25 2012 +0100
+++ b/tools/misc/xenpm.c Tue May 29 18:41:20 2012 +0200
@@ -351,8 +351,12 @@ static void signal_int_handler(int signo
for ( i = 0; i < max_cpu_nr; i++ )
if ( !get_cxstat_by_cpuid(xc_handle, i, &cxstat_end[i]) )
for ( j = 0; j < cxstat_end[i].nr; j++ )
- sum_cx[i] += cxstat_end[i].residencies[j] -
- cxstat_start[i].residencies[j];
+ {
+...
2013 Jun 20
3
[PATCH V2 1/2] cpufreq, xenpm: fix cpufreq and xenpm mismatch
...-- a/tools/misc/xenpm.c
+++ b/tools/misc/xenpm.c
@@ -31,10 +31,6 @@
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-#define CPUFREQ_TURBO_DISABLED -1
-#define CPUFREQ_TURBO_UNSUPPORTED 0
-#define CPUFREQ_TURBO_ENABLED 1
-
static xc_interface *xc_handle;
static unsigned int max_cpu_nr;
@@ -699,13 +695,9 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)
p_cpufreq->scaling_max_freq,
p_cpufreq->scaling_min_freq,
p_cpufreq->scaling_cur_freq);
- if (p_cpufreq->turbo_enabled != CPUFREQ_TURBO_UNSUPPO...