One minor comment below. Additionally, can you also change init_vset_dev so that it too uses these new helper functions to determine a better default queue depth rather than the current hard coded num_devices_in_vset * 4?
Thanks! Brian On 02/12/2016 12:27 PM, Gabriel Krisman Bertazi wrote: > From: Wen Xiong <wenxi...@linux.vnet.ibm.com> > > This patch added maximum queue depth in GUI when creating an array. Also > fixed some issues in query-qdepth and set-qdepth. > > Changes since v1: > - Rebase to 2.4.10. > - Implement Brian suggestions on calculating max_qdepth. > - Change how Max queue depth property is displayed when doing disk > config. > - Fix segfault in ipr_set_dev_attr when there is no alternate path. > > Signed-off-by: Wen Xiong <wenxi...@linux.vnet.ibm.com> > Signed-off-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> > [Rebase to 2.4.10 and review fixes] > --- > iprconfig.c | 90 > ++++++++++++++++++++++++++++++++++++++++++++++++++----------- > iprlib.c | 17 +++++++++++- > iprlib.h | 2 ++ > 3 files changed, 92 insertions(+), 17 deletions(-) > > diff --git a/iprconfig.c b/iprconfig.c > index 3189af0..83c54e7 100644 > --- a/iprconfig.c > +++ b/iprconfig.c > @@ -3642,7 +3642,7 @@ int configure_raid_parameters(i_container *i_con) > int *userptr = NULL; > int *retptr; > int max_x,max_y,start_y,start_x; > - int qdepth, new_qdepth; > + int qdepth, new_qdepth, max_qdepth; > int cache_prot; > > getmaxyx(stdscr,max_y,max_x); > @@ -11074,10 +11109,20 @@ int change_disk_config(i_container * i_con) > tcq_warning = tcq_blocked = 0; > > if (!tcq_blocked || ipr_is_gscsi(dev)) { > - body = add_line_to_body(body,_("Queue Depth"), "%3"); > + get_number_devices(dev, &num_devs, &ssd_num_devs); > + max_qdepth = get_max_queue_depth(dev->ioa, num_devs, > ssd_num_devs); > + sprintf(buffer, "%d", max_qdepth); This first sprintf seems to be unnecessary as you them immediately do another sprintf and overwrite the buffer. > + > + sprintf(buffer, "Queue Depth (max = %03d)", max_qdepth); > + body = add_line_to_body(body, buffer, "%3"); > + > disk_config_attr[0].option = 1; > + > + if (disk_attr.queue_depth > max_qdepth) > + disk_attr.queue_depth = max_qdepth; > + > disk_config_attr[0].queue_depth = disk_attr.queue_depth; > - sprintf(qdepth_str,"%d",disk_config_attr[0].queue_depth); > + sprintf(qdepth_str, "%d", disk_config_attr[0].queue_depth); > i_con = add_i_con(i_con, qdepth_str, &disk_config_attr[0]); > } > -- Brian King Power Linux I/O IBM Linux Technology Center ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel