[lkml]   [2012]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 3.2.0-rc1 3/3] Used Memory Meter pseudo-device module
On Fri, 13 Jan 2012, wrote:

> > Your memory threshold, as proposed, will have values that are tied directly to the
> > implementation of the VM in the kernel when its under memory pressure
> > and that implementation evolves at a constant rate.
> Not sure that I understand this statement. Free/Used/Active page sets
> are properties of any VM.

The point at which the latency is deemed to be unacceptable in your
trail-and-error is tied directly to the implementation of the VM and must
be recalibrated with each userspace change or kernel upgrade. I assume
here that some reclaim is allowed in the VM for your usecase; if not, then
I already gave a solution for how to disable that entirely.

> The thresholds are set by user-space and individual for applications
> which likes to be informed.

You haven't given a usecase for the thresholds for anything other than
when you're just about oom, and I think it's much simpler if you actually
get to the point of oom and your userspace notifier is guaranteed to be
able to respond over a preconfigured delay. It works pretty well for us
internally, you should consider it.

> > mlock() the memory that your userspace monitoring needs to send signals to
> > applications, whether those signals are handled to free memory internally or
> Mlocked memory should be avoid as much as possible because efficiency
> rate is lowest possible and makes situation for non-mlocked pages even
> worse.

It's used only to protect the thread that is notified right before the oom
killer is triggered so that it can send the appropriate signals. If it
can't do that, the oom killer delay will expire on subsequent memory
allocation attempts and kill something itself. This thread should have a
minimal memory footprint, be mlock()'d into memory, and have an
oom_score_adj of OOM_SCORE_ADJ_MIN.

 \ /
  Last update: 2012-01-13 22:37    [W:0.058 / U:0.136 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site