You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(8) |
Sep
(14) |
Oct
(7) |
Nov
(9) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(11) |
Feb
(4) |
Mar
(6) |
Apr
(3) |
May
(7) |
Jun
(12) |
Jul
(4) |
Aug
(6) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(2) |
2011 |
Jan
(2) |
Feb
(3) |
Mar
(10) |
Apr
(7) |
May
(5) |
Jun
(3) |
Jul
(7) |
Aug
(6) |
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
(6) |
2012 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(2) |
May
(21) |
Jun
(6) |
Jul
(3) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(10) |
2013 |
Jan
(10) |
Feb
(8) |
Mar
|
Apr
(9) |
May
(33) |
Jun
(11) |
Jul
(16) |
Aug
(3) |
Sep
(8) |
Oct
(1) |
Nov
(16) |
Dec
(7) |
2014 |
Jan
(19) |
Feb
(71) |
Mar
(46) |
Apr
(16) |
May
(1) |
Jun
(18) |
Jul
(6) |
Aug
(12) |
Sep
(7) |
Oct
(4) |
Nov
(9) |
Dec
(7) |
2015 |
Jan
(15) |
Feb
(6) |
Mar
(10) |
Apr
(7) |
May
(16) |
Jun
(21) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Nathan F. <nf...@li...> - 2015-01-19 17:12:20
|
On 01/19/2015 09:57 AM, Breno Leitao wrote: > Any interested in this patch? It helps a lot hypervisor installations, as using > Ubuntu as a hypervisor. I started looking over this patch a few days ago. I need to go back and look at it again. -Nathan > > > On 01/08/2015 04:27 PM, Paulo Flabiano Smorigo wrote: >> This patch add a --with-systemd attribute to install a systemd unit >> to turn smt on or off (permanently or not). >> >> After it's installed you can use systemd commands like: status, start, >> stop, enable and disable to control it. >> --- >> .gitignore | 1 + >> Makefile.am | 11 +++++++++++ >> configure.ac | 18 +++++++++++++++++- >> systemd/smt_off.service.in | 12 ++++++++++++ >> 4 files changed, 41 insertions(+), 1 deletion(-) >> create mode 100644 systemd/smt_off.service.in >> >> diff --git a/.gitignore b/.gitignore >> index c0348c7..15d072b 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -47,6 +47,7 @@ >> /src/Makefile.in >> /src/drmgr/Makefile >> /src/drmgr/Makefile.in >> +/systemd/smt_off.service >> >> # >> # git files that we don't want to ignore even it they are dot-files >> diff --git a/Makefile.am b/Makefile.am >> index c302a54..3735a11 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -49,6 +49,10 @@ EXTRA_DIST += COPYRIGHT Changelog powerpc-utils.spec.in doc/activate_firmware.do >> doc/nvram.doxycfg doc/rtas_ibm_get_vpd.doxycfg doc/serv_config.doxycfg \ >> doc/set_poweron_time.doxycfg doc/uesensor.doxycfg >> >> +if WITH_SYSTEMD >> +EXTRA_DIST += systemd/smt_off.service.in >> +endif >> + >> sbin_PROGRAMS += src/nvram src/lsprop src/lparstat src/ppc64_cpu >> >> pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h >> @@ -145,3 +149,10 @@ src_drmgr_lsslot_SOURCES = \ >> $(pseries_platform_SOURCES) >> >> src_drmgr_lsslot_LDADD = -lrtas >> + >> +if WITH_SYSTEMD >> +install-data-hook: systemd/smt_off.service >> + $(MKDIR_P) @prefix@${systemd_unit_dir} >> + $(INSTALL_SCRIPT) $< @prefix@${systemd_unit_dir}/ >> + sed -i -e 's,$${exec_prefix},@sbindir@,g' @prefix@${systemd_unit_dir}/smt_off.service >> +endif >> diff --git a/configure.ac b/configure.ac >> index f7fcd55..7fa5b01 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -58,6 +58,22 @@ AS_IF([test "x$with_librtas" != "xno"], >> >> AM_CONDITIONAL([WITH_LIBRTAS], [test "x$with_librtas" = "xyes"]) >> >> +# check for systemd >> +systemd_unit_dir=/usr/lib/systemd/system >> +AC_ARG_WITH([systemd], >> + [AC_HELP_STRING([--with-systemd@<:@=DIR@:>@], >> + [install systemd unit files (not default and unit dir is /usr/lib/systemd/system)])], >> + [if test "$withval" = "no"; then >> + with_systemd=0 >> + else >> + with_systemd=1 >> + test $withval != "yes" && systemd_unit_dir=$withval >> + fi], >> + with_systemd=0 >> + ) >> +AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = 1]) >> +AC_SUBST(systemd_unit_dir) >> + >> AC_DEFUN([LOCAL_CHECK_FLAGS],[ >> AC_REQUIRE([AX_CHECK_LINK_FLAG]) >> AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) >> @@ -72,5 +88,5 @@ AC_DEFUN([LOCAL_CHECK_FLAGS],[ >> ]) >> LOCAL_CHECK_FLAGS >> >> -AC_CONFIG_FILES([Makefile powerpc-utils.spec]) >> +AC_CONFIG_FILES([Makefile powerpc-utils.spec systemd/smt_off.service]) >> AC_OUTPUT >> diff --git a/systemd/smt_off.service.in b/systemd/smt_off.service.in >> new file mode 100644 >> index 0000000..ed95945 >> --- /dev/null >> +++ b/systemd/smt_off.service.in >> @@ -0,0 +1,12 @@ >> +[Unit] >> +Description=ppc64 set SMT off >> +Before=libvirt-bin.service >> + >> +[Service] >> +Type=oneshot >> +RemainAfterExit=true >> +ExecStart=@sbindir@/ppc64_cpu --smt=off >> +ExecStop=@sbindir@/ppc64_cpu --smt=on >> + >> +[Install] >> +WantedBy=multi-user.target >> > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Breno L. <br...@br...> - 2015-01-19 16:27:29
|
Any interested in this patch? It helps a lot hypervisor installations, as using Ubuntu as a hypervisor. On 01/08/2015 04:27 PM, Paulo Flabiano Smorigo wrote: > This patch add a --with-systemd attribute to install a systemd unit > to turn smt on or off (permanently or not). > > After it's installed you can use systemd commands like: status, start, > stop, enable and disable to control it. > --- > .gitignore | 1 + > Makefile.am | 11 +++++++++++ > configure.ac | 18 +++++++++++++++++- > systemd/smt_off.service.in | 12 ++++++++++++ > 4 files changed, 41 insertions(+), 1 deletion(-) > create mode 100644 systemd/smt_off.service.in > > diff --git a/.gitignore b/.gitignore > index c0348c7..15d072b 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -47,6 +47,7 @@ > /src/Makefile.in > /src/drmgr/Makefile > /src/drmgr/Makefile.in > +/systemd/smt_off.service > > # > # git files that we don't want to ignore even it they are dot-files > diff --git a/Makefile.am b/Makefile.am > index c302a54..3735a11 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -49,6 +49,10 @@ EXTRA_DIST += COPYRIGHT Changelog powerpc-utils.spec.in doc/activate_firmware.do > doc/nvram.doxycfg doc/rtas_ibm_get_vpd.doxycfg doc/serv_config.doxycfg \ > doc/set_poweron_time.doxycfg doc/uesensor.doxycfg > > +if WITH_SYSTEMD > +EXTRA_DIST += systemd/smt_off.service.in > +endif > + > sbin_PROGRAMS += src/nvram src/lsprop src/lparstat src/ppc64_cpu > > pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h > @@ -145,3 +149,10 @@ src_drmgr_lsslot_SOURCES = \ > $(pseries_platform_SOURCES) > > src_drmgr_lsslot_LDADD = -lrtas > + > +if WITH_SYSTEMD > +install-data-hook: systemd/smt_off.service > + $(MKDIR_P) @prefix@${systemd_unit_dir} > + $(INSTALL_SCRIPT) $< @prefix@${systemd_unit_dir}/ > + sed -i -e 's,$${exec_prefix},@sbindir@,g' @prefix@${systemd_unit_dir}/smt_off.service > +endif > diff --git a/configure.ac b/configure.ac > index f7fcd55..7fa5b01 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -58,6 +58,22 @@ AS_IF([test "x$with_librtas" != "xno"], > > AM_CONDITIONAL([WITH_LIBRTAS], [test "x$with_librtas" = "xyes"]) > > +# check for systemd > +systemd_unit_dir=/usr/lib/systemd/system > +AC_ARG_WITH([systemd], > + [AC_HELP_STRING([--with-systemd@<:@=DIR@:>@], > + [install systemd unit files (not default and unit dir is /usr/lib/systemd/system)])], > + [if test "$withval" = "no"; then > + with_systemd=0 > + else > + with_systemd=1 > + test $withval != "yes" && systemd_unit_dir=$withval > + fi], > + with_systemd=0 > + ) > +AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = 1]) > +AC_SUBST(systemd_unit_dir) > + > AC_DEFUN([LOCAL_CHECK_FLAGS],[ > AC_REQUIRE([AX_CHECK_LINK_FLAG]) > AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) > @@ -72,5 +88,5 @@ AC_DEFUN([LOCAL_CHECK_FLAGS],[ > ]) > LOCAL_CHECK_FLAGS > > -AC_CONFIG_FILES([Makefile powerpc-utils.spec]) > +AC_CONFIG_FILES([Makefile powerpc-utils.spec systemd/smt_off.service]) > AC_OUTPUT > diff --git a/systemd/smt_off.service.in b/systemd/smt_off.service.in > new file mode 100644 > index 0000000..ed95945 > --- /dev/null > +++ b/systemd/smt_off.service.in > @@ -0,0 +1,12 @@ > +[Unit] > +Description=ppc64 set SMT off > +Before=libvirt-bin.service > + > +[Service] > +Type=oneshot > +RemainAfterExit=true > +ExecStart=@sbindir@/ppc64_cpu --smt=off > +ExecStop=@sbindir@/ppc64_cpu --smt=on > + > +[Install] > +WantedBy=multi-user.target > |
From: Nathan F. <nf...@li...> - 2015-01-14 15:25:17
|
Initial man page for the ppc64_cpu command. Signed-off-by: Nathan Fontenot <nf...@li...> --- Makefile.am | 3 + man/ppc64_cpu.8 | 108 +++++++++++++++++++++++++++++++++++++++++++++++++ powerpc-utils.spec.in | 1 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 man/ppc64_cpu.8 diff --git a/Makefile.am b/Makefile.am index c302a54..d6a7e60 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,8 @@ man_MANS = \ man/sys_ident.8 \ man/lparcfg.5 \ man/lparstat.8 \ - man/lsslot.8 + man/lsslot.8 \ + man/ppc64_cpu.8 EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS) diff --git a/man/ppc64_cpu.8 b/man/ppc64_cpu.8 new file mode 100644 index 0000000..f6f8873 --- /dev/null +++ b/man/ppc64_cpu.8 @@ -0,0 +1,108 @@ +.\" +.\" Copyright (C) 2015 International Business Machines +.\" +.TH PPC64_CPU 8 "January 2015" Linux "Linux on Power Service Tools" +.SH NAME +ppc64_cpu \- Display cpu characteristics of PowerPC systems +.SH SYNOPSIS +.B /usr/sbin/ppc64_cpu +[ command ] [ options ] +.SH DESCRIPTION +The +.I ppc64_cpu +command is used to display and set cpu characteristics on PowerPC +platforms. + +.SH OPTIONS +.TP +\fB\-\-smt\fR +Display the current smt setting for the system. The output will state +whether smt is off indicating there is only one thread per core online, smt +is on indicating that all threads of every core is online, the smt is in +a mixed state indicating that the number of threads online varies per core, or +'SMT=X' indicating a specific smt state. + +.TP +\fB\-\-smt\fR={\fIon\fR|\fIoff\fR} +Set the current smt state for the system to either \fIon\fR, which will online +every thread in every core on the system, or \fIoff\fR which will leave each +core on the system with only one thread online. + +.TP +\fB\-\-smt\fR=\fIvalue\fR +Set the smt state for each core to the specified \fIvalue\fR. + +.TP +\fB\-\-cores\-present\fR +Display the number of cores present. + +.TP +\fB\-\-cores\-on\fR +Display the number of cores online. + +.TP +\fB\-\-cores\-on\fR=\fIvalue\fR +Put exactly \fIvalue\fR number of cores online. Note that this will either +online or offline cores to achieve the desired result. + +.TP +\fB\-\-dscr\fR +Display the current Data Stream Control Register (DSCR) setting for the system. + +.TP +\fB\-\-dscr\fR=\fIvalue\fR +Set the DSCR setting for the system to \fIvalue\fr. + +.TP +\fB\-\-dscr\fR [\fIpid\fR] +Display the DSCR setting for process \fIpid\fR. + +.TP +\fB\-\-dscr\fR=\fIvalue\fR [\fIpid\fR] +Set the DSCR to the specified \fIvalue\fR for process \fIpid\fR. + +.TP +\fB\-\-smt\-snooze\-delay\fR +Display the current smt\-snooze\-delay setting. + +.TP +\fB\-\-smt\-snooze\-delay\fR=\fIvalue\fR +Set the smt\-snooze\-delay to the specified \fIvalue\fR. + +.TP +\fB\-\-run-mode\fR +Display the current diagnostics run mode. + +.TP +\fB\-\-run\-mode\fR=\fIvalue\fR +Set the current diagnostics run mode to \fIvalue\fR. + +.TP +\fB\-\-frequency\fR [\-t \fItime\fR] +Determine the cpu frequency. The default sampling period is one second unless +a time is specified with the \fB\-t \fItime\fR option. + +.TP +\fB\-\-subcores\-per\-core\fR +Display the number of subcores per core. + +.TP +\fB\-\-subcores\-per\-core\fR=\fIvalue\fR +Set the number of subcores per core to \fIvalue\fR. + +.TP +\fB\-\-threads\-per\-core\fR +Display the number of threads per core. + +.TP +\fB\-\-info\fR +Display system state information. The output will print a line for each core +and possible sub\-core along with the thread numbers for each thread in the +core with an asterick next to it if the thread is online. + +.TP +\fB\-\-version\fR +Print the version number. + +.SH AUTHOR +Written by Anton Blanchard and Nathan Fontenot diff --git a/powerpc-utils.spec.in b/powerpc-utils.spec.in index c780743..10baf22 100644 --- a/powerpc-utils.spec.in +++ b/powerpc-utils.spec.in @@ -84,6 +84,7 @@ Utilities for maintaining and servicing PowerPC systems. /usr/share/man/man5/lparcfg.5.gz /usr/share/man/man8/lparstat.8.gz /usr/share/man/man8/lsslot.8.gz +/usr/share/man/man8/ppc64_cpu.8.gz /usr/share/man/man1/amsstat.1.gz %post |
From: Paulo F. S. <pfs...@li...> - 2015-01-08 18:58:15
|
This patch add a --with-systemd attribute to install a systemd unit to turn smt on or off (permanently or not). After it's installed you can use systemd commands like: status, start, stop, enable and disable to control it. --- .gitignore | 1 + Makefile.am | 11 +++++++++++ configure.ac | 18 +++++++++++++++++- systemd/smt_off.service.in | 12 ++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 systemd/smt_off.service.in diff --git a/.gitignore b/.gitignore index c0348c7..15d072b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ /src/Makefile.in /src/drmgr/Makefile /src/drmgr/Makefile.in +/systemd/smt_off.service # # git files that we don't want to ignore even it they are dot-files diff --git a/Makefile.am b/Makefile.am index c302a54..3735a11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,10 @@ EXTRA_DIST += COPYRIGHT Changelog powerpc-utils.spec.in doc/activate_firmware.do doc/nvram.doxycfg doc/rtas_ibm_get_vpd.doxycfg doc/serv_config.doxycfg \ doc/set_poweron_time.doxycfg doc/uesensor.doxycfg +if WITH_SYSTEMD +EXTRA_DIST += systemd/smt_off.service.in +endif + sbin_PROGRAMS += src/nvram src/lsprop src/lparstat src/ppc64_cpu pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h @@ -145,3 +149,10 @@ src_drmgr_lsslot_SOURCES = \ $(pseries_platform_SOURCES) src_drmgr_lsslot_LDADD = -lrtas + +if WITH_SYSTEMD +install-data-hook: systemd/smt_off.service + $(MKDIR_P) @prefix@${systemd_unit_dir} + $(INSTALL_SCRIPT) $< @prefix@${systemd_unit_dir}/ + sed -i -e 's,$${exec_prefix},@sbindir@,g' @prefix@${systemd_unit_dir}/smt_off.service +endif diff --git a/configure.ac b/configure.ac index f7fcd55..7fa5b01 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,22 @@ AS_IF([test "x$with_librtas" != "xno"], AM_CONDITIONAL([WITH_LIBRTAS], [test "x$with_librtas" = "xyes"]) +# check for systemd +systemd_unit_dir=/usr/lib/systemd/system +AC_ARG_WITH([systemd], + [AC_HELP_STRING([--with-systemd@<:@=DIR@:>@], + [install systemd unit files (not default and unit dir is /usr/lib/systemd/system)])], + [if test "$withval" = "no"; then + with_systemd=0 + else + with_systemd=1 + test $withval != "yes" && systemd_unit_dir=$withval + fi], + with_systemd=0 + ) +AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = 1]) +AC_SUBST(systemd_unit_dir) + AC_DEFUN([LOCAL_CHECK_FLAGS],[ AC_REQUIRE([AX_CHECK_LINK_FLAG]) AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) @@ -72,5 +88,5 @@ AC_DEFUN([LOCAL_CHECK_FLAGS],[ ]) LOCAL_CHECK_FLAGS -AC_CONFIG_FILES([Makefile powerpc-utils.spec]) +AC_CONFIG_FILES([Makefile powerpc-utils.spec systemd/smt_off.service]) AC_OUTPUT diff --git a/systemd/smt_off.service.in b/systemd/smt_off.service.in new file mode 100644 index 0000000..ed95945 --- /dev/null +++ b/systemd/smt_off.service.in @@ -0,0 +1,12 @@ +[Unit] +Description=ppc64 set SMT off +Before=libvirt-bin.service + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=@sbindir@/ppc64_cpu --smt=off +ExecStop=@sbindir@/ppc64_cpu --smt=on + +[Install] +WantedBy=multi-user.target -- 2.1.0 -- Paulo Flabiano Smorigo IBM Linux Technology Center |
From: Nathan F. <nf...@li...> - 2015-01-08 14:44:39
|
On 01/07/2015 11:41 PM, Mamatha Inamdar wrote: > > On 01/08/2015 01:33 AM, Nathan Fontenot wrote: >> On 01/07/2015 01:01 AM, Vasant Hegde wrote: >>> On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: >>>> Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set >>>> >>>> This patch will resolve the above issue and display the correct values of threads-per-core >>>> for the ppc64_cpu command when --smt value is set. >>>> >>>> I have used the following equation to calculate threads_per_core as per lscpu command. >>>> >>>> threads_per_core = nthreads / ncores >> I think there may be a slight misunderstanding between the threads-per-core >> option for the ppc64_cou command and what lscpu reports. >> >> The threads-per-core option to the ppc64_cpu command reports the number of >> threads that a core contains, not the number of online threads per core. >> >> If you want to know the number of online threads per core you need to use the >> --info or --smt option. >> >> -Nathan > > You mean threads-per-core option to the ppc64_cpu is working as expected. > > If yes then > > 1) Test team has to change there test case because they are comparing > results with "ppc64_cpu --threads-per-core" with "lscpu threads(s) per core". > > Case 2: FAIL > [root@lop826 ~]# ppc64_cpu --smt=4 > [root@lop826 ~]# ppc64_cpu --threads-per-core > Threads per core: 8 > > Verify with "lscpu" output: > Thread(s) per core: 4 > > 2) Can we change option name for ppc64_cpu.. > because "--threads-per-core" and "threads(s) per core" both are same but gives different results > I don't think changing the name of the option is needed, the option asks for the number of threads per core and that is what it reports. The total number of threads per core and the number of online threads in a core, usually referred to as the smt state, are separate things that should be reported separately. The lscpu command reports the number of online threads per core but labels it as threads per core which I find slightly misleading. This doesn't tell you how threads per core the system has, it tells you how threads are online, or the smt state. -Nathan >>>> *********************************************** >>>> Test results: >>>> >>>> CASE 1: >>>> >>>> ./src/ppc64_cpu --smt=on >>>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>>> Threads per core: 4 >>>> >>>> lscpu output: >>>> Thread(s) per core: 4 >>>> ------------------------------------------ >>>> CASE 2: >>>> >>>> ./src/ppc64_cpu --smt=2 >>>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>>> Threads per core: 2 >>>> >>>> lscpu output: >>>> Thread(s) per core: 2 >>>> -------------------------------------------------- >>>> CASE 3: >>>> >>>> ./src/ppc64_cpu --smt=1 >>>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>>> Threads per core: 1 >>>> >>>> lscpu output: >>>> Thread(s) per core: 1 >>>> ------------------------------------------------- >>>> >>>> Signed-off-by: Mamatha Inamdar <mam...@li...> >>>> --- >>>> src/ppc64_cpu.c | 15 ++++++++++++++- >>>> 1 file changed, 14 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c >>>> index 4df4cdc..a3cfed0 100644 >>>> --- a/src/ppc64_cpu.c >>>> +++ b/src/ppc64_cpu.c >>>> @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; >>>> static int threads_per_cpu = 0; >>>> static int cpus_in_system = 0; >>>> static int threads_in_system = 0; >>>> +static int threads_per_core = 0; >>> Why do you need another global variable ? can't you just print " nthreads / >>> cpus_in_system" ? >>> >>>> static int do_info(void); >>>> >>>> @@ -529,9 +530,21 @@ static int do_smt(char *state) >>>> return rc; >>>> } >>>> >>>> +/* Threads per core */ >>>> static inline void do_threads_per_core() >>>> { >>>> - printf("Threads per core: %d\n", threads_per_cpu); >>>> + int i, j; >>>> + int nthreads; /* number of threads online */ >>> initialize nthreads ? >>> >>> >>>> + >>>> + /* Calculate number of threads present on the system */ >>>> + for (j = 0; j < threads_in_system; j += threads_per_cpu) { >>>> + for (i = 0; i < threads_per_cpu; i++) >>>> + nthreads += cpu_online(j + i); >>>> + } >>> Can we have different cores with different SMT level? >>> >>> -Vasant >>> >>>> + >>>> + /* Calculate threads per core = nthreads / ncores */ >>>> + threads_per_core = nthreads / cpus_in_system; >>>> + printf("Threads per core: %d\n", threads_per_core); >>>> } >>>> >>>> static int do_subcores_per_core(char *state) >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Dive into the World of Parallel Programming! The Go Parallel Website, >>>> sponsored by Intel and developed in partnership with Slashdot Media, is your >>>> hub for all things parallel software development, from weekly thought >>>> leadership blogs to news, videos, case studies, tutorials and more. Take a >>>> look and join the conversation now. http://goparallel.sourceforge.net >>>> _______________________________________________ >>>> Powerpc-utils-devel mailing list >>>> Pow...@li... >>>> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >>>> >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming! The Go Parallel Website, >>> sponsored by Intel and developed in partnership with Slashdot Media, is your >>> hub for all things parallel software development, from weekly thought >>> leadership blogs to news, videos, case studies, tutorials and more. Take a >>> look and join the conversation now. http://goparallel.sourceforge.net >>> _______________________________________________ >>> Powerpc-utils-devel mailing list >>> Pow...@li... >>> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >>> > |
From: Paul C. <pc...@us...> - 2015-01-08 14:33:26
|
On 01/07/2015 11:41 PM, Mamatha Inamdar wrote: > > On 01/08/2015 01:33 AM, Nathan Fontenot wrote: >> On 01/07/2015 01:01 AM, Vasant Hegde wrote: >>> On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: >>>> Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set >>>> >>>> This patch will resolve the above issue and display the correct values of threads-per-core >>>> for the ppc64_cpu command when --smt value is set. >>>> >>>> I have used the following equation to calculate threads_per_core as per lscpu command. >>>> >>>> threads_per_core = nthreads / ncores >> I think there may be a slight misunderstanding between the threads-per-core >> option for the ppc64_cou command and what lscpu reports. >> >> The threads-per-core option to the ppc64_cpu command reports the number of >> threads that a core contains, not the number of online threads per core. >> >> If you want to know the number of online threads per core you need to use the >> --info or --smt option. >> >> -Nathan > > You mean threads-per-core option to the ppc64_cpu is working as expected. > > If yes then > > 1) Test team has to change there test case because they are comparing > results with "ppc64_cpu --threads-per-core" with "lscpu > threads(s) per core". > > Case 2: FAIL > [root@lop826 ~]# ppc64_cpu --smt=4 > [root@lop826 ~]# ppc64_cpu --threads-per-core > Threads per core: 8 > > Verify with "lscpu" output: > Thread(s) per core: 4 > > 2) Can we change option name for ppc64_cpu.. > because "--threads-per-core" and "threads(s) per core" both are same > but gives different results I agree that there is confusion in the varied use of that phrase. Instead of changing ppc64_cpu, however, I would lean toward changing lscpu to report "SMT mode" instead. It's much more likely that there are dependencies on the current usage of ppc64_cpu (including lscpu) than any dependencies on the output of lscpu. Regards, PC |
From: Paul C. <pc...@us...> - 2015-01-08 13:45:21
|
On 12/22/2014 10:31 AM, Mamatha Inamdar wrote: > Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set > > This patch will resolve the above issue and display the correct values of threads-per-core > for the ppc64_cpu command when --smt value is set. > > I have used the following equation to calculate threads_per_core as per lscpu command. > > threads_per_core = nthreads / ncores > > *********************************************** > Test results: > > CASE 1: > > ./src/ppc64_cpu --smt=on > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 4 > > lscpu output: > Thread(s) per core: 4 > ------------------------------------------ > CASE 2: > > ./src/ppc64_cpu --smt=2 > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 2 > > lscpu output: > Thread(s) per core: 2 > -------------------------------------------------- > CASE 3: > > ./src/ppc64_cpu --smt=1 > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 1 > > lscpu output: > Thread(s) per core: 1 > ------------------------------------------------- I don't think the purpose of "--threads-per-core" is simply to duplicate the function of "--smt". It's to report the number of hardware threads per core, regardless of online/offline. The ppc64_cpu command has no other way to report "what's the maximum SMT mode"? In addition, this patch just calculates the total number of online threads and divides by the number of CPUs in the system, which 1. doesn't account for cores that are offline 2. doesn't account for scenarios in which different cores may be in different SMT modes, although this is not handled well by the command in general PC |
From: Mamatha I. <mam...@li...> - 2015-01-08 05:41:19
|
On 01/08/2015 01:33 AM, Nathan Fontenot wrote: > On 01/07/2015 01:01 AM, Vasant Hegde wrote: >> On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: >>> Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set >>> >>> This patch will resolve the above issue and display the correct values of threads-per-core >>> for the ppc64_cpu command when --smt value is set. >>> >>> I have used the following equation to calculate threads_per_core as per lscpu command. >>> >>> threads_per_core = nthreads / ncores > I think there may be a slight misunderstanding between the threads-per-core > option for the ppc64_cou command and what lscpu reports. > > The threads-per-core option to the ppc64_cpu command reports the number of > threads that a core contains, not the number of online threads per core. > > If you want to know the number of online threads per core you need to use the > --info or --smt option. > > -Nathan You mean threads-per-core option to the ppc64_cpu is working as expected. If yes then 1) Test team has to change there test case because they are comparing results with "ppc64_cpu --threads-per-core" with "lscpu threads(s) per core". Case 2: FAIL [root@lop826 ~]# ppc64_cpu --smt=4 [root@lop826 ~]# ppc64_cpu --threads-per-core Threads per core: 8 Verify with "lscpu" output: Thread(s) per core: 4 2) Can we change option name for ppc64_cpu.. because "--threads-per-core" and "threads(s) per core" both are same but gives different results >>> *********************************************** >>> Test results: >>> >>> CASE 1: >>> >>> ./src/ppc64_cpu --smt=on >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 4 >>> >>> lscpu output: >>> Thread(s) per core: 4 >>> ------------------------------------------ >>> CASE 2: >>> >>> ./src/ppc64_cpu --smt=2 >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 2 >>> >>> lscpu output: >>> Thread(s) per core: 2 >>> -------------------------------------------------- >>> CASE 3: >>> >>> ./src/ppc64_cpu --smt=1 >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 1 >>> >>> lscpu output: >>> Thread(s) per core: 1 >>> ------------------------------------------------- >>> >>> Signed-off-by: Mamatha Inamdar <mam...@li...> >>> --- >>> src/ppc64_cpu.c | 15 ++++++++++++++- >>> 1 file changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c >>> index 4df4cdc..a3cfed0 100644 >>> --- a/src/ppc64_cpu.c >>> +++ b/src/ppc64_cpu.c >>> @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; >>> static int threads_per_cpu = 0; >>> static int cpus_in_system = 0; >>> static int threads_in_system = 0; >>> +static int threads_per_core = 0; >> Why do you need another global variable ? can't you just print " nthreads / >> cpus_in_system" ? >> >>> static int do_info(void); >>> >>> @@ -529,9 +530,21 @@ static int do_smt(char *state) >>> return rc; >>> } >>> >>> +/* Threads per core */ >>> static inline void do_threads_per_core() >>> { >>> - printf("Threads per core: %d\n", threads_per_cpu); >>> + int i, j; >>> + int nthreads; /* number of threads online */ >> initialize nthreads ? >> >> >>> + >>> + /* Calculate number of threads present on the system */ >>> + for (j = 0; j < threads_in_system; j += threads_per_cpu) { >>> + for (i = 0; i < threads_per_cpu; i++) >>> + nthreads += cpu_online(j + i); >>> + } >> Can we have different cores with different SMT level? >> >> -Vasant >> >>> + >>> + /* Calculate threads per core = nthreads / ncores */ >>> + threads_per_core = nthreads / cpus_in_system; >>> + printf("Threads per core: %d\n", threads_per_core); >>> } >>> >>> static int do_subcores_per_core(char *state) >>> >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming! The Go Parallel Website, >>> sponsored by Intel and developed in partnership with Slashdot Media, is your >>> hub for all things parallel software development, from weekly thought >>> leadership blogs to news, videos, case studies, tutorials and more. Take a >>> look and join the conversation now. http://goparallel.sourceforge.net >>> _______________________________________________ >>> Powerpc-utils-devel mailing list >>> Pow...@li... >>> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >>> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> |
From: Vasant H. <heg...@li...> - 2015-01-08 05:40:16
|
On 12/18/2014 03:23 AM, Nathan Fontenot wrote: > On 12/14/2014 11:39 PM, Vasant Hegde wrote: >> On 12/05/2014 04:11 PM, Henish Patel wrote: >>> snap is not supported on the RHEL 7 onwards, because we have integrated snap >>> functionality in sosreport. So this patch displays a suitable message on >>> usage of snap tool. RHEL 7+ users can use sosreport to collect log data. >>> >> >> Nathan, >> >> >>> Signed-off-by: Henish Patel <hp...@li...> >> >> As you are aware we are trying to standardize data collection tool rather than >> having separate tool for Power.. We have made necessary changes in distro >> provided tools (sosreport for RH) to collect required data.. Also any future >> changes goes to distro provided tools only.. >> > > Not a problem. > > Do you know if there is any work to do this same thing for the other distro's? Yes .. We are planning to deprecate for SLES12 onwards as well.. We have pushed all required changes to supportconfig command.. Let me confirm we have everything in supportconfig.. Then will send out another patch. > > It appears we are on a path to deprecate this command, I'm just trying to figure > out what the timeline for that looks like. All n-1 distro releases (like RHEL 6.x , SLES11.x) contains snap command. And we have not enabled distro provided tools in those releases to collect Power specific information.. So should we carry this command for sometime in upstream or deprecate right way? Note that RH is removed this command from RHEL7.1 onwards.. likewise recently its removed from Fedora as well. -Vasant > > -Nathan > >> Hence this patch adds necessary message to snap... >> >> >> Reviewed-by: Vasant Hegde <heg...@li...> >> >> >> -Vasant >> >>> --- >>> scripts/snap | 14 +++++++++++++- >>> 1 file changed, 13 insertions(+), 1 deletion(-) >>> >>> diff --git a/scripts/snap b/scripts/snap >>> index 3e547e6..1bede61 100755 >>> --- a/scripts/snap >>> +++ b/scripts/snap >>> @@ -34,7 +34,19 @@ my $outfile = "snap.tar.gz"; # in the working dir. >>> my $cmddir = "snap_commands"; # cmd output dir. >>> my $cmdoutdir = "$outdir/$cmddir"; # in outdir dir. >>> my $rsxx_exists = 0; # Does an IBM Flash Adapter exist? >>> -my $distro_file = "/etc/issue" >>> +my $distro_file = "/etc/issue"; >>> +my $redhat_release_file = "/etc/redhat-release"; >>> + >>> +if (-e $redhat_release_file) { >>> + open(RELEASE, "< $redhat_release_file") or die "open: $!\n"; >>> + $_ = <RELEASE>; >>> + my $redhat_version = (split / /, $_)[6]; >>> + if ($redhat_version > 7.0) { >>> + print "snap: is not supported on the RHEL 7 onwards..!\n"; >>> + print "Please use sosreport to collect log data..!! \n"; >>> + exit 1; >>> + } >>> +} >>> >>> our($opt_a, $opt_d, $opt_h, $opt_o, $opt_t, $opt_v); >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Powerpc-utils-devel mailing list >>> Pow...@li... >>> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >>> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> |
From: Vasant H. <heg...@li...> - 2015-01-08 05:34:34
|
On 01/08/2015 01:33 AM, Nathan Fontenot wrote: > On 01/07/2015 01:01 AM, Vasant Hegde wrote: >> On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: >>> Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set >>> >>> This patch will resolve the above issue and display the correct values of threads-per-core >>> for the ppc64_cpu command when --smt value is set. >>> >>> I have used the following equation to calculate threads_per_core as per lscpu command. >>> >>> threads_per_core = nthreads / ncores > > I think there may be a slight misunderstanding between the threads-per-core > option for the ppc64_cou command and what lscpu reports. > > The threads-per-core option to the ppc64_cpu command reports the number of > threads that a core contains, not the number of online threads per core. > > If you want to know the number of online threads per core you need to use the > --info or --smt option. I think we need man page for this command! -Vasant > > -Nathan > >>> >>> *********************************************** >>> Test results: >>> >>> CASE 1: >>> >>> ./src/ppc64_cpu --smt=on >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 4 >>> >>> lscpu output: >>> Thread(s) per core: 4 >>> ------------------------------------------ >>> CASE 2: >>> >>> ./src/ppc64_cpu --smt=2 >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 2 >>> >>> lscpu output: >>> Thread(s) per core: 2 >>> -------------------------------------------------- >>> CASE 3: >>> >>> ./src/ppc64_cpu --smt=1 >>> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >>> Threads per core: 1 >>> >>> lscpu output: >>> Thread(s) per core: 1 >>> ------------------------------------------------- >>> >>> Signed-off-by: Mamatha Inamdar <mam...@li...> >>> --- >>> src/ppc64_cpu.c | 15 ++++++++++++++- >>> 1 file changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c >>> index 4df4cdc..a3cfed0 100644 >>> --- a/src/ppc64_cpu.c >>> +++ b/src/ppc64_cpu.c >>> @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; >>> static int threads_per_cpu = 0; >>> static int cpus_in_system = 0; >>> static int threads_in_system = 0; >>> +static int threads_per_core = 0; >> >> Why do you need another global variable ? can't you just print " nthreads / >> cpus_in_system" ? >> >>> >>> static int do_info(void); >>> >>> @@ -529,9 +530,21 @@ static int do_smt(char *state) >>> return rc; >>> } >>> >>> +/* Threads per core */ >>> static inline void do_threads_per_core() >>> { >>> - printf("Threads per core: %d\n", threads_per_cpu); >>> + int i, j; >>> + int nthreads; /* number of threads online */ >> >> initialize nthreads ? >> >> >>> + >>> + /* Calculate number of threads present on the system */ >>> + for (j = 0; j < threads_in_system; j += threads_per_cpu) { >>> + for (i = 0; i < threads_per_cpu; i++) >>> + nthreads += cpu_online(j + i); >>> + } >> >> Can we have different cores with different SMT level? >> >> -Vasant >> >>> + >>> + /* Calculate threads per core = nthreads / ncores */ >>> + threads_per_core = nthreads / cpus_in_system; >>> + printf("Threads per core: %d\n", threads_per_core); >>> } >>> >>> static int do_subcores_per_core(char *state) >>> >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming! The Go Parallel Website, >>> sponsored by Intel and developed in partnership with Slashdot Media, is your >>> hub for all things parallel software development, from weekly thought >>> leadership blogs to news, videos, case studies, tutorials and more. Take a >>> look and join the conversation now. http://goparallel.sourceforge.net >>> _______________________________________________ >>> Powerpc-utils-devel mailing list >>> Pow...@li... >>> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >>> >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> |
From: Nathan F. <nf...@li...> - 2015-01-07 20:28:49
|
Pulled into -next. Thanks, -Nathan On 12/04/2014 11:33 AM, Thomas Falcon wrote: > Commit 493bfdda30b61be46d7d71e5e7bb05df9334ba81 should have removed > some endian conversions included in previous commit. Unfortunately, > they were not removed, causing problems when hotplugging memory. > This patch removes those endian conversions. > > Signed-off-by: Thomas Falcon <tlf...@li...> > --- > src/drmgr/drslot_chrp_mem.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c > index a867894..6c2ac07 100644 > --- a/src/drmgr/drslot_chrp_mem.c > +++ b/src/drmgr/drslot_chrp_mem.c > @@ -298,11 +298,6 @@ get_dynamic_reconfig_lmbs(struct lmb_list_head *lmb_list) > for (i = 0; i < num_entries; i++) { > struct dr_node *lmb; > > - /* convert for LE systems */ > - drmem->address = be64toh(drmem->address); > - drmem->drc_index = be32toh(drmem->drc_index); > - drmem->flags = be32toh(drmem->flags); > - > for (lmb = lmb_list->lmbs; lmb; lmb = lmb->next) { > if (lmb->drc_index == be32toh(drmem->drc_index)) > break; > @@ -576,11 +571,7 @@ update_drconf_node(struct dr_node *lmb, struct lmb_list_head *lmb_list, > > for (i = 0; i < entries; i++) { > > - /* convert for LE systems */ > - drmem->drc_index = be32toh(drmem->drc_index); > - drmem->flags = be32toh(drmem->flags); > - > - if (drmem->drc_index != lmb->drc_index) { > + if (be32toh(drmem->drc_index) != lmb->drc_index) { > drmem++; > continue; > } > |
From: Nathan F. <nf...@li...> - 2015-01-07 20:26:20
|
On 12/14/2014 11:39 PM, Vasant Hegde wrote: > On 12/05/2014 04:11 PM, Henish Patel wrote: >> snap is not supported on the RHEL 7 onwards, because we have integrated snap >> functionality in sosreport. So this patch displays a suitable message on >> usage of snap tool. RHEL 7+ users can use sosreport to collect log data. >> > > Nathan, > > >> Signed-off-by: Henish Patel <hp...@li...> > > As you are aware we are trying to standardize data collection tool rather than > having separate tool for Power.. We have made necessary changes in distro > provided tools (sosreport for RH) to collect required data.. Also any future > changes goes to distro provided tools only.. > > Hence this patch adds necessary message to snap... > > > Reviewed-by: Vasant Hegde <heg...@li...> > > > -Vasant > >> --- >> scripts/snap | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/scripts/snap b/scripts/snap >> index 3e547e6..1bede61 100755 >> --- a/scripts/snap >> +++ b/scripts/snap >> @@ -34,7 +34,19 @@ my $outfile = "snap.tar.gz"; # in the working dir. >> my $cmddir = "snap_commands"; # cmd output dir. >> my $cmdoutdir = "$outdir/$cmddir"; # in outdir dir. >> my $rsxx_exists = 0; # Does an IBM Flash Adapter exist? >> -my $distro_file = "/etc/issue" >> +my $distro_file = "/etc/issue"; >> +my $redhat_release_file = "/etc/redhat-release"; >> + >> +if (-e $redhat_release_file) { >> + open(RELEASE, "< $redhat_release_file") or die "open: $!\n"; >> + $_ = <RELEASE>; >> + my $redhat_version = (split / /, $_)[6]; >> + if ($redhat_version > 7.0) { Did you mean to disable snap for RHEL 7.0? If so this doesn't work, should be; if ($redhat_version >= 7.0) >> + print "snap: is not supported on the RHEL 7 onwards..!\n"; Also, I think the colon in this message is not needed, just say "snap is not ...". -Nathan >> + print "Please use sosreport to collect log data..!! \n"; >> + exit 1; >> + } >> +} >> >> our($opt_a, $opt_d, $opt_h, $opt_o, $opt_t, $opt_v); >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Nathan F. <nf...@li...> - 2015-01-07 20:04:05
|
On 01/07/2015 01:01 AM, Vasant Hegde wrote: > On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: >> Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set >> >> This patch will resolve the above issue and display the correct values of threads-per-core >> for the ppc64_cpu command when --smt value is set. >> >> I have used the following equation to calculate threads_per_core as per lscpu command. >> >> threads_per_core = nthreads / ncores I think there may be a slight misunderstanding between the threads-per-core option for the ppc64_cou command and what lscpu reports. The threads-per-core option to the ppc64_cpu command reports the number of threads that a core contains, not the number of online threads per core. If you want to know the number of online threads per core you need to use the --info or --smt option. -Nathan >> >> *********************************************** >> Test results: >> >> CASE 1: >> >> ./src/ppc64_cpu --smt=on >> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >> Threads per core: 4 >> >> lscpu output: >> Thread(s) per core: 4 >> ------------------------------------------ >> CASE 2: >> >> ./src/ppc64_cpu --smt=2 >> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >> Threads per core: 2 >> >> lscpu output: >> Thread(s) per core: 2 >> -------------------------------------------------- >> CASE 3: >> >> ./src/ppc64_cpu --smt=1 >> [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core >> Threads per core: 1 >> >> lscpu output: >> Thread(s) per core: 1 >> ------------------------------------------------- >> >> Signed-off-by: Mamatha Inamdar <mam...@li...> >> --- >> src/ppc64_cpu.c | 15 ++++++++++++++- >> 1 file changed, 14 insertions(+), 1 deletion(-) >> >> diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c >> index 4df4cdc..a3cfed0 100644 >> --- a/src/ppc64_cpu.c >> +++ b/src/ppc64_cpu.c >> @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; >> static int threads_per_cpu = 0; >> static int cpus_in_system = 0; >> static int threads_in_system = 0; >> +static int threads_per_core = 0; > > Why do you need another global variable ? can't you just print " nthreads / > cpus_in_system" ? > >> >> static int do_info(void); >> >> @@ -529,9 +530,21 @@ static int do_smt(char *state) >> return rc; >> } >> >> +/* Threads per core */ >> static inline void do_threads_per_core() >> { >> - printf("Threads per core: %d\n", threads_per_cpu); >> + int i, j; >> + int nthreads; /* number of threads online */ > > initialize nthreads ? > > >> + >> + /* Calculate number of threads present on the system */ >> + for (j = 0; j < threads_in_system; j += threads_per_cpu) { >> + for (i = 0; i < threads_per_cpu; i++) >> + nthreads += cpu_online(j + i); >> + } > > Can we have different cores with different SMT level? > > -Vasant > >> + >> + /* Calculate threads per core = nthreads / ncores */ >> + threads_per_core = nthreads / cpus_in_system; >> + printf("Threads per core: %d\n", threads_per_core); >> } >> >> static int do_subcores_per_core(char *state) >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Vasant H. <heg...@li...> - 2015-01-07 07:02:22
|
On 12/23/2014 12:08 PM, Mamatha Inamdar wrote: > Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set > > This patch will resolve the above issue and display the correct values of threads-per-core > for the ppc64_cpu command when --smt value is set. > > I have used the following equation to calculate threads_per_core as per lscpu command. > > threads_per_core = nthreads / ncores > > *********************************************** > Test results: > > CASE 1: > > ./src/ppc64_cpu --smt=on > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 4 > > lscpu output: > Thread(s) per core: 4 > ------------------------------------------ > CASE 2: > > ./src/ppc64_cpu --smt=2 > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 2 > > lscpu output: > Thread(s) per core: 2 > -------------------------------------------------- > CASE 3: > > ./src/ppc64_cpu --smt=1 > [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core > Threads per core: 1 > > lscpu output: > Thread(s) per core: 1 > ------------------------------------------------- > > Signed-off-by: Mamatha Inamdar <mam...@li...> > --- > src/ppc64_cpu.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c > index 4df4cdc..a3cfed0 100644 > --- a/src/ppc64_cpu.c > +++ b/src/ppc64_cpu.c > @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; > static int threads_per_cpu = 0; > static int cpus_in_system = 0; > static int threads_in_system = 0; > +static int threads_per_core = 0; Why do you need another global variable ? can't you just print " nthreads / cpus_in_system" ? > > static int do_info(void); > > @@ -529,9 +530,21 @@ static int do_smt(char *state) > return rc; > } > > +/* Threads per core */ > static inline void do_threads_per_core() > { > - printf("Threads per core: %d\n", threads_per_cpu); > + int i, j; > + int nthreads; /* number of threads online */ initialize nthreads ? > + > + /* Calculate number of threads present on the system */ > + for (j = 0; j < threads_in_system; j += threads_per_cpu) { > + for (i = 0; i < threads_per_cpu; i++) > + nthreads += cpu_online(j + i); > + } Can we have different cores with different SMT level? -Vasant > + > + /* Calculate threads per core = nthreads / ncores */ > + threads_per_core = nthreads / cpus_in_system; > + printf("Threads per core: %d\n", threads_per_core); > } > > static int do_subcores_per_core(char *state) > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Mamatha I. <mam...@li...> - 2014-12-23 06:38:57
|
Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set This patch will resolve the above issue and display the correct values of threads-per-core for the ppc64_cpu command when --smt value is set. I have used the following equation to calculate threads_per_core as per lscpu command. threads_per_core = nthreads / ncores *********************************************** Test results: CASE 1: ./src/ppc64_cpu --smt=on [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 4 lscpu output: Thread(s) per core: 4 ------------------------------------------ CASE 2: ./src/ppc64_cpu --smt=2 [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 2 lscpu output: Thread(s) per core: 2 -------------------------------------------------- CASE 3: ./src/ppc64_cpu --smt=1 [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 1 lscpu output: Thread(s) per core: 1 ------------------------------------------------- Signed-off-by: Mamatha Inamdar <mam...@li...> --- src/ppc64_cpu.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c index 4df4cdc..a3cfed0 100644 --- a/src/ppc64_cpu.c +++ b/src/ppc64_cpu.c @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; static int threads_per_cpu = 0; static int cpus_in_system = 0; static int threads_in_system = 0; +static int threads_per_core = 0; static int do_info(void); @@ -529,9 +530,21 @@ static int do_smt(char *state) return rc; } +/* Threads per core */ static inline void do_threads_per_core() { - printf("Threads per core: %d\n", threads_per_cpu); + int i, j; + int nthreads; /* number of threads online */ + + /* Calculate number of threads present on the system */ + for (j = 0; j < threads_in_system; j += threads_per_cpu) { + for (i = 0; i < threads_per_cpu; i++) + nthreads += cpu_online(j + i); + } + + /* Calculate threads per core = nthreads / ncores */ + threads_per_core = nthreads / cpus_in_system; + printf("Threads per core: %d\n", threads_per_core); } static int do_subcores_per_core(char *state) |
From: Mamatha I. <mam...@li...> - 2014-12-22 16:31:57
|
Problem: ppc64_cpu --threads-per-core gives wrong data when --smt value set This patch will resolve the above issue and display the correct values of threads-per-core for the ppc64_cpu command when --smt value is set. I have used the following equation to calculate threads_per_core as per lscpu command. threads_per_core = nthreads / ncores *********************************************** Test results: CASE 1: ./src/ppc64_cpu --smt=on [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 4 lscpu output: Thread(s) per core: 4 ------------------------------------------ CASE 2: ./src/ppc64_cpu --smt=2 [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 2 lscpu output: Thread(s) per core: 2 -------------------------------------------------- CASE 3: ./src/ppc64_cpu --smt=1 [root@llmjuno03b powerpc-utils]# ./src/ppc64_cpu --threads-per-core Threads per core: 1 lscpu output: Thread(s) per core: 1 ------------------------------------------------- Signed-off-by: Mamatha Inamdar <mam...@li...> --- src/ppc64_cpu.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c index 4df4cdc..a3cfed0 100644 --- a/src/ppc64_cpu.c +++ b/src/ppc64_cpu.c @@ -56,6 +56,7 @@ static int counters[MAX_NR_CPUS]; static int threads_per_cpu = 0; static int cpus_in_system = 0; static int threads_in_system = 0; +static int threads_per_core = 0; static int do_info(void); @@ -529,9 +530,21 @@ static int do_smt(char *state) return rc; } +/* Threads per core */ static inline void do_threads_per_core() { - printf("Threads per core: %d\n", threads_per_cpu); + int i, j; + int nthreads; /* number of threads online */ + + /* Calculate number of threads present on the system */ + for (j = 0; j < threads_in_system; j += threads_per_cpu) { + for (i = 0; i < threads_per_cpu; i++) + nthreads += cpu_online(j + i); + } + + /* Calculate threads per core = nthreads / ncores */ + threads_per_core = nthreads / cpus_in_system; + printf("Threads per core: %d\n", threads_per_core); } static int do_subcores_per_core(char *state) |
From: Nathan F. <nf...@li...> - 2014-12-17 21:54:09
|
On 12/14/2014 11:39 PM, Vasant Hegde wrote: > On 12/05/2014 04:11 PM, Henish Patel wrote: >> snap is not supported on the RHEL 7 onwards, because we have integrated snap >> functionality in sosreport. So this patch displays a suitable message on >> usage of snap tool. RHEL 7+ users can use sosreport to collect log data. >> > > Nathan, > > >> Signed-off-by: Henish Patel <hp...@li...> > > As you are aware we are trying to standardize data collection tool rather than > having separate tool for Power.. We have made necessary changes in distro > provided tools (sosreport for RH) to collect required data.. Also any future > changes goes to distro provided tools only.. > Not a problem. Do you know if there is any work to do this same thing for the other distro's? It appears we are on a path to deprecate this command, I'm just trying to figure out what the timeline for that looks like. -Nathan > Hence this patch adds necessary message to snap... > > > Reviewed-by: Vasant Hegde <heg...@li...> > > > -Vasant > >> --- >> scripts/snap | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/scripts/snap b/scripts/snap >> index 3e547e6..1bede61 100755 >> --- a/scripts/snap >> +++ b/scripts/snap >> @@ -34,7 +34,19 @@ my $outfile = "snap.tar.gz"; # in the working dir. >> my $cmddir = "snap_commands"; # cmd output dir. >> my $cmdoutdir = "$outdir/$cmddir"; # in outdir dir. >> my $rsxx_exists = 0; # Does an IBM Flash Adapter exist? >> -my $distro_file = "/etc/issue" >> +my $distro_file = "/etc/issue"; >> +my $redhat_release_file = "/etc/redhat-release"; >> + >> +if (-e $redhat_release_file) { >> + open(RELEASE, "< $redhat_release_file") or die "open: $!\n"; >> + $_ = <RELEASE>; >> + my $redhat_version = (split / /, $_)[6]; >> + if ($redhat_version > 7.0) { >> + print "snap: is not supported on the RHEL 7 onwards..!\n"; >> + print "Please use sosreport to collect log data..!! \n"; >> + exit 1; >> + } >> +} >> >> our($opt_a, $opt_d, $opt_h, $opt_o, $opt_t, $opt_v); >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Powerpc-utils-devel mailing list >> Pow...@li... >> https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Vasant H. <heg...@li...> - 2014-12-15 05:44:15
|
On 10/28/2014 03:55 PM, Jan Löser wrote: > Hi, > > I attached a patch/workaround for CVE-2014-4040. > > CVE is about: > > snap in powerpc-utils 1.2.20 produces an archive with fstab and > yaboot.conf files potentially containing cleartext passwords, and lacks > a warning about reviewing this archive to detect included passwords, > which might allow remote attackers to obtain sensitive information by > leveraging access to a technical-support data stream. > We are working towards enabling distro provided data collection tool to collect Power specific data as well... (supportconfig from SLES12+, sosreport from RHEL7+, apport-collect fro Ubuntu). Ultimate goal is to deprecate this tool. So I think we are fine with removing those two files. -Vasant |
From: Vasant H. <heg...@li...> - 2014-12-15 05:39:19
|
On 12/05/2014 04:11 PM, Henish Patel wrote: > snap is not supported on the RHEL 7 onwards, because we have integrated snap > functionality in sosreport. So this patch displays a suitable message on > usage of snap tool. RHEL 7+ users can use sosreport to collect log data. > Nathan, > Signed-off-by: Henish Patel <hp...@li...> As you are aware we are trying to standardize data collection tool rather than having separate tool for Power.. We have made necessary changes in distro provided tools (sosreport for RH) to collect required data.. Also any future changes goes to distro provided tools only.. Hence this patch adds necessary message to snap... Reviewed-by: Vasant Hegde <heg...@li...> -Vasant > --- > scripts/snap | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/scripts/snap b/scripts/snap > index 3e547e6..1bede61 100755 > --- a/scripts/snap > +++ b/scripts/snap > @@ -34,7 +34,19 @@ my $outfile = "snap.tar.gz"; # in the working dir. > my $cmddir = "snap_commands"; # cmd output dir. > my $cmdoutdir = "$outdir/$cmddir"; # in outdir dir. > my $rsxx_exists = 0; # Does an IBM Flash Adapter exist? > -my $distro_file = "/etc/issue" > +my $distro_file = "/etc/issue"; > +my $redhat_release_file = "/etc/redhat-release"; > + > +if (-e $redhat_release_file) { > + open(RELEASE, "< $redhat_release_file") or die "open: $!\n"; > + $_ = <RELEASE>; > + my $redhat_version = (split / /, $_)[6]; > + if ($redhat_version > 7.0) { > + print "snap: is not supported on the RHEL 7 onwards..!\n"; > + print "Please use sosreport to collect log data..!! \n"; > + exit 1; > + } > +} > > our($opt_a, $opt_d, $opt_h, $opt_o, $opt_t, $opt_v); > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Henish P. <hp...@li...> - 2014-12-05 10:41:56
|
snap is not supported on the RHEL 7 onwards, because we have integrated snap functionality in sosreport. So this patch displays a suitable message on usage of snap tool. RHEL 7+ users can use sosreport to collect log data. Signed-off-by: Henish Patel <hp...@li...> --- scripts/snap | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/snap b/scripts/snap index 3e547e6..1bede61 100755 --- a/scripts/snap +++ b/scripts/snap @@ -34,7 +34,19 @@ my $outfile = "snap.tar.gz"; # in the working dir. my $cmddir = "snap_commands"; # cmd output dir. my $cmdoutdir = "$outdir/$cmddir"; # in outdir dir. my $rsxx_exists = 0; # Does an IBM Flash Adapter exist? -my $distro_file = "/etc/issue" +my $distro_file = "/etc/issue"; +my $redhat_release_file = "/etc/redhat-release"; + +if (-e $redhat_release_file) { + open(RELEASE, "< $redhat_release_file") or die "open: $!\n"; + $_ = <RELEASE>; + my $redhat_version = (split / /, $_)[6]; + if ($redhat_version > 7.0) { + print "snap: is not supported on the RHEL 7 onwards..!\n"; + print "Please use sosreport to collect log data..!! \n"; + exit 1; + } +} our($opt_a, $opt_d, $opt_h, $opt_o, $opt_t, $opt_v); |
From: Thomas F. <tlf...@li...> - 2014-12-04 17:33:32
|
Commit 493bfdda30b61be46d7d71e5e7bb05df9334ba81 should have removed some endian conversions included in previous commit. Unfortunately, they were not removed, causing problems when hotplugging memory. This patch removes those endian conversions. Signed-off-by: Thomas Falcon <tlf...@li...> --- src/drmgr/drslot_chrp_mem.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c index a867894..6c2ac07 100644 --- a/src/drmgr/drslot_chrp_mem.c +++ b/src/drmgr/drslot_chrp_mem.c @@ -298,11 +298,6 @@ get_dynamic_reconfig_lmbs(struct lmb_list_head *lmb_list) for (i = 0; i < num_entries; i++) { struct dr_node *lmb; - /* convert for LE systems */ - drmem->address = be64toh(drmem->address); - drmem->drc_index = be32toh(drmem->drc_index); - drmem->flags = be32toh(drmem->flags); - for (lmb = lmb_list->lmbs; lmb; lmb = lmb->next) { if (lmb->drc_index == be32toh(drmem->drc_index)) break; @@ -576,11 +571,7 @@ update_drconf_node(struct dr_node *lmb, struct lmb_list_head *lmb_list, for (i = 0; i < entries; i++) { - /* convert for LE systems */ - drmem->drc_index = be32toh(drmem->drc_index); - drmem->flags = be32toh(drmem->flags); - - if (drmem->drc_index != lmb->drc_index) { + if (be32toh(drmem->drc_index) != lmb->drc_index) { drmem++; continue; } -- 1.9.3 |
From: Nathan F. <nf...@li...> - 2014-11-25 16:31:16
|
On 10/29/2014 12:38 AM, Jeremy Kerr wrote: > Currently, --without-librtas disables ppc64_cpu. > > However, we only need librtas for the run-mode determination; other > functions will work fine without it. > > This change allows ppc64_cpu to be built without librtas, by > conditionally enabling run-mode, and restoring ppc64_cpu to be built > when --without-librtas is given. > > We need to re-work src/Makefile.am a little here - we use the += > operator to include rtas-specific functionality, which means the > with-librtas cases need to be listed before the without ones. > > We also need to #include stdint.h, as ppc64_cpu.c uses inttypes from > here. > > Signed-off-by: Jeremy Kerr <jk...@oz...> > > --- > v2: rebase to current git tree & update autotools changes > > --- > Makefile.am | 30 +++++++++++++++--------------- > configure.ac | 5 ++++- > src/ppc64_cpu.c | 22 ++++++++++++++++++++-- > 3 files changed, 39 insertions(+), 18 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index 01b258e..9cb3212 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -49,12 +49,23 @@ EXTRA_DIST += COPYRIGHT Changelog powerpc-utils.spec.in doc/activate_firmware.do > doc/nvram.doxycfg doc/rtas_ibm_get_vpd.doxycfg doc/serv_config.doxycfg \ > doc/set_poweron_time.doxycfg doc/uesensor.doxycfg > > -sbin_PROGRAMS += src/nvram src/lsprop src/lparstat > +sbin_PROGRAMS += src/nvram src/lsprop src/lparstat src/ppc64_cpu > > pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h > > librtas_error_SOURCES = src/common/librtas_error.c src/common/librtas_error.h > > +src_nvram_SOURCES = src/nvram.c src/nvram.h $(pseries_platform_SOURCES) > +src_nvram_LDADD = -ldl -lz > + > +src_lsprop_SOURCES = src/lsprop.c $(pseries_platform_SOURCES) > + > +src_lparstat_SOURCES = src/lparstat.c src/lparstat.h $(pseries_platform_SOURCES) > + > +src_ppc64_cpu_SOURCES = src/ppc64_cpu.c $(pseries_platform_SOURCES) > +src_ppc64_cpu_LDADD = -lpthread > + > + > AM_CFLAGS = -Wall -g -I $(top_srcdir)/src/common/ > > if WITH_LIBRTAS > @@ -65,8 +76,7 @@ sbin_PROGRAMS += \ > src/serv_config \ > src/uesensor \ > src/rtas_event_decode \ > - src/sys_ident \ > - src/ppc64_cpu > + src/sys_ident > > src_activate_firmware_SOURCES = src/activate_fw.c $(pseries_platform_SOURCES) > src_activate_firmware_LDADD = -lrtas > @@ -89,19 +99,9 @@ src_rtas_event_decode_LDADD = -lrtasevent > src_sys_ident_SOURCES = src/sys_ident.c $(pseries_platform_SOURCES) > src_sys_ident_LDADD = -lrtas > > -src_ppc64_cpu_SOURCES = src/ppc64_cpu.c $(librtas_error_SOURCES) $(pseries_platform_SOURCES) > -src_ppc64_cpu_LDADD = -lrtas -lpthread > +src_ppc64_cpu_SOURCES += $(librtas_error_SOURCES) $(pseries_platform_SOURCES) I was hitting a build error due to the second inclusion of $(pseries_platform_SOURCES) here. Removing this to be +src_ppc64_cpu_SOURCES += $(librtas_error_SOURCES) fixes it. I'll go ahead and pull this in with this slight modification unless you have an objection. -Nathan > +src_ppc64_cpu_LDADD += -lrtas > > -endif > - > -src_nvram_SOURCES = src/nvram.c src/nvram.h $(pseries_platform_SOURCES) > -src_nvram_LDADD = -ldl -lz > - > -src_lsprop_SOURCES = src/lsprop.c $(pseries_platform_SOURCES) > - > -src_lparstat_SOURCES = src/lparstat.c src/lparstat.h $(pseries_platform_SOURCES) > - > -if WITH_LIBRTAS > sbin_PROGRAMS += src/drmgr/drmgr src/drmgr/lsslot > endif > > diff --git a/configure.ac b/configure.ac > index 988b3e5..2eb8b26 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -47,7 +47,10 @@ AC_ARG_WITH([librtas], > > AS_IF([test "x$with_librtas" != "xno"], > [AC_CHECK_HEADER([librtas.h], > - [with_libtras=yes], > + [ > + with_libtras=yes > + AC_DEFINE(WITH_LIBRTAS) > + ], > [AC_MSG_FAILURE( > [librtas test failed (--without-librtas to disable)])] > )] > diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c > index 4df4cdc..28b9b20 100644 > --- a/src/ppc64_cpu.c > +++ b/src/ppc64_cpu.c > @@ -10,10 +10,10 @@ > #define _GNU_SOURCE > #include <stdio.h> > #include <stdlib.h> > +#include <stdint.h> > #include <unistd.h> > #include <string.h> > #include <dirent.h> > -#include <librtas.h> > #include <sys/types.h> > #include <sys/stat.h> > #include <fcntl.h> > @@ -25,10 +25,16 @@ > #include <sys/ptrace.h> > #include <sys/wait.h> > #include <sys/resource.h> > + > +#ifdef WITH_LIBRTAS > +#include <librtas.h> > +#include "librtas_error.h" > +#endif > + > #ifdef HAVE_LINUX_PERF_EVENT_H > #include <linux/perf_event.h> > #endif > -#include "librtas_error.h" > + > #include <errno.h> > > #define PPC64_CPU_VERSION "1.2" > @@ -682,6 +688,8 @@ static int do_smt_snooze_delay(char *state) > return rc; > } > > +#ifdef WITH_LIBRTAS > + > static int do_run_mode(char *run_mode) > { > char mode[3]; > @@ -744,6 +752,16 @@ static int do_run_mode(char *run_mode) > return rc; > } > > +#else > + > +static int do_run_mode(char *run_mode) > +{ > + printf("Run mode determination is not supported on this platfom.\n"); > + return -1; > +} > + > +#endif > + > #ifdef HAVE_LINUX_PERF_EVENT_H > > static int setup_counters(void) > > ------------------------------------------------------------------------------ > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel > |
From: Thomas F. <tlf...@li...> - 2014-11-19 00:01:31
|
The SMT row will only display the number of enabled SMT threads if SMT is enabled. Signed-off-by: Thomas Falcon <tlf...@li...> --- man/lparstat.8 | 2 +- src/lparstat.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/man/lparstat.8 b/man/lparstat.8 index 8accc83..6d94486 100644 --- a/man/lparstat.8 +++ b/man/lparstat.8 @@ -25,7 +25,7 @@ mode Indicates whether the partition processor capacity is capped or uncapped allowing it to consume idle cycles from the shared pool. Dedicated LPAR is capped or donating. .TP smt -Indicates whether simultaneous multi-threading is enabled or disabled in the partition. If there are two SMT threads, the row is displayed as "on." However, if there are more than two SMT threads, the number of SMT threads is displayed. +Indicates whether simultaneous multi-threading is enabled or disabled in the partition. If SMT is enabled, the number of SMT threads is displayed. .TP lcpu Number of online logical processors. diff --git a/src/lparstat.c b/src/lparstat.c index 92fabc5..8c4c71d 100644 --- a/src/lparstat.c +++ b/src/lparstat.c @@ -375,12 +375,10 @@ void get_smt_mode(struct sysentry *se, char *buf) unused = fgets(line, 128, f); pclose(f); - /* The output is either "SMT is on" or "SMT is off", we can cheat - * by looking at line[8] for either 'n' or 'f'. + /* The output is either "SMT=x" or "SMT is off", we can cheat + * by looking at line[8] for an 'f'. */ - if (line[8] == 'n') - sprintf(buf, "On"); - else if (line[8] == 'f') + if (line[8] == 'f') sprintf(buf, "Off"); else sprintf(buf, "%c", line[4]); -- 2.1.2 |
From: Thomas F. <tlf...@li...> - 2014-11-19 00:01:19
|
This patch removes "SMT is on" as a possible output when the smt option is used. Instead, only the number of SMT threads will be displayed. Signed-off-by: Thomas Falcon <tlf...@li...> --- src/ppc64_cpu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c index 4df4cdc..d0a45c8 100644 --- a/src/ppc64_cpu.c +++ b/src/ppc64_cpu.c @@ -504,8 +504,6 @@ static int do_smt(char *state) if (smt_state == 1) printf("SMT is off\n"); - else if (smt_state == threads_per_cpu) - printf("SMT is on\n"); else if (smt_state == -1) printf("Inconsistent state: mix of ST and SMT cores\n"); else -- 2.1.2 |
From: Nathan F. <nf...@li...> - 2014-11-18 21:36:46
|
I think there are a couple of things that have led to this. First the lparstat command was first done when you had either smt off or on, where smt on == smt 2. The later addition of multiple smt modes has confused this. The other reason is that the lparstat command on Linux was originally written to be a clone of aix command. I think at this point we should drop the output that indicates smt is 'on'. Instead we should just print the actual smt mode, or off. -Nathan On 11/17/2014 05:26 PM, Thomas Falcon wrote: > The lparstat man page specifies "if there are two SMT threads, the row is displayed as 'on.' However, if there are more than two SMT threads, the number of SMT threads is displayed." The actual SMT output would be Dedicated, which I think is because of a bug. I sent a patch for that earlier today, but the documentation does not match the new output. > > For example, the machine that I tested on gave an output of "on" when SMT was set to four and "2" when SMT was set to two. > > # ppc64_cpu --smt=4 > # ./lparstat > > System Configuration > type=Shared mode=Capped smt=On lcpu=4 mem=3899904 kB cpus=16 ent=2.00 > > %user %sys %wait %idle physc %entc lbusy vcsw phint > ----- ----- ----- ----- ----- ----- ----- ----- ----- > 0.00 0.01 0.00 99.99 0.00 0.00 0.01 9744131 0 > ltcbrazos2-lp08:~/powerpc-utils/src # ppc > ppc ppc32 ppc64 ppc64_cpu > > # ppc64_cpu --smt=2 > # ./lparstat > > System Configuration > type=Shared mode=Capped smt=2 lcpu=4 mem=3899904 kB cpus=16 ent=2.00 > > %user %sys %wait %idle physc %entc lbusy vcsw phint > ----- ----- ----- ----- ----- ----- ----- ----- ----- > 0.00 0.00 0.00 99.99 0.00 0.00 0.00 9749696 0 > > After some testing, it looks to me that the output is "on" when using the maximum possible SMT value. I created a patch to change the documentation, but I wanted to be sure that I was correct before sending it. > |