CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2014/09/26 03:25:38

Modified files:
        sys/sys        : hibernate.h 
        sys/kern       : subr_hibernate.c 
        sys/dev/acpi   : acpi.c 

Log message:
Rework piglet and pig allocation.  Currently the piglet gets allocated
deep down in the suspend path, where it is really hard to recover from
allocation failure.  So allocate the piglet early on in the suspend path.
Also change the piglet and piglet allocation functions to use km_alloc(9)
instead of doing pmemrange magic.  This removes a bunch of code which, in the
case of the piglet allocation, is broken since it results in a NULL pointer
dereference.  Also switch the piglet allocation to not wait.  If we can't
allocate 16MB of phys contig memory on a halfway modern machine we're almost
certainly under a lot of memory pressure and we're better off not trying to
hibernate anyway.

ok mlarkin@

Reply via email to