mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	nigel@nigel.suspend2.net,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org, Pavel Machek <pavel@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pm@lists.linux-foundation.org,
	Vivek Goyal <vgoyal@redhat.com>,
	Jens Axboe <jens.axboe@oracle.com>
Subject: Re: [linux-pm] [PATCH -mm 1/2] kexec jump -v12: kexec jump
Date: Sat, 12 Jul 2008 20:52:42 +0200	[thread overview]
Message-ID: <200807122052.43805.rjw@sisk.pl> (raw)
In-Reply-To: <m1ej5z4v7v.fsf@frodo.ebiederm.org>

On Saturday, 12 of July 2008, Eric W. Biederman wrote:
> Alan Stern <stern@rowland.harvard.edu> writes:
> 
> > On Fri, 11 Jul 2008, Eric W. Biederman wrote:
> >
> >> I just realized with a little care the block layer does have support for this,
> >> or something very close.
> >> 
> >> You setup a software raid mirror with one disk device.    The physical
> >> device can come in and out while the filesystems depend on the real device.
> >
> > Do you mean "the filesystems depend on the logical RAID device"?  
> 
> Oh yes. Thinko.
> 
> > What's to prevent userspace from accessing the physical device 
> > directly?
> 
> Nothing.
> 
> > What this amounts to, in the end, is having a way to distinguish the
> > set of I/O requests coming from the hibernation code (reading or
> > writing the memory image) from the set of all other I/O requests.  The
> > driver or the block layer has to be set up to allow the first set
> > through while blocking the second set.  (And don't forget about the 
> > complications caused by error-recovery I/O during the hibernation 
> > activity!)
> 
> I guess this problem exists but it is not at all the problem I was
> thinking of.
> 
> > Forcing the second set of requests to filter through an extra software 
> > layer is a clumsy way of accomplishing this.  There ought to be a 
> > better approach.
> 
> The point was something different.  The reasons we can not store the
> state of the system with the hardware devices logically hot unplugged
> (and thus reuse all of the find device hotplug methods) is because
> things like the filesystem layer don't know how to cope with their
> block devices going away an coming back.
> 
> That is the problem inserting an virtual software device in the middle
> can solve.  If that works should there be a better way?  Certainly but
> to prove it out starting with a block device wrapper is a trivial way to
> go.

I have discussed that with Jens a bit and it seems we can use a special I/O
scheduler that will separate the image saving I/O from any other I/O, allowing
only the former to reach lower layers.  Since you can switch I/O schedulers on
the fly already, quite a bit of the necessary functionality is in place.

Of course, we also need character device drivers to block user space while
suspended and we need ioctls to be handled correctly at that time etc.

That said, even if devices are accessed while we're saving the image, there
will be no damage as long as those accesses will not result in any data being
actually written to non-volatile storage, such as disks.

Thanks,
Rafael

  reply	other threads:[~2008-07-12 18:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07  3:25 Huang Ying
2008-07-07 12:50 ` Pavel Machek
2008-07-08  9:10   ` Huang Ying
2008-07-08 10:40     ` Pavel Machek
2008-07-09  1:12       ` Huang Ying
2008-07-08 14:50 ` Vivek Goyal
2008-07-09  1:09   ` Huang Ying
2008-07-11 19:21   ` Andrew Morton
2008-07-11 20:11     ` Vivek Goyal
2008-07-12  1:02       ` Nigel Cunningham
2008-07-14  5:46         ` Pavel Machek
2008-07-14 13:32           ` Vivek Goyal
2008-08-04 11:01             ` Pavel Machek
2008-07-14 13:09         ` Vivek Goyal
2008-07-11 20:24     ` Pavel Machek
2008-07-11 20:40       ` Rafael J. Wysocki
2008-07-12  2:23         ` Eric W. Biederman
2008-07-12  3:04           ` [linux-pm] " Alan Stern
2008-07-12  3:50             ` Eric W. Biederman
2008-07-12 18:52               ` Rafael J. Wysocki [this message]
2008-07-12 19:55               ` Alan Stern
2008-07-14 13:30     ` huang ying

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=200807122052.43805.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jens.axboe@oracle.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@suse.cz \
    --cc=stern@rowland.harvard.edu \
    --cc=vgoyal@redhat.com \
    /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®