Messages in this thread | | | From | "Huang, Ying" <> | Subject | Re: [PATCH] memcg: add interface to force disable swap | Date | Sun, 08 Oct 2023 09:14:54 +0800 |
| |
Jianlin Lv <iecedge@gmail.com> writes:
> From: Jianlin Lv <iecedge@gmail.com> > > Global reclaim will swap even if swappiness is set to 0.
Why? Can you elaborate the situation?
> In particular > case, users wish to be able to completely disable swap for specific > processes. One scenario is that if JVM memory pages falls into swap, > the performance will noticeably reduce and the GC pauses tend to increase > to levels not tolerable by most applications. > If it's possible to only disable swap out for specific processes, it can > address the JVM GC pauses issues, and at the same time, memory reclaim > pressure is also manageable. > > This patch adds "memory.swap_force_disable" control file to support disable > swap for non-root cgroup. When process is associated with a cgroup, > 'echo 1 > memory.swap_force_disable' will forbid anon pages be swapped out. > This patch also adds read and write handler of the control file.
-- Best Regards, Huang, Ying
| |