[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpFVK3ceHy+ipSbLb0jAgE6tJAsu5=kbJEB9X4OWPnsVxA@mail.gmail.com>
Date: Fri, 16 Sep 2022 23:08:34 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Hao Lee <haolee.swjtu@...il.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Peter Zijlstra <peterz@...radead.org>,
Zhaoyang Huang <zhaoyang.huang@...soc.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] psi: fix possible missing or delayed pending event
On Wed, Sep 14, 2022 at 2:30 AM Hao Lee <haolee.swjtu@...il.com> wrote:
>
> When a pending event exists and growth is less than the threshold, the
> current logic is to skip this trigger without generating event. However,
> from e6df4ead85d9 ("psi: fix possible trigger missing in the window"),
> our purpose is to generate event as long as pending event exists and the
> rate meets the limit. This patch fixes the possible pending-event
> missing or delay.
>
> Fixes: e6df4ead85d9 ("psi: fix possible trigger missing in the window")
> Signed-off-by: Hao Lee <haolee.swjtu@...il.com>
> ---
> kernel/sched/psi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
> index 9711827e3..0bae4ee2b 100644
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -539,7 +539,7 @@ static u64 update_triggers(struct psi_group *group, u64 now)
>
> /* Calculate growth since last update */
> growth = window_update(&t->win, now, total[t->state]);
> - if (growth < t->threshold)
> + if (growth < t->threshold && !t->pending_event)
I'm not sure how this additional condition changes things. Current
logic is to set t->pending_event=true whenever growth exceeds the
t->threshold. This patch will change this logic into setting
t->pending_event=true also when t->pending_event=true. But why would
you want to set t->pending_event=true if it's already true? What am I
missing?
> continue;
>
> t->pending_event = true;
> --
> 2.21.0
>
Powered by blists - more mailing lists