diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-24 14:19:25 -0500 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-31 13:32:17 -0500 |
commit | 3102b0a5b4cd63acccac78ca541b73fe28b4faa6 (patch) | |
tree | 31b3a5f69f9304fe740ece82e9e06f3dd55645fc /net/ceph/crush | |
parent | 9a3b490a20e06368c81d7a81506e99388e733379 (diff) |
crush: add note about r in recursive choose
Reflects ceph.git commit 4551fee9ad89d0427ed865d766d0d44004d3e3e1.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r-- | net/ceph/crush/mapper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index caeb1066bea3..77b7a73e65cf 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c | |||
@@ -514,6 +514,14 @@ static void crush_choose_indep(const struct crush_map *map, | |||
514 | 514 | ||
515 | /* choose through intervening buckets */ | 515 | /* choose through intervening buckets */ |
516 | for (;;) { | 516 | for (;;) { |
517 | /* note: we base the choice on the position | ||
518 | * even in the nested call. that means that | ||
519 | * if the first layer chooses the same bucket | ||
520 | * in a different position, we will tend to | ||
521 | * choose a different item in that bucket. | ||
522 | * this will involve more devices in data | ||
523 | * movement and tend to distribute the load. | ||
524 | */ | ||
517 | r = rep; | 525 | r = rep; |
518 | 526 | ||
519 | /* be careful */ | 527 | /* be careful */ |