mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@users.sourceforge.net>
To: Pavel Machek <pavel@ucw.cz>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Swsusp mailing list <swsusp-devel@lists.sourceforge.net>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: swsusp problems [was Re: Your opinion on the merge?]
Date: Tue, 23 Mar 2004 08:55:38 +1200	[thread overview]
Message-ID: <1079988938.2779.18.camel@calvin.wpcb.org.au> (raw)
In-Reply-To: <20040321220050.GA14433@elf.ucw.cz>

Hi.

On Mon, 2004-03-22 at 10:00, Pavel Machek wrote:
> Now I have _proof_ that eye-candy is harmfull. What is see on screen is:

No, that's not proof; just a bug in the code. It's not using the right
code to display the error message. I'll fix it asap.

>                                                               N
> umber of free pages a[                              ]h! (285723 != 285754)
>  (Press SPACE to continue)

By thw way, to get this message, you probably removed the memory pool
hooks. I'm getting the picture more and more clearly. I need to write a
series of emails explaining why each part of the changes exists. I'll
try to do that shortly.

> Was it really neccessary to rename IOTHREAD to NOFREEZE? This way you

Not really, but I felt that IOTHREAD wasn't a good description of the
way the flag is used. The name implies that it is intended for threads
used for doing I/O, but it is also used for some threads that aren't I/O
related but cannot/should not be refrigerated.

> +/* Save and restore functions for Software Suspend */
> +extern int *mtrr_suspend(void);
> +extern void mtrr_resume(int *ptr);
> +
>  #endif  /*  _LINUX_MTRR_H  */
> 
> This should be done through driver model.

It is; the latest patch removes these declarations, which I missed
before.

> +       suspend_task = 0;
> +       swsusp_state = 0;
> +       STORAGE_UNSUSPEND
> +
> +       /*
> +        * Pause the other processors so we can safely
> +        * change threads' flags
> +        */
> +
> 
> I'd call this macro abuse. Is it because 2.4 compatibility?

Yes, wholy and solely.

>         if (likely(!(current->state & (TASK_DEAD | TASK_ZOMBIE)))) {
>                 if (unlikely(in_atomic())) {
> -                       printk(KERN_ERR "bad: scheduling while
> atomic!\n");
> -                       dump_stack();
> +                       if (likely(!(software_suspend_state &
> SOFTWARE_SUSPEND_RUNNING))) {
> +                               printk(KERN_ERR "bad: scheduling while
> atomic!\n");
> +                               dump_stack();
> +                       }
>                 }
>         }
> 
> Were you lazy or is there some reason why scheduling while atomic is
> not bad for swsusp2?

I like the way you're forcing me to remember why I've done things the
way I have :>. I'll need to get look at this again and get back to you.
There is a good reason and I did try to avoid doing this. I just don't
remember the logic right now.

> I believe I worked around this one by drain_local_pages(), which is
> much less intrusive.

Again, I'll look at it again and explain why.

> Why do you need this one? It looks intrusive. If its really
> neccessary (or it cleans up code), this one should be sent
> separately.

Before not-long-ago, I had a separate routine that was essentially a
copy of this aimed at freeing a single page. I thought it was better to
properly merge it in. The point is this: Remember that we save the image
in two parts and that the first part saved consists of LRU pages. While
saving that part, we use the generic I/O routines, which will add the
page we've saved into the LRU. We, however, are trying to keep the image
consistent. We therefore don't want the page added to the LRU and thus
seek the remove it immediately. As I mentioned before, a better solution
might well be to stop it being added in the first place. I need to talk
with the mm guys about that.

Thanks for the comments. I really appreciate them.

Nigel

-- 
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.


  parent reply	other threads:[~2004-03-22 21:56 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1079659165.15559.34.camel@calvin.wpcb.org.au>
     [not found] ` <20040318193703.4c02f7f5.akpm@osdl.org>
     [not found]   ` <1079661410.15557.38.camel@calvin.wpcb.org.au>
     [not found]     ` <20040318200513.287ebcf0.akpm@osdl.org>
     [not found]       ` <1079664318.15559.41.camel@calvin.wpcb.org.au>
2004-03-21 22:00         ` Pavel Machek
2004-03-22  0:29           ` Pavel Machek
2004-03-22 20:55           ` Nigel Cunningham [this message]
2004-03-22 23:17             ` Pavel Machek
2004-03-23  9:53               ` [Swsusp-devel] " Jonathan Sambrook
2004-03-23 15:25                 ` Micha Feigin
2004-03-23 21:47                 ` Pavel Machek
2004-03-23 21:08                   ` Nigel Cunningham
2004-03-23 22:17                     ` Pavel Machek
2004-03-23 22:38                       ` Nigel Cunningham
2004-03-23 23:07                     ` Michael Frank
2004-03-23 23:17                       ` Pavel Machek
2004-03-23 22:36                         ` Nigel Cunningham
2004-03-23 23:45                           ` Dumitru Ciobarcianu
2004-03-23 22:52                             ` Nigel Cunningham
2004-03-24  0:05                               ` Joel Jaeggli
2004-03-23 23:10                                 ` Nigel Cunningham
2004-03-23 22:43                   ` Dmitry Torokhov
2004-03-23 23:32                     ` Pavel Machek
2004-03-23 22:40                       ` Nigel Cunningham
2004-03-23 23:44                         ` Pavel Machek
2004-03-24  3:12                           ` Michael Frank
2004-03-24 10:17                             ` Pavel Machek
2004-03-24 22:46                               ` Michael Frank
2004-03-24 23:23                                 ` Pavel Machek
2004-03-24 23:56                                   ` Michael Frank
2004-03-25  0:23                                     ` -nice tree [was Re: [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?]] Pavel Machek
2004-03-25  0:50                                       ` Michael Frank
2004-03-25  1:41                                         ` Pavel Machek
     [not found]                                           ` <200403250857.08920.matthias.wieser@hiasl.net>
2004-03-25 20:39                                             ` Nigel Cunningham
2004-03-25 22:27                                               ` Pavel Machek
2004-03-25 21:38                                                 ` Nigel Cunningham
2004-03-25 22:54                                                   ` Pavel Machek
2004-03-26  5:59                                                     ` Michael Frank
2004-03-26 10:50                                                       ` Pavel Machek
2004-03-26 13:17                                                         ` Michael Frank
2004-03-27 14:49                                                   ` Jamie Lokier
2004-03-29 12:10                                                     ` fast compressed fs (was Re: -nice tree) Pavel Machek
2004-03-26  5:59                                                 ` -nice tree [was Re: [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?]] Michael Frank
2004-03-26 10:22                                                   ` Pavel Machek
2004-03-26 20:30                                                     ` Nigel Cunningham
2004-03-26 22:22                                                       ` Pavel Machek
2004-03-27  2:08                                                         ` Nigel Cunningham
2004-03-27  3:37                                                           ` Luke-Jr
2004-03-27  4:28                                                             ` Micha Feigin
2004-03-27  4:40                                                               ` Luke-Jr
2004-03-27 19:50                                                                 ` Micha Feigin
2004-03-27 20:03                                                                   ` Luke-Jr
2004-03-27 21:01                                                                     ` Paranoia is fun [Was Re: -nice tree [was Re: [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?]]] Michael Frank
2004-03-27 21:40                                                                       ` Luke-Jr
2004-03-27 21:29                                                             ` -nice tree [was Re: [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?]] Pavel Machek
2004-03-28  0:27                                                               ` Micha Feigin
2004-03-27  2:21                                                 ` Micha Feigin
2004-03-29 12:13                                                   ` Pavel Machek
2004-03-24  4:52                       ` [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?] Dmitry Torokhov
2004-03-24  5:04                         ` Nigel Cunningham
2004-03-24  6:22                           ` Michael Frank
2004-03-24  5:46                             ` Nigel Cunningham
2004-03-24  7:31                               ` Michael Frank
2004-03-24 10:26                                 ` Pavel Machek
2004-03-25  0:06                                   ` Jonathan Sambrook
2004-03-24  9:32                             ` Karol Kozimor
2004-03-24 14:15                               ` Michael Frank
2004-03-25  0:35                                 ` Karol Kozimor
2004-03-24  5:06                         ` sleeping in request function mohanlal jangir
     [not found]                           ` <20040324083313.GG3377@suse.de>
2004-03-25  3:45                             ` mohanlal jangir
2004-03-24 10:22                         ` [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?] Pavel Machek
2004-03-24 12:48                           ` Dmitry Torokhov
2004-03-24 15:18                             ` Pavel Machek
2004-03-24 20:22                               ` Jonathan Sambrook
2004-03-24 21:06                                 ` Michael Frank
2004-03-25 22:13                                   ` swsusp is not reliable. Face it. [was Re: [Swsusp-devel] Re: swsusp problems] Pavel Machek
2004-03-25 21:33                                     ` Nigel Cunningham
2004-03-25 22:52                                       ` Pavel Machek
2004-03-26  5:59                                     ` Michael Frank
2004-03-26  9:59                                       ` Pavel Machek
2004-03-26 10:21                                         ` Michael Frank
2004-03-25 22:08                                 ` [Swsusp-devel] Re: swsusp problems [was Re: Your opinion on the merge?] Pavel Machek
2004-03-24 22:05                           ` Markus Gaugusch
2004-03-24 21:25                             ` 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=1079988938.2779.18.camel@calvin.wpcb.org.au \
    --to=ncunningham@users.sourceforge.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=swsusp-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®