From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [swsusp] separate snapshot functionality to separate file
Date: Wed, 5 Oct 2005 02:06:58 +0200 [thread overview]
Message-ID: <20051005000658.GJ18481@elf.ucw.cz> (raw)
In-Reply-To: <200510050047.45697.rjw@sisk.pl>
Hi!
> > Well, same cleanup can be done after the split, just as easily.
> >
> > > 3) some cleanups are due before the splitting (eg. function names, the removal
> > > of prepare_suspend_image() etc.),
> >
> > Split does not prevent you from doing the cleanups.
>
> No, it doesn't, but the flow of changes would be easier to follow if the
> cleanups were made first (ie. cleanup -> smaller and simpler code ->
> split).
I wanted to have a "this changes nothing" patch first. Cleanups in
front would be trickier to do because period of "settle down" is
needed before split. We now had quite a long "settle down" period, so
I've seen opportunity to do the split now.
> > No. It needs to be controlled by storage-handling parts, so that
> > snapshot-handling parts become nice library.
>
> You are right, I have confused the sides. I should have said like that:
> The snapshot-handling part makes some functions available to the
...
> part need not care for what happens to the pages of data send to the
> storage-handling parts as long as it can receive them back in the same
> order in which they have been sent.
Nicely said.
> > That is ugly. snapshot needs to be called from storage handling parts,
> > and then interface can become much simpler:
> >
> > struct pbe *sys_snapshot();
> >
> > snapshots a system, then you can save it in any way you want. And
> >
> > void sys_restore(struct pbe *);
> >
> > . Simple, eh?
>
> Well, aren't there any problems with handling kernel addresses from the user
> space and vice versa?
Nothing we could not handle. Kernel needs to use get_user, while
userspace needs to seek/read/write on /dev/kmem (when accessing "the
other" addresses).
> Anyway, I think on resume we should send data from the user space to the
> kernel and let the kernel arrange them in memory instead of placing them in
> memory directly from the used space. By symmetry, on suspend we should send
> data from the kernel to the user space instead of allowing the users space
> to read memory at will. IMO the arrangement of the data in memory should
> not be visible to the user space at all.
I thought about that -- user/kernel interface would certainly be nicer
-- but I do not think it is feasible without writing a lot of code.
[I agree that assymetry I have in there is ugly, but I don't see a way
to do alloc_pagedir() in userspace, and I'd like to keep page
relocation in userspace.]
> Still I'm afraid in the future we'll be moving some functions between
> snapshot.c and swsusp.c back and forth ...
We may have to move function or two, but I think nothing too dramatic
will happen.
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
next prev parent reply other threads:[~2005-10-05 0:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-02 23:13 [swsusp] separate snapshot functionality to separate file Pavel Machek
2005-10-03 21:39 ` Rafael J. Wysocki
2005-10-03 23:17 ` Pavel Machek
2005-10-04 15:11 ` Rafael J. Wysocki
2005-10-04 20:53 ` Pavel Machek
2005-10-04 22:34 ` Nigel Cunningham
2005-10-05 8:41 ` Pavel Machek
2005-10-05 21:21 ` Lorenzo Colitti
2005-10-05 22:21 ` Nigel Cunningham
2005-10-05 22:44 ` Pavel Machek
2005-10-05 22:54 ` Lorenzo Colitti
2005-10-05 22:57 ` Pavel Machek
2005-10-05 23:00 ` Pavel Machek
2005-10-05 23:18 ` Lorenzo Colitti
2005-10-06 10:10 ` Alon Bar-Lev
2005-10-06 8:20 ` Pavel Machek
2005-10-09 23:41 ` Nigel Cunningham
2005-10-04 22:47 ` Rafael J. Wysocki
2005-10-05 0:06 ` Pavel Machek [this message]
2005-10-05 8:20 ` Rafael J. Wysocki
2005-10-05 8:33 ` Pavel Machek
2005-10-06 8:23 ` Rafael J. Wysocki
2005-10-06 10:42 ` Pavel Machek
2005-10-06 13:29 ` 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=20051005000658.GJ18481@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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.