lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] psi: Remove the redundant psi_task_tick
On Sun, Feb 07, 2021 at 07:56:42PM +0800, Chengming Zhou wrote:
> From: zhouchengming <zhouchengming@bytedance.com>
>
> When the current task in a cgroup is in_memstall, the corresponding psi_group
> is in PSI_MEM_FULL state

This is correct.

> so we can remove the redundant psi_task_tick from scheduler_tick to
> save this periodic cost.

But this isn't. It IS the task tick that makes it so. The state change
tracking counts MEMSTALL tasks and ONCPU tasks, but it doesn't check
whether the ONCPU task is the MEMSTALL one.

It would be possible to incorporate that into psi_task_switch(), but
you have to be careful with the branches because that path is often
hotter than the timer tick.

This patch by itself breaks page reclaim detection, so NAK.

\
 
 \ /
  Last update: 2021-02-08 20:11    [W:0.077 / U:5.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site