]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crush: straw2 bucket type with an efficient 64-bit crush_ln()
authorIlya Dryomov <idryomov@gmail.com>
Tue, 14 Apr 2015 13:54:52 +0000 (16:54 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 22 Apr 2015 15:33:43 +0000 (18:33 +0300)
commit958a27658d94cf212caeb0ffb04ee0b0bc89cc40
tree2aff94f8b656b5526c8cfef1a8994edbb0c960fb
parent45002267e8d2699bf9b022315bee3dd13b044843
crush: straw2 bucket type with an efficient 64-bit crush_ln()

This is an improved straw bucket that correctly avoids any data movement
between items A and B when neither A nor B's weights are changed.  Said
differently, if we adjust the weight of item C (including adding it anew
or removing it completely), we will only see inputs move to or from C,
never between other items in the bucket.

Notably, there is not intermediate scaling factor that needs to be
calculated.  The mapping function is a simple function of the item weights.

The below commits were squashed together into this one (mostly to avoid
adding and then yanking a ~6000 lines worth of crush_ln_table):

- crush: add a straw2 bucket type
- crush: add crush_ln to calculate nature log efficently
- crush: improve straw2 adjustment slightly
- crush: change crush_ln to provide 32 more digits
- crush: fix crush_get_bucket_item_weight and bucket destroy for straw2
- crush/mapper: fix divide-by-0 in straw2
  (with div64_s64() for draw = ln / w and INT64_MIN -> S64_MIN - need
   to create a proper compat.h in ceph.git)

Reflects ceph.git commits 242293c908e923d474910f2b8203fa3b41eb5a53,
                          32a1ead92efcd351822d22a5fc37d159c65c1338,
                          6289912418c4a3597a11778bcf29ed5415117ad9,
                          35fcb04e2945717cf5cfe150b9fa89cb3d2303a1,
                          6445d9ee7290938de1e4ee9563912a6ab6d8ee5f,
                          b5921d55d16796e12d66ad2c4add7305f9ce2353.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/crush/crush.h
net/ceph/crush/crush.c
net/ceph/crush/crush_ln_table.h [new file with mode: 0644]
net/ceph/crush/mapper.c
net/ceph/osdmap.c