lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] memcg: add interface to force disable swap
Date
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

\
 
 \ /
  Last update: 2023-10-08 03:17    [W:0.091 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site