sched/psi: Extract update_triggers side effect
authorDomenico Cerasuolo <cerasuolodomenico@gmail.com>
Thu, 30 Mar 2023 10:54:17 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:50:37 +0000 (08:50 +0200)
commitfb4bc32fc1be05a79aa99bee32211d985460138c
treeea99681c92dd916ed8852f98697b320c202590b7
parentc1623d4d0bef6da397aacfb24dbd453e93d9cbe9
sched/psi: Extract update_triggers side effect

[ Upstream commit 4468fcae49f08e88fbbffe05b29496192df89991 ]

This change moves update_total flag out of update_triggers function,
currently called only in psi_poll_work.
In the next patch, update_triggers will be called also in psi_avgs_work,
but the total update information is specific to psi_poll_work.
Returning update_total value to the caller let us avoid differentiating
the implementation of update_triggers for different aggregators.

Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20230330105418.77061-4-cerasuolodomenico@gmail.com
Stable-dep-of: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/sched/psi.c