All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Alan Stern <stern@rowland.harvard.edu>
Cc: nigel@nigel.suspend2.net,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Pavel Machek <pavel@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pm@lists.linux-foundation.org,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [linux-pm] [PATCH -mm 1/2] kexec jump -v12: kexec jump
Date: Fri, 11 Jul 2008 20:50:12 -0700	[thread overview]
Message-ID: <m1ej5z4v7v.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0807112255450.9023-100000@netrider.rowland.org> (Alan Stern's message of "Fri, 11 Jul 2008 23:04:57 -0400 (EDT)")

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.

Eric

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman)
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, <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>
Subject: Re: [linux-pm] [PATCH -mm 1/2] kexec jump -v12: kexec jump
Date: Fri, 11 Jul 2008 20:50:12 -0700	[thread overview]
Message-ID: <m1ej5z4v7v.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0807112255450.9023-100000@netrider.rowland.org> (Alan Stern's message of "Fri, 11 Jul 2008 23:04:57 -0400 (EDT)")

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.

Eric

  parent reply	other threads:[~2008-07-12  3:52 UTC|newest]

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

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=m1ej5z4v7v.fsf@frodo.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --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=rjw@sisk.pl \
    --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 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.