projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bcde88
)
bcachefs: target_congested -> get_random_u32_below()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 13 Mar 2025 13:56:07 +0000
(09:56 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 13 Mar 2025 16:39:21 +0000
(12:39 -0400)
get_random_u32_below() has a better algorithm than bch2_rand_range(),
it just didn't exist at the time.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io_read.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/io_read.c
b/fs/bcachefs/io_read.c
index
726da68
..
aa91fcf
100644
(file)
--- a/
fs/bcachefs/io_read.c
+++ b/
fs/bcachefs/io_read.c
@@
-59,7
+59,7
@@
static bool bch2_target_congested(struct bch_fs *c, u16 target)
}
rcu_read_unlock();
- return
bch2_rand_range
(nr * CONGESTED_MAX) < total;
+ return
get_random_u32_below
(nr * CONGESTED_MAX) < total;
}
#else