Hi Nick. On Friday 30 June 2006 02:22, Nick Piggin wrote: > Nigel Cunningham wrote: > > Hi. > > > > On Tuesday 27 June 2006 16:11, Nick Piggin wrote: > >>Nigel Cunningham wrote: > >>>Add paranoia to the page_alloc code to ensure we don't start page > >>> reclaim during suspending. > >> > >>Nack. Set PF_MEMALLOC if you must. > > > > That would work for the thread doing the suspending. What about other > > kernel threads that might run and allocate memory during the cycle > > because of $RANDOM_EVENT? We don't want them triggering memory freeing > > either. > > Haven't you suspended the other threads at this point? Userspace is frozen, but kernel threads are still running. I'm therefore thinking of allocation of memory by drivers while we're writing the first part of the image (prior to the atomic copy). > What are the consequences of allocating memory? My concern isn't with them allocating any memory, but with the memory allocation routines trying to enter the vmscan.c routines to free memory. This would almost certainly free some of the LRU pages we're saving separately prior to the atomic copy, resulting in an inconsistent image and crashes and/or on disk corruption post resume. I've recently seen Rafael's code to take pages off the LRU, and realise that may be a better solution, but am not sure what adverse side effects it has. Regards, Nigel -- See http://www.suspend2.net for Howtos, FAQs, mailing lists, wiki and bugzilla info.
Attachment:
pgpP69nzeM1HU.pgp
Description: PGP signature
- References:
- [Suspend2][ 00/13] Miscellaneous patches
- From: Nigel Cunningham <[email protected]>
- Re: [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia.
- From: Nigel Cunningham <[email protected]>
- Re: [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia.
- From: Nick Piggin <[email protected]>
- [Suspend2][ 00/13] Miscellaneous patches
- Prev by Date: Re: [2.6 patch] fs/jffs2/: make 2 functions static
- Next by Date: Re: 2.6.17-mm4
- Previous by thread: Re: [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia.
- Next by thread: Re: [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia.
- Index(es):