diff --git a/.gitignore b/.gitignore index ae8a13a..ba8ed10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/iprdbg.8.gz -SOURCES/iprutils-2.4.15.1.tar.gz +SOURCES/iprutils-2.4.16.1.tar.gz diff --git a/.iprutils.metadata b/.iprutils.metadata index 9a76cc7..d185855 100644 --- a/.iprutils.metadata +++ b/.iprutils.metadata @@ -1,2 +1,2 @@ ba7fff20477af3cb00dcc323690ca108454a2302 SOURCES/iprdbg.8.gz -ed6c362ee3c6bd9023ee60d0d1a1ce5543c27c41 SOURCES/iprutils-2.4.15.1.tar.gz +ed73dd2731f4333c0c098481d81ec83fc3f15cc9 SOURCES/iprutils-2.4.16.1.tar.gz diff --git a/SOURCES/0001-iprutils-Further-show-details-speedup.patch b/SOURCES/0001-iprutils-Further-show-details-speedup.patch new file mode 100644 index 0000000..5141c6f --- /dev/null +++ b/SOURCES/0001-iprutils-Further-show-details-speedup.patch @@ -0,0 +1,137 @@ +From 71fac05d32d8665b19fad2041ab81056d7a96325 Mon Sep 17 00:00:00 2001 +From: Brian King +Date: Tue, 8 May 2018 15:04:33 -0500 +Subject: [PATCH] iprutils: Further show-details speedup + +While attempting to further optimize show-details performance, +it was observed that get_drive_phy_loc was iterating over all +ioa's, even though a specific ioa is passed into the function. +On large configurations, this resulted in show-details taking +longer than 5 seconds. If we remove this redundant code, show-details +will now complete in less than 1 second in a similar configuration. + +Signed-off-by: Brian King +--- + iprconfig.c | 94 ++++++++++++++++++++++++++++++------------------------------- + 1 file changed, 46 insertions(+), 48 deletions(-) + +diff --git a/iprconfig.c b/iprconfig.c +index 9f4f61f..6a5fd21 100644 +--- a/iprconfig.c ++++ b/iprconfig.c +@@ -17780,66 +17780,64 @@ static int get_drive_phy_loc(struct ipr_ioa *ioa) + char phy_loc[PHYSICAL_LOCATION_LENGTH + 1]; + int times, index; + +- for_each_ioa(ioa) { +- is_spi = ioa_is_spi(ioa); ++ is_spi = ioa_is_spi(ioa); + +- for_each_hotplug_dev(ioa, dev) { +- if (ioa->sis64) +- get_res_path(dev); +- else +- get_res_addrs(dev); +- } ++ for_each_hotplug_dev(ioa, dev) { ++ if (ioa->sis64) ++ get_res_path(dev); ++ else ++ get_res_addrs(dev); ++ } + +- for_each_ses(ioa, ses) { +- times = 5; +- if (strlen(ses->physical_location) == 0) +- get_ses_phy_loc(ses); +- while (times--) { +- if (!ipr_receive_diagnostics(ses, 2, &ses_data, sizeof(ses_data))) +- break; +- } +- if (times < 0 ) continue; ++ for_each_ses(ioa, ses) { ++ times = 5; ++ if (strlen(ses->physical_location) == 0) ++ get_ses_phy_loc(ses); ++ while (times--) { ++ if (!ipr_receive_diagnostics(ses, 2, &ses_data, sizeof(ses_data))) ++ break; ++ } ++ if (times < 0 ) continue; + +- if (ipr_receive_diagnostics(ses, 1, &ses_cfg, sizeof(ses_cfg))) +- continue; ++ if (ipr_receive_diagnostics(ses, 1, &ses_cfg, sizeof(ses_cfg))) ++ continue; + +- if (ipr_receive_diagnostics(ses, 7, &drive_data, sizeof(drive_data))) +- continue; ++ if (ipr_receive_diagnostics(ses, 7, &drive_data, sizeof(drive_data))) ++ continue; + +- overall = ipr_get_overall_elem(&ses_data, &ses_cfg); +- ses_bus = ses->scsi_dev_data->channel; +- scsi_id_found = 0; ++ overall = ipr_get_overall_elem(&ses_data, &ses_cfg); ++ ses_bus = ses->scsi_dev_data->channel; ++ scsi_id_found = 0; + +- if (!is_spi && (overall->device_environment == 0)) +- is_vses = 1; +- else +- is_vses = 0; ++ if (!is_spi && (overall->device_environment == 0)) ++ is_vses = 1; ++ else ++ is_vses = 0; + +- scsi_dbg(ses, "%s\n", is_vses ? "Found VSES" : "Found real SES"); ++ scsi_dbg(ses, "%s\n", is_vses ? "Found VSES" : "Found real SES"); + +- for_each_elem_status(elem_status, &ses_data, &ses_cfg) { +- index = index_in_page2(&ses_data, elem_status->slot_id); +- if (index != -1) +- get_drive_phy_loc_with_ses_phy_loc(ses, &drive_data, index, phy_loc, 0); +- +- if (elem_status->status == IPR_DRIVE_ELEM_STATUS_UNSUPP) +- continue; +- if (elem_status->status == IPR_DRIVE_ELEM_STATUS_NO_ACCESS) +- continue; +- if (is_spi && (scsi_id_found & (1 << elem_status->slot_id))) +- continue; +- scsi_id_found |= (1 << elem_status->slot_id); ++ for_each_elem_status(elem_status, &ses_data, &ses_cfg) { ++ index = index_in_page2(&ses_data, elem_status->slot_id); ++ if (index != -1) ++ get_drive_phy_loc_with_ses_phy_loc(ses, &drive_data, index, phy_loc, 0); + +- if (ioa->sis64) +- dev = get_dev_for_slot_64bit(ses, elem_status->slot_id, phy_loc); +- else +- dev = get_dev_for_slot(ses, elem_status->slot_id, is_vses, phy_loc); +- if (!dev) +- continue; ++ if (elem_status->status == IPR_DRIVE_ELEM_STATUS_UNSUPP) ++ continue; ++ if (elem_status->status == IPR_DRIVE_ELEM_STATUS_NO_ACCESS) ++ continue; ++ if (is_spi && (scsi_id_found & (1 << elem_status->slot_id))) ++ continue; ++ scsi_id_found |= (1 << elem_status->slot_id); + +- } ++ if (ioa->sis64) ++ dev = get_dev_for_slot_64bit(ses, elem_status->slot_id, phy_loc); ++ else ++ dev = get_dev_for_slot(ses, elem_status->slot_id, is_vses, phy_loc); ++ if (!dev) ++ continue; + + } ++ + } + return 0; + } +-- +2.14.4 + diff --git a/SPECS/iprutils.spec b/SPECS/iprutils.spec index 5781cd3..27a26cf 100644 --- a/SPECS/iprutils.spec +++ b/SPECS/iprutils.spec @@ -1,17 +1,18 @@ Summary: Utilities for the IBM Power Linux RAID adapters Name: iprutils -Version: 2.4.15.1 +Version: 2.4.16.1 Release: 1%{?dist} License: CPL Group: System Environment/Base URL: http://sourceforge.net/projects/iprdd/ -Source0: https://sourceforge.net/projects/iprdd/files/iprutils%20for%202.6%20kernels/2.4.15/%{name}-%{version}.tar.gz +Source0: https://sourceforge.net/projects/iprdd/files/iprutils%20for%202.6%20kernels/2.4.16/%{name}-%{version}.tar.gz # missing man page Source1: iprdbg.8.gz Patch0: 0001-Service-start-is-controled-by-udev-rule.patch +Patch1: 0001-iprutils-Further-show-details-speedup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -35,6 +36,7 @@ supported by the ipr SCSI storage device driver. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .udev +%patch1 -p1 -b .speed %build export CFLAGS="%{optflags} -fPIE -Wl,-z,relro,-z,now" @@ -95,6 +97,12 @@ mkdir -p $RPM_BUILD_ROOT/%{_unitdir} %{_sysconfdir}/bash_completion.d %changelog +* Tue Jun 19 2018 Sinny Kumari - 2.4.16.1-1 +- Resolves: #1587834 - vpdupdate takes over an hour on system with 104 drive +- Resolves: #1521052 - iprutils package update for POWER +- Resolves: #1547891 - iprconfig unable to Download microcode on all applicable devices +- Resolves: #1576013 - iprconfig tools shows wrong error message, while creating raid using RI SSDs and normal SSDs + * Wed Sep 13 2017 Sinny Kumari - 2.4.15.1-1 - Resolves: #1456500 - iprutils package update to 2.4.15.1