tools:misc:xenpm: set max freq to all cpu with default cpuid
PATCH v2 1/1 tools:misc:xenpm: set max freq to all cpu with default cpuid
User can set max freq to specific cpu by "xenpm set-scaling-maxfreq [cpuid] <HZ>" or set max freq to all cpu with default cpuid by "xenpm set-scaling-maxfreq <HZ>".
Set max freq with default cpuid will cause segmentation fault after commit id d4906b5d05. This patch will fix this issue and add ability to set max freq with default cpuid.
--- tools/misc/xenpm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
tools/misc/xenpm.c +5 -3
@@ -99,10 +99,12 @@ static void parse_cpuid_and_int(int argc, char *argv[],exit (EINVAL ); } -parse_cpuid (argv[0 ], cpuid); -if (sscanf (argv[1 ],"%d" , val) !=1 ) +if ( argc >1 ) +parse_cpuid (argv[0 ], cpuid); + +if (sscanf (argv[argc >1 ],"%d" , val) !=1 ) { -fprintf (stderr,"Invalid %s '%s'\n" , what, argv[1 ]); +fprintf (stderr,"Invalid %s '%s'\n" , what, argv[argc >1 ]);exit (EINVAL ); } }
Signature · 7 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 11 lines · Luwei Kang
User can set max freq to specific cpu by "xenpm set-scaling-maxfreq [cpuid] <HZ>" or set max freq to all cpu with default cpuid by "xenpm set-scaling-maxfreq <HZ>".
Set max freq with default cpuid will cause segmentation fault after commit id
d4906b5d05. This patch will fix this issue and add ability to set max freq with default cpuid.Signed-off-by Luwei Kang <[email protected]>
Sorry for that.
(using clang 4.0)
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Luwei Kang
User can set max freq to specific cpu by "xenpm set-scaling-maxfreq [cpuid] <HZ>" or set max freq to all cpu with default cpuid by "xenpm set-scaling-maxfreq <HZ>".
Set max freq with default cpuid will cause segmentation fault after commit id
d4906b5d05. This patch will fix this issue and add ability to set max freq with default cpuid.Signed-off-by Luwei Kang <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Hi,
Quoted 6 lines · Wei Liu
Quoted 5 lines · Luwei Kang
User can set max freq to specific cpu by "xenpm set-scaling-maxfreq [cpuid] <HZ>" or set max freq to all cpu with default cpuid by "xenpm set-scaling-maxfreq <HZ>".
Quoted 8 lines
Quoted 6 lines
Set max freq with default cpuid will cause segmentation fault after commit id
d4906b5d05. This patch will fix this issue and add ability to set max freq with default cpuid.Signed-off-by Luwei Kang <[email protected]>Acked-by Wei Liu <[email protected]>
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel