All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <nigel@suspend2.net>
Cc: Linux PM <linux-pm@osdl.org>
Subject: Re: [RFC][PATCH -mm][Experimental] swsusp: freeze userspace processes first
Date: Wed, 1 Feb 2006 13:49:50 +0100	[thread overview]
Message-ID: <20060201124950.GA2137@elf.ucw.cz> (raw)
In-Reply-To: <200602012225.01695.nigel@suspend2.net>

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

Hi!

> > > This is an experimantal patch aimed at the "unable to freeze processes
> > > under load" problem.
> > >
> > > On my box the 2.6.16-rc1-mm4 kernel with this patch applied survives the
> > > "dd if=/dev/hda of=/dev/null" test.
> > >
> > > Please have a look.
> >
> > It makes it better (well, I used my own, simpler variant, but that
> > should not matter; patch is attached). I now can't reproduce hangs
> > with simple stress testing, but running kernel make alongside that
> > makes it hang sometimes. Example of non-frozen gcc:
> >
> > gcc           D EEE06A70     0  1750   1749  1751
> > (NOTLB)
> > df85df38 00000046 bf878130 eee06a70 00004111 eee06a70 eee06a70
> > 003d0900
> >        00000000 c0137cf5 df85c000 00000000 c058ada2 c012503e ef2c915c
> > ef2c9030
> >        c1c0b480 7c3b8500 003d0927 df85c000 00000a98 7c3b8500 003d0927
> > c0770800
> > Call Trace:
> >  [<c0137cf5>] attach_pid+0x25/0xb0
> >  [<c058ada2>] _write_unlock_irq+0x12/0x30
> >  [<c012503e>] copy_process+0xe5e/0x11b0
> >  [<c0588f74>] wait_for_completion+0x94/0xd0
> >  [<c0121690>] default_wake_function+0x0/0x10
> >  [<c01254d9>] do_fork+0x149/0x210
> >  [<c0101218>] sys_vfork+0x28/0x30
> >  [<c0103231>] syscall_call+0x7/0xb
> >
> > ...maybe solving this would solve journalling problems, too? It is
> > similar AFAICT.
> 
> What exactly is the journalling problem?

Hangs by freezing everything at same time only happen with journalling
filesystems; there kjournald needs to be running if we want user
threads to be stoppable.

> > @@ -87,7 +87,6 @@ static int prepare_processes(void)
> >  	int error;
> >
> >  	pm_prepare_console();
> > -	sys_sync();
> >  	disable_nonboot_cpus();
> >
> >  	if (freeze_processes()) {
> 
> That will help speed up freezing, but it won't help the integrity of your data 
> if you don't resume.

See the patch better; it is now done between freezing userspace and
kernel threads.

> >  /*
> >   * Timeout for stopping processes
> >   */
> > -#define TIMEOUT	(6 * HZ)
> > +#define TIMEOUT	(60 * HZ)
> 
> You're kidding, right?

sync takes long time... and 6 seconds were not enough to deliver
signals on highly-loaded ext2.
							Pavel

-- 
Thanks, Sharp!

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2006-02-01 12:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-01  0:41 [RFC][PATCH -mm][Experimental] swsusp: freeze userspace processes first Rafael J. Wysocki
2006-02-01 10:55 ` Pavel Machek
2006-02-01 11:18   ` Nigel Cunningham
2006-02-01 20:13   ` Rafael J. Wysocki
2006-02-01 11:47 ` Pavel Machek
2006-02-01 12:24   ` Nigel Cunningham
2006-02-01 12:49     ` Pavel Machek [this message]
2006-02-01 21:41       ` Nigel Cunningham
2006-02-01 23:57       ` Rafael J. Wysocki
2006-02-02 13:55         ` Rafael J. Wysocki
2006-02-02 15:08           ` Pavel Machek
2006-02-02 18:32             ` Rafael J. Wysocki
2006-02-04 21:26               ` Pavel Machek
2006-02-04 21:47                 ` Rafael J. Wysocki
2006-02-01 22:19   ` Rafael J. Wysocki

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=20060201124950.GA2137@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-pm@osdl.org \
    --cc=nigel@suspend2.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.