From: Sage Weil Date: Fri, 5 Dec 2014 23:55:24 +0000 (-0800) Subject: crush: set straw_calc_version=1 for default+optimal; do not touch for presets X-Git-Tag: v0.91~35^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dd7b58f3b1aa1febfc6dc227937df93ee6e284eb;p=ceph.git crush: set straw_calc_version=1 for default+optimal; do not touch for presets When using the presets for compatibility (i.e., based on version), do not touch the straw behavior, as it does not affect mapping or compatibility. However, make a point of setting it by default and for optimal. For most users, this means that they will not see any change unless they explicitly enable the new behavior, or switch to default or optimal tunables. The idea is that if they touched it, they shouldn't be too surprised by the subsequent data movement. Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index 7bef266db9b7..b17f9a14f14f 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -107,7 +107,6 @@ public: crush->choose_total_tries = 19; crush->chooseleaf_descend_once = 0; crush->chooseleaf_vary_r = 0; - crush->straw_calc_version = 0; } void set_tunables_bobtail() { crush->choose_local_tries = 0; @@ -115,7 +114,6 @@ public: crush->choose_total_tries = 50; crush->chooseleaf_descend_once = 1; crush->chooseleaf_vary_r = 0; - crush->straw_calc_version = 0; } void set_tunables_firefly() { crush->choose_local_tries = 0; @@ -123,7 +121,6 @@ public: crush->choose_total_tries = 50; crush->chooseleaf_descend_once = 1; crush->chooseleaf_vary_r = 1; - crush->straw_calc_version = 0; } void set_tunables_hammer() { crush->choose_local_tries = 0; @@ -131,19 +128,17 @@ public: crush->choose_total_tries = 50; crush->chooseleaf_descend_once = 1; crush->chooseleaf_vary_r = 1; - crush->straw_calc_version = 1; } void set_tunables_legacy() { set_tunables_argonaut(); + crush->straw_calc_version = 0; } void set_tunables_optimal() { set_tunables_hammer(); + crush->straw_calc_version = 1; } void set_tunables_default() { - // default to bobtail tunables for the bits that affect - // compatibility, but default to the latest straw_calc_version - // because that does not. set_tunables_bobtail(); crush->straw_calc_version = 1; }