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:	Wed, 13 May 2009 10:32:52 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	pm list <linux-pm@...ts.linux-foundation.org>
Cc:	Wu Fengguang <fengguang.wu@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...onice.net>,
	David Rientjes <rientjes@...gle.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: [RFC][PATCH 0/6] PM/Hibernate: Rework memory shrinking (rev. 4)

On Sunday 10 May 2009, Rafael J. Wysocki wrote:
> On Thursday 07 May 2009, Rafael J. Wysocki wrote:
> > On Thursday 07 May 2009, Rafael J. Wysocki wrote:
> > > Hi,
> > > 
> > > The following patchset is an attempt to rework the memory shrinking mechanism
> > > used during hibernation to make room for the image.  It is a work in progress
> > > and most likely it's going to be modified, but it has been discussed recently
> > > and I'd like to get comments on the current version.
> > > 
> > > [1/5] - disable the OOM kernel after freezing tasks (this will be dropped if
> > >         it's verified that we can avoid the OOM killing by using
> > >         __GFP_FS|__GFP_WAIT|__GFP_NORETRY|__GFP_NOWARN
> > >         in the next patches).
> > > 
> > > [2/5] - drop memory shrinking from the suspend (to RAM) code path
> > > 
> > > [3/5] - move swsusp_shrink_memory() to snapshot.c
> > > 
> > > [4/5] - rework swsusp_shrink_memory() (to use memory allocations for applying
> > >         memory pressure)
> > > 
> > > [5/5] - allocate image pages along with the shrinking.
> > 
> > Updated patchset follows.
> 
> I the meantime I added a patch that attempts to computer the size of the hard
> core working set.  I also had to rework the patch reworking
> swsusp_shrink_memory() so that it takes highmem into account.
> 
> Currently, the patchset consists of the following patches:
> 
> [1/6] - disable the OOM kernel after freezing tasks (this will be dropped if
>         it's verified that we can avoid the OOM killing by using
>         __GFP_FS|__GFP_WAIT|__GFP_NORETRY|__GFP_NOWARN
>         in the next patches).
> 
> [2/6] - drop memory shrinking from the suspend (to RAM) code path
> 
> [3/6] - move swsusp_shrink_memory() to snapshot.c
> 
> [4/6] - rework swsusp_shrink_memory() (to use memory allocations for applying
>         memory pressure)
> 
> [5/6] - allocate image pages along with the shrinking
> 
> [6/6] - estimate the size of the hard core working set and use it as the lower
>         limit of the image size.

This is the 4th (and hopefully final) version of the patchset reworking
hibernation memory shrinking.  The patches have been rearranged and some of
them were modified to fix bugs etc.

[1/6] - drop memory shrinking from the suspend (to RAM) code path

[2/6] - move swsusp_shrink_memory() to snapshot.c

[3/6] - disable the OOM killer after freezing tasks (now it is done it a
        simpler way)

[4/6] - rework swsusp_shrink_memory() to use memory allocations for applying
        memory pressure)

[5/6] - do not release the preallocated image pages

[6/6] - estimate the minimum image size and use it to avoid attempting to free
        too much memory too hard

IMO patches [1/6] and [2/6] are ready to go, so I'm going to add them to the
linux-next branch of the suspend tree.

Patch [3/6] in in mm, but it would be easier to handle [4/6] - [6/6] having
this patch in the suspend tree.  Dunno.  Andrew, what would you prefer to do
with it?

Patches [4/6] - [6/6] have been tested on a couple of boxes in different
configuration and no major problems have been found.

Comments welcome.

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