lkml.org 
[lkml]   [2012]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications
On Wed, 7 Nov 2012, Kirill A. Shutemov wrote:

> > > Sorry, I didn't follow previous discussion on this, but could you
> > > explain what's wrong with memory notifications from memcg?
> > > As I can see you can get pretty similar functionality using memory
> > > thresholds on the root cgroup. What's the point?
> >
> > Why should you be required to use cgroups to get VM pressure events to
> > userspace?
>
> Valid point. But in fact you have it on most systems anyway.
>
> I personally don't like to have a syscall per small feature.
> Isn't it better to have a file-based interface which can be used with
> normal file syscalls: open()/read()/poll()?
>

I agree that eventfd is the way to go, but I'll also add that this feature
seems to be implemented at a far too coarse of level. Memory, and hence
memory pressure, is constrained by several factors other than just the
amount of physical RAM which vmpressure_fd is addressing. What about
memory pressure caused by cpusets or mempolicies? (Memcg has its own
reclaim logic and its own memory thresholds implemented on top of eventfd
that people already use.) These both cause high levels of reclaim within
the page allocator whereas there may be an abundance of free memory
available on the system.

I don't think we want several implementations of memory pressure
notifications, so a more generic and flexible interface is going to be
needed and I think it can't be done in an extendable way through this
vmpressure_fd syscall. Unfortunately, I think that means polling on a
per-thread notifier.


\
 
 \ /
  Last update: 2012-11-15 05:01    [W:0.186 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site