lkml.org 
[lkml]   [2012]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 1/3] /dev/low_mem_notify
On Wed, 18 Jan 2012, Minchan Kim wrote:
> I didn't look into your code(will do) but as I read description,
> still I don't convince we need really some process specific threshold like 99%
> I think application can know it by polling /proc/meminfo without this mechanism
> if they really want.

I'm not sure if we need arbitrary threshold either. However, we need to
support the following cases:

- We're about to swap

- We're about to run out of memory

- We're about to start OOM killing

and I don't think your patch solves that. One possibility is to implement:

VMNOTIFY_TYPE_ABOUT_TO_SWAP
VMNOTIFY_TYPE_ABOUT_TO_OOM
VMNOTIFY_TYPE_ABOUT_TO_OOM_KILL

and maybe rip out support for arbitrary thresholds. Does that more
reasonable?

As for polling /proc/meminfo, I'd much rather deliver stats as part of
vmnotify_read() because it's easier to extend the ABI rather than adding
new fields to /proc/meminfo.

On Wed, 18 Jan 2012, Minchan Kim wrote:
> I would like to notify when system has a trobule with memory pressure without
> some process specific threshold. Of course, applicatoin can't expect it.(ie,
> application can know system memory pressure by /proc/meminfo but it can't know
> when swapout really happens). Kernel low mem notify have to give such notification
> to user space, I think.

It should be simple to add support for VMNOTIFY_TYPE_MEM_PRESSURE that
uses your hooks.

Pekka


\
 
 \ /
  Last update: 2012-01-18 08:19    [W:0.291 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site