public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <nigel@suspend2.net>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia.
Date: Fri, 30 Jun 2006 08:15:17 +1000	[thread overview]
Message-ID: <200606300815.21724.nigel@suspend2.net> (raw)
In-Reply-To: <44A3FE3B.6070103@yahoo.com.au>

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

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 #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-06-29 22:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27  4:42 [Suspend2][ 00/13] Miscellaneous patches Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 01/13] [Suspend2] Suspend2 version header Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 02/13] [Suspend2] Boot time hooks Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 03/13] [Suspend2] Add netlink socket numbers Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 04/13] [Suspend2] Follow page routine Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 05/13] [Suspend2] LRU paranoia patch Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 06/13] [Suspend2] Remove __nosave declarations in power.h Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia Nigel Cunningham
2006-06-27  6:11   ` Nick Piggin
2006-06-27  6:34     ` Nigel Cunningham
2006-06-29 16:22       ` Nick Piggin
2006-06-29 22:15         ` Nigel Cunningham [this message]
2006-07-04 10:54         ` Nigel Cunningham
2006-07-04 16:53           ` Nick Piggin
2006-06-27  6:33   ` Paul Jackson
2006-06-27  7:01     ` Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 08/13] [Suspend2] Powerpc support (needed?) Nigel Cunningham
2006-06-27  4:42 ` [Suspend2][ 09/13] [Suspend2] Reset kswapd_max_order after resume Nigel Cunningham
2006-06-27  4:43 ` [Suspend2][ 10/13] [Suspend2] Replace swsusp reboot hook Nigel Cunningham
2006-06-27  4:43 ` [Suspend2][ 11/13] [Suspend2] snprintf_used function Nigel Cunningham
2006-06-27  4:43 ` [Suspend2][ 12/13] [Suspend2] Suspend2 common header Nigel Cunningham
2006-06-27  4:43 ` [Suspend2][ 13/13] [Suspend2] Suspend2 include file Nigel Cunningham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606300815.21724.nigel@suspend2.net \
    --to=nigel@suspend2.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox