lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 2 May 2009 00:26:18 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	pavel@....cz, torvalds@...ux-foundation.org, jens.axboe@...cle.com,
	alan-jenkins@...fmail.co.uk, linux-kernel@...r.kernel.org,
	kernel-testers@...r.kernel.org,
	pm list <linux-pm@...ts.linux-foundation.org>
Subject: [PATCH 0/3] PM: Drop shrink_all_memory (was: Re: [Bug #13058] First hibernation attempt fails)

On Wednesday 22 April 2009, Andrew Morton wrote:
> On Wed, 22 Apr 2009 22:11:17 +0200
> "Rafael J. Wysocki" <rjw@...k.pl> wrote:
> 
> > On Wednesday 22 April 2009, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > Of course, this will protect the calling task from getting oom-killed. 
> > > > But it doesn't protect other tasks from getting oom-killed due to the
> > > > activity of _this_ task.
> > > > 
> > > > But I think that problem already exists, and that this proposal doesn't
> > > > worsen anything, yes?
> > > > 
> > > > Or is it the case that all other tasks are safely stuck in the freezer
> > > > at this time, so they won't be allocating any memory anyway?
> > > 
> > > That is the idea, yes. ... but we now have more threads that are not
> > > freezable... so they may allocate the memory.
> > > 
> > > Is it non-feasible to free memory without really going and allocating
> > > everything?
> > 
> > The question is whether there is a point.  In principle we can just go and
> > allocate as much as we need upfront.  It shouldn't change anything, because
> > we resume and suspend devices after creating the image anyway.
> > 
> > I think we could try to disable the OOM killer before suspend and just
> > allocate the memory for the image right before devices are suspended for the
> > first time.
> > 
> 
> It would be nice to do.
> 
> shrink_all_memory() is simply trying to do something which page reclaim
> doesn't expect to do (free memory when there's already lots of memory
> free).  Consequently it doesn't do it very well, and there's a good
> risk that changes to core reclaim will accidentally break
> shrink_all_memory().  

OK, a patchset follows:

[1/3] - disable the OOM killer during system-wide power transitions (should be
        done anyway IMO)
[2/3] - move swsusp_shrink_memory() to kernel/power/snapshot.c so that the
        next patch is easier to read
[3/3] - drop shrink_all_memory()

Please have a look and tell me what you think.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ