psi: Move PF_MEMSTALL out of task->flags
authorYafang Shao <laoar.shao@gmail.com>
Tue, 17 Mar 2020 01:28:05 +0000 (21:28 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Mar 2020 12:06:19 +0000 (13:06 +0100)
commit1066d1b6974e095d5a6c472ad9180a957b496cd6
tree32f387de4a544bdc0772949e6ffe9464ea229bc0
parenta0fe6ba69059266ba70ed5d3c4ac80713f6ffde7
psi: Move PF_MEMSTALL out of task->flags

The task->flags is a 32-bits flag, in which 31 bits have already been
consumed. So it is hardly to introduce other new per process flag.
Currently there're still enough spaces in the bit-field section of
task_struct, so we can define the memstall state as a single bit in
task_struct instead.
This patch also removes an out-of-date comment pointed by Matthew.

Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lkml.kernel.org/r/1584408485-1921-1-git-send-email-laoar.shao@gmail.com
include/linux/sched.h
kernel/sched/psi.c
kernel/sched/stats.h