summaryrefslogtreecommitdiffstats
path: root/crypto/aes_generic.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-06-22 19:44:05 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-07-07 17:25:19 +0200
commit069f3222ca96acfe8c59937e98c401bda5475b48 (patch)
tree28db93df7b122265120acee62403a412295022bd /crypto/aes_generic.c
parent1c2e7b451b889bead46cef410a737d1767cd6f0b (diff)
downloadlinux-stable-069f3222ca96acfe8c59937e98c401bda5475b48.tar.gz
linux-stable-069f3222ca96acfe8c59937e98c401bda5475b48.tar.bz2
linux-stable-069f3222ca96acfe8c59937e98c401bda5475b48.zip
crush: implement weight and id overrides for straw2
bucket_straw2_choose needs to use weights that may be different from weight_items. For instance to compensate for an uneven distribution caused by a low number of values. Or to fix the probability biais introduced by conditional probabilities (see http://tracker.ceph.com/issues/15653 for more information). We introduce a weight_set for each straw2 bucket to set the desired weight for a given item at a given position. The weight of a given item when picking the first replica (first position) may be different from the weight the second replica (second position). For instance the weight matrix for a given bucket containing items 3, 7 and 13 could be as follows: position 0 position 1 item 3 0x10000 0x100000 item 7 0x40000 0x10000 item 13 0x40000 0x10000 When crush_do_rule picks the first of two replicas (position 0), item 7, 3 are four times more likely to be choosen by bucket_straw2_choose than item 13. When choosing the second replica (position 1), item 3 is ten times more likely to be choosen than item 7, 13. By default the weight_set of each bucket exactly matches the content of item_weights for each position to ensure backward compatibility. bucket_straw2_choose compares items by using their id. The same ids are also used to index buckets and they must be unique. For each item in a bucket an array of ids can be provided for placement purposes and they are used instead of the ids. If no replacement ids are provided, the legacy behavior is preserved. Reflects ceph.git commit 19537a450fd5c5a0bb8b7830947507a76db2ceca. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'crypto/aes_generic.c')
0 files changed, 0 insertions, 0 deletions