Re: [PATCH] oom_pardon, aka don't kill my xlock

Marcelo Tosatti
2004-09-27T18:29:59Z

On Mon, Sep 27, 2004 at 07:12:53PM +0200, Herbert Poetzl wrote:
> On Mon, Sep 27, 2004 at 10:35:54AM -0300, Marcelo Tosatti wrote:
> > On Mon, Sep 27, 2004 at 02:12:26PM +0100, Jon Masters wrote:
> > > Hi all,
> > >
> > > Just out of interest then...suppose we've got a loopback swap device
> > > and that we can extend this by creating a new file or extending
> > > somehow the existing one.
> > >
> > > What would be wrong with having the page reclaim algorithms use one of
> > > the low memory watermarks as a trigger to call in to userspace to
> > > extend the swap available if possible? This is probably what Microsoft
> > > et al do with their "Windows is extending your virtual memory, yada
> > > yada blah blah". Comments? Already done?
> >
> > You dont to change kernel code for that - make a script to monitor
> > swap usage, as soon as it gets below a given watermark, you swapon
> > whatever swapfile you want.
>
> hmm, sounds good, but what if next 'burst' of
> swapped out data is larger than the watermark?

Give the watermark a large enough value.

> I'm no friend of the 'extend swap idea' so don't
> get me wrong, but userspace can just reduce the
> cases where you get out-of-swap, without support
> from the kernel side (via some userspace helper).