From patchwork Fri Dec 3 23:58:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 379571 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB401F2k029394 for ; Sat, 4 Dec 2010 00:01:36 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oB3NwswV001523; Fri, 3 Dec 2010 18:58:55 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oB3NwrQ8025377 for ; Fri, 3 Dec 2010 18:58:53 -0500 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB3NwlqL013723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 3 Dec 2010 18:58:48 -0500 Received: from ether.msp.redhat.com (localhost.localdomain [127.0.0.1]) by ether.msp.redhat.com (8.14.1/8.14.1) with ESMTP id oB3NwlTT012411 for ; Fri, 3 Dec 2010 17:58:47 -0600 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id oB3Nwk1x012410 for dm-devel@redhat.com; Fri, 3 Dec 2010 17:58:46 -0600 Date: Fri, 3 Dec 2010 17:58:46 -0600 From: Benjamin Marzinski To: device-mapper development Message-ID: <20101203235846.GM25172@ether.msp.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH] multipath: standardize on path_selector X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 04 Dec 2010 00:01:36 +0000 (UTC) Index: multipath-tools-101104/libmultipath/dict.c =================================================================== --- multipath-tools-101104.orig/libmultipath/dict.c +++ multipath-tools-101104/libmultipath/dict.c @@ -2220,7 +2220,7 @@ init_keywords(void) install_keyword("polling_interval", &polling_interval_handler, &snprint_def_polling_interval); install_keyword("udev_dir", &udev_dir_handler, &snprint_def_udev_dir); install_keyword("multipath_dir", &multipath_dir_handler, &snprint_def_multipath_dir); - install_keyword("selector", &def_selector_handler, &snprint_def_selector); + install_keyword("path_selector", &def_selector_handler, &snprint_def_selector); install_keyword("path_grouping_policy", &def_pgpolicy_handler, &snprint_def_path_grouping_policy); install_keyword("getuid_callout", &def_getuid_callout_handler, &snprint_def_getuid_callout); install_keyword("prio", &def_prio_handler, &snprint_def_prio); Index: multipath-tools-101104/multipath.conf.annotated =================================================================== --- multipath-tools-101104.orig/multipath.conf.annotated +++ multipath-tools-101104/multipath.conf.annotated @@ -27,14 +27,14 @@ # polling_interval 10 # # # -# # name : selector +# # name : path_selector # # scope : multipath & multipathd # # desc : the default path selector algorithm to use # # these algorithms are offered by the kernel multipath target # # values : "round-robin 0" # # default : "round-robin 0" # # -# selector "round-robin 0" +# path_selector "round-robin 0" # # # # # name : path_grouping_policy Index: multipath-tools-101104/multipath.conf.defaults =================================================================== --- multipath-tools-101104.orig/multipath.conf.defaults +++ multipath-tools-101104/multipath.conf.defaults @@ -4,7 +4,7 @@ #defaults { # udev_dir /dev # polling_interval 5 -# selector "round-robin 0" +# path_selector "round-robin 0" # path_grouping_policy failover # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # prio const Index: multipath-tools-101104/multipath.conf.synthetic =================================================================== --- multipath-tools-101104.orig/multipath.conf.synthetic +++ multipath-tools-101104/multipath.conf.synthetic @@ -5,7 +5,7 @@ #defaults { # udev_dir /dev # polling_interval 10 -# selector "round-robin 0" +# path_selector "round-robin 0" # path_grouping_policy multibus # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # prio const Index: multipath-tools-101104/multipath/multipath.conf.5 =================================================================== --- multipath-tools-101104.orig/multipath/multipath.conf.5 +++ multipath-tools-101104/multipath/multipath.conf.5 @@ -101,10 +101,22 @@ default verbosity. Higher values increas levels are between 0 and 6; default is .I 2 .TP -.B selector +.B path_selector The default path selector algorithm to use; they are offered by the -kernel multipath target. The only currently implemented is -.I "round-robin 0" +kernel multipath target. There are three selector algorithms. +.RS +.TP 12 +.B "round-robin 0" +Loop through every path in the path group, sending the same amount of IO to +each. +.TP +.B "queue-length 0" +Send the next bunch of IO down the path with the least amount of outstanding IO. +.TP +.B "service-time 0" +Choose the path for the next bunch of IO based on the amount of outstanding IO +to the path and its relative throughput. +.RE .TP .B path_grouping_policy The default path grouping policy to apply to unspecified