Commit 96b72ab7 authored by Huaisheng Ye's avatar Huaisheng Ye Committed by Todd Kjos
Browse files

UPSTREAM: mm/damon/core: skip apply schemes if empty

Sometimes there is no scheme in damon's context, for example just use damo
record to monitor workload's data access pattern.

If current damon context doesn't have any scheme in the list, kdamond has
no need to iterate over list of all targets and regions but do nothing.

So, skip apply schemes when ctx->schemes is empty.

Link: https://lkml.kernel.org/r/20230116062347.1148553-1-huaisheng.ye@intel.com


Signed-off-by: default avatarHuaisheng Ye <huaisheng.ye@intel.com>
Reviewed-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 64517d6e)

Bug: 300502883
Bug: 317310896
Change-Id: Ic76ca90c85dbb24205b17dd914f91a8dd4cf7345
Signed-off-by: default avatarcui yangpei <cuiyangpei@xiaomi.com>
parent e7aeacd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment