]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: improve straw2 adjustment slightly
authorSage Weil <sage@redhat.com>
Fri, 16 Jan 2015 16:36:12 +0000 (08:36 -0800)
committerSage Weil <sage@redhat.com>
Thu, 22 Jan 2015 18:17:02 +0000 (10:17 -0800)
This improves the accuracy for low weights especially...

Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/mapper.c

index 32486b63c487ea4a0f1e0959d13f9617c01abe86..c409ca1262bad01df81adfa456105fe7d96927dd 100644 (file)
@@ -322,7 +322,7 @@ static int bucket_straw2_choose(struct crush_bucket_straw2 *bucket,
                 * [0, 0xffff] (corresponding to real numbers
                 * [-11.090355,0]).
                 */
-               ln = crush_ln(u) - 0xfffc;
+               ln = crush_ln(u) - 0x10000;
 
                /*
                 * divide by 16.16 fixed-point weight