lkml.org 
[lkml]   [2018]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages
On Tue 30-01-18 02:56:51, He, Roger wrote:
> Hi Michal:
>
> We need a API to tell TTM module the system totally has how many swap
> cache. Then TTM module can use it to restrict how many the swap cache
> it can use to prevent triggering OOM. For Now we set the threshold of
> swap size TTM used as 1/2 * total size and leave the rest for others
> use.

Why do you so much memory? Are you going to use TB of memory on large
systems? What about memory hotplug when the memory is added/released?

> But get_nr_swap_pages is the only API we can accessed from other
> module now. It can't cover the case of the dynamic swap size
> increment. I mean: user can use "swapon" to enable new swap file or
> swap disk dynamically or "swapoff" to disable swap space.

Exactly. Your scaling configuration based on get_nr_swap_pages or the
available memory simply sounds wrong.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-01-30 08:56    [W:0.831 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site