projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df963ea
)
crush: do is_out test only if we do not collide
author
Ilya Dryomov
<idryomov@gmail.com>
Thu, 16 Feb 2017 14:21:15 +0000
(15:21 +0100)
committer
Ilya Dryomov
<idryomov@gmail.com>
Thu, 23 Feb 2017 21:22:02 +0000
(22:22 +0100)
The is_out() test may require an additional hashing operation, so we
should skip it whenever possible.
Reflects ceph.git commit
db107cc7f15cf2481894add325dc93e33479f529
.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ceph/crush/mapper.c
b/net/ceph/crush/mapper.c
index 2e31217ccae3b52f1ec3162cb08c25fcf59cbc13..84d2de04786530a3765564842a2a0cbef8a02a9a 100644
(file)
--- a/
net/ceph/crush/mapper.c
+++ b/
net/ceph/crush/mapper.c
@@
-552,14
+552,12
@@
static int crush_choose_firstn(const struct crush_map *map,
}
}
- if (!reject) {
+ if (!reject
&& !collide
) {
/* out? */
if (itemtype == 0)
reject = is_out(map, weight,
weight_max,
item, x);
- else
- reject = 0;
}
reject: