Skip to content

Commit

Permalink
crush: improve straw2 adjustment slightly
Browse files Browse the repository at this point in the history
This improves the accuracy for low weights especially...

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 22, 2015
1 parent 32a1ead commit 6289912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crush/mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6289912

Please sign in to comment.