From: Nigel Cunningham <ncunningham@cyclades.com>
To: Pavel Machek <pavel@suse.cz>
Cc: Greg KH <greg@kroah.com>,
Dumitru Ciobarcianu <Dumitru.Ciobarcianu@iNES.RO>,
Linux-pm mailing list <linux-pm@lists.osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [linux-pm] [RFC] userland swsusp
Date: Thu, 17 Nov 2005 08:53:26 +1100 [thread overview]
Message-ID: <1132177835.25230.129.camel@localhost> (raw)
In-Reply-To: <20051116224728.GI12505@elf.ucw.cz>
Hi.
On Thu, 2005-11-17 at 09:47, Pavel Machek wrote:
> Hi!
>
> > > > I can agree with putting splash screens and userspace stuff in
> > > > userspace. Suspend2 has had that too, since March. But the guts of
> > > > the
> > >
> > > Well, I'd say that having to resort to netlink is ... not quite
> > > nice. You get all the complexity of having userspace running during
> > > suspend, and get very little benefit.
> >
> > Mmm, but less complexity than with trying to do the whole suspend from
> > userspace. (I don't need to export pageflags, bio routines etc or work
> > around it by using /dev/kmem).
>
> Well, userland swsusp has pretty low impact on kernel code -- it adds
> something like 150 lines:
>
> drivers/char/mem.c | 42 +
> include/linux/suspend.h | 23
> kernel/power/console.c | 1
> kernel/power/disk.c | 19
> kernel/power/swsusp.c | 78 +
> usr/swsusp-init | 9
> 8 files changed, 2696 insertions(+), 4 deletions(-)
>
> i don't think you can do much better than that...
>
> > > ...at expense of complexity, and hooks all over the kernel. Yes, if
> > > you modify kernel a bit, nothing will use the page cache.
> >
> > Could you back your "hooks all over the kernel" statement up? I do have
> > some BUG_ON()s aimed at double checking that nothing bad happens, but
> > they never get hit and obviously aren't required to stop processes using
> > the page cache. All that's really required is to freeze processes.
>
> Are you willing to merge the code without BUG_ONs?
Yes.
> > > Anyway, I believe we have solution for that one. See Rafael's recent
> > > patches -- "only free as much memory as neccessary" should do the
> > > trick, without excessive complexity.
> >
> > That's still imposing a 1/2 of memory limit, though.
>
> Yes, hopefully users will not notice.
Users with more memory probably won't care so much, depending on what
apps they want to run and how responsive they want the system to be
post-resume.
> > > Well, I do not want the complexity of two page sets. I think Rafael's
> > > patches will provide almost equivalent functionality. Other than that,
> > > all your features should be doable. I'm not saying I'm going to write
> > > those patches myself, but I'll certainly not reject them just because
> > > they are too big.
> >
> > I'm sorry for making you think that having two pagesets is a complex
> > issues. I know that when I first did it, I put tight restrictions on
> > memory usage while the first pageset was written and used a separate
> > memory pool. Since then, I've realised a far simpler way of handling
> > this, and the code has been greatly simplified. In essence, all you need
> > to do is make your I/O code generic enough that it can be passed a list
> > of pages to write and put page cache pages in a separate list when
> > figuring out what pages need to be saved. Then you save those pages
> > before doing your atomic copy of the other pages, and reload them after
> > restoring the atomic copy at resume time.
>
> Okay, it may have gotten better. Anyway, this is the only part that
> really needs to be in-kernel. Saving 50% of memory is still going to
> produce *way* more responsive system than "save as little as
> possible", and I hope it will be good enough.
I agree about the 'way more responsive system'. Good enough will depend
on the user and which way the wind is blowing at the time. I guess if
that's the only option they have, it's still better than rebooting.
Regards,
Nigel
next prev parent reply other threads:[~2005-11-16 23:06 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 21:29 [RFC] userland swsusp Pavel Machek
2005-11-15 21:32 ` [linux-pm] " Greg KH
2005-11-15 22:03 ` Pavel Machek
2005-11-15 22:25 ` Dave Jones
2005-11-15 23:32 ` Pavel Machek
2005-11-15 23:40 ` Dave Jones
2005-11-16 8:56 ` Pavel Machek
2005-11-16 21:41 ` Rafael J. Wysocki
2005-11-16 4:35 ` Dumitru Ciobarcianu
2005-11-16 6:14 ` Greg KH
2005-11-16 6:00 ` Nigel Cunningham
2005-11-16 16:50 ` Greg KH
2005-11-16 19:57 ` Nigel Cunningham
2005-11-16 21:35 ` Pavel Machek
2005-11-16 21:13 ` Nigel Cunningham
2005-11-16 22:47 ` Pavel Machek
2005-11-16 21:53 ` Nigel Cunningham [this message]
2005-11-23 10:16 ` Lorenzo Colitti
2005-11-23 12:02 ` Pavel Machek
2005-11-19 9:32 ` Rob Landley
2005-11-19 23:51 ` Pavel Machek
2005-11-18 19:36 ` Alan Cox
2005-11-18 21:18 ` Dave Jones
2005-11-18 21:20 ` Greg KH
2005-11-19 23:43 ` Pavel Machek
2005-11-20 21:48 ` Dave Jones
2005-11-20 22:09 ` Pavel Machek
2005-11-21 11:47 ` Rafael J. Wysocki
2005-11-21 14:19 ` Pavel Machek
2005-11-18 21:23 ` Arjan van de Ven
2005-11-18 22:07 ` Alan Cox
2005-11-19 4:18 ` Jesse Barnes
2005-11-19 8:44 ` Arjan van de Ven
2005-11-18 23:34 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2005-11-16 16:10 Gross, Mark
2005-11-16 16:44 ` Greg KH
2005-11-16 20:20 ` Nigel Cunningham
2005-11-16 22:05 ` Pavel Machek
2005-11-16 21:13 ` Nigel Cunningham
2005-11-16 22:41 ` Rafael J. Wysocki
2005-11-16 22:50 ` Pavel Machek
2005-11-17 17:02 ` Olivier Galibert
2005-11-17 19:57 ` Lee Revell
2005-11-17 20:12 ` Olivier Galibert
2005-11-17 20:20 ` Lee Revell
2005-11-17 20:37 ` Dave Jones
2005-11-17 20:46 ` Lee Revell
2005-11-17 20:59 ` Dave Jones
2005-11-17 20:54 ` Lee Revell
2005-11-17 21:01 ` Dave Jones
2005-11-17 21:06 ` Chris Wright
2005-11-17 21:14 ` Lee Revell
2005-11-17 21:18 ` Chris Wright
2005-11-17 21:45 ` Diego Calleja
2005-11-17 21:09 ` Matthew Garrett
2005-11-17 21:16 ` Lee Revell
2005-11-17 20:47 ` Lee Revell
2005-11-16 22:10 ` Greg KH
2005-11-16 21:25 ` Nigel Cunningham
2005-11-17 7:14 ` Arjan van de Ven
2005-11-16 19:10 ` Pavel Machek
2005-11-17 16:54 ` Olivier Galibert
2005-11-17 16:44 ` Greg KH
2005-11-17 17:03 ` Patrick Mochel
2005-11-17 17:31 ` Olivier Galibert
2005-11-17 20:15 ` Jacek Kawa
2005-11-17 21:56 ` Greg KH
2005-11-18 17:41 ` Jacek Kawa
2005-11-18 23:22 ` Pavel Machek
2005-11-17 18:50 Starikovskiy, Alexey Y
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=1132177835.25230.129.camel@localhost \
--to=ncunningham@cyclades.com \
--cc=Dumitru.Ciobarcianu@iNES.RO \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=pavel@suse.cz \
/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