diff options
| author | Miaohe Lin <[email protected]> | 2021-02-24 12:08:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-02-24 13:38:33 -0800 |
| commit | 725cac1c7e345c2e35a2de2db57233af279b851f (patch) | |
| tree | 4bfc4b746af2ca638b7af166705d77e87a897389 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | c2135f7c570bc274035834848d9bf46ea89ba763 (diff) | |
mm/workingset.c: avoid unnecessary max_nodes estimation in count_shadow_nodes()
If list_lru_shrink_count is 0, we always return SHRINK_EMPTY regardless of
the value of max_nodes. So we can return early if nodes == 0 to save some
cpu cycles of approximating a reasonable limit for the nodes.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions