summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2017-12-14 15:32:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-22 11:41:18 +0200
commitddeaa67217447abd443ac5fcc9681d6f27a8bef4 (patch)
treef5dcb36d2e9175fe8b4e3b42d99783aceb069686 /drivers/hwmon
parent576086c09950f113b42bfb17047dcf0200566753 (diff)
mm/kmemleak.c: make cond_resched() rate-limiting more efficient
commit 13ab183d138f607d885e995d625e58d47678bf97 upstream. Commit bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()") tries to rate-limit the frequency of cond_resched() calls, but does it in a way which might incur an expensive division operation in the inner loop. Simplify this. Fixes: bde5f6bc68db5 ("kmemleak: add scheduling point to kmemleak_scan()") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Yisheng Xie <xieyisheng1@huawei.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon')
0 files changed, 0 insertions, 0 deletions