From: Pavel Machek <pavel@ucw.cz>
To: fchabaud@free.fr
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] swsusp in 2.4.19-pre8-ac5
Date: Tue, 28 May 2002 23:17:55 +0200 [thread overview]
Message-ID: <20020528211755.GC28189@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20020528195546.GC189@elf.ucw.cz> <200205282109.g4SL9on02339@colombe.home.perso>
Hi!
> >
> > INTERESTING(p);
> > if (p->flags & PF_FROZEN)
> > continue;
> > -
> > + if (p->state == TASK_STOPPED) { /* this task is a stopped but not frozen one */
> > + p->flags |= PF_IOTHREAD;
> > + _printk("+");
> > + continue;
> > + }
> > /* FIXME: smp problem here: we may not access other process' flags
> > without locking */
> > p->flags |= PF_FREEZE;
> >
> > Are you sure this is correct? What if someone wakes it just after you
> > given it PF_IOTHREAD?
>
> Good point. I need to be more precise.
Yup.
> >
> > What's the point of all those PRINTS -> __prints changes? I do not
> > like additional abstractions on the top of printk(). Are they really
> > neccessary?
>
> Actually I tried to make the process prettier using a dedicated console.
> The PRINT are for debugging, _print for the dedicated console (can be
> deactivated using SUSPEND_CONSOLE) and __print are always written
> (errors messages). The PRINTS PRINTR macros were used to separate
> suspend and resume machine. It's not necessary but isn't that nicer when
> you suspend ?
Are not "Suspend : " and "Resume : " superfluous if you have dedicated
console, anyway?
Why don't you use generic printk() for messages that are printed, always?
> > @@ -1207,11 +1263,12 @@
> > pagedir_order = get_bitmask_order(nr_pgdir_pages);
> >
> > error = -ENOMEM;
> > + free_page((unsigned long)cur);
> > pagedir_nosave = (suspend_pagedir_t *)__get_free_pages(GFP_ATOMIC, pagedir_order);
> > if(!pagedir_nosave)
> > goto resume_read_error;
> >
> > - PRINTR( "%sReading pagedir, ", name_resume );
> > + PRINTR( "Reading pagedir\n" );
> >
> > /* We get pages in reverse order of saving! */
> > error=-EIO;
> >
> > Why freeing it? This system is going to be overwritten, anyway.
>
> I don't like the idea not to free the page as soon as we don't need it
> any more. Maybe we'll have an error later and try to recover a normal
> boot in a future version.
Okay, applied.
> What about the CONFIG_SMP restriction ? Is it still pertinent ?
Yes, I'm afraid. If someone wants to donate me SMP pentium, I might
try to debug that ;-).
Pavel
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
next prev parent reply other threads:[~2002-05-28 21:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-25 23:01 fchabaud
2002-05-28 19:55 ` Pavel Machek
2002-05-28 21:09 ` fchabaud
2002-05-28 21:17 ` Pavel Machek [this message]
2002-05-30 20:24 ` fchabaud
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=20020528211755.GC28189@atrey.karlin.mff.cuni.cz \
--to=pavel@ucw.cz \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=fchabaud@free.fr \
--cc=linux-kernel@vger.kernel.org \
/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®