Re: [PATCH] psi: Fix trigger being fired unexpectedly at initial

From: Peter Zijlstra
Date: Wed Apr 06 2022 - 10:42:48 EST


On Fri, Apr 01, 2022 at 09:19:17AM -0700, Suren Baghdasaryan wrote:
> On Thu, Mar 31, 2022 at 10:10 PM Hailong Liu
> <liuhailong@xxxxxxxxxxxxxxxxx> wrote:
> >
> > When a trigger being created, its win.start_value and win.start_time are
> > reset to zero. If group->total[PSI_POLL][t->state] has accumulated before,
> > this trigger will be fired unexpectedly in the next period, even if its
> > growth time does not reach its threshold.
> >
> > So set the window of the new trigger to the current state value.
>
> Makes sense to me. Thanks!
>
> >
> > Signed-off-by: Hailong Liu <liuhailong@xxxxxxxxxxxxxxxxx>
>
> Acked-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

Thanks!