Shriram Rajagopalan
2011-Feb-23 07:27 UTC
[Xen-devel] [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, if this option is enabled. Remove XEN_SAVE_RESTORE dependancy from PM_SLEEP. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> --- arch/x86/xen/Kconfig | 6 ++++-- kernel/power/Kconfig | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 5b54892..ab6c3a2 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@ -37,8 +37,10 @@ config XEN_MAX_DOMAIN_MEMORY portions of which are freed. config XEN_SAVE_RESTORE - bool - depends on XEN && PM + bool "Enable Xen Guest save/restore/checkpoint" + depends on XEN + select SWAP + select HIBERNATION default y config XEN_DEBUG_FS diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 2657299..ccff0ba 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -92,7 +92,7 @@ config PM_SLEEP_SMP config PM_SLEEP bool - depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE + depends on SUSPEND || HIBERNATION default y config PM_SLEEP_ADVANCED_DEBUG -- 1.7.0.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Feb-23 09:08 UTC
[Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote:> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, > if this option is enabled.I was under the (perhaps mistaken?) impression that selecting user visible Kconfig symbols was verboten since it has side-effects which make it hard for users to figure out why something cannot be switched off and/or how to turn things on etc. In any case I think I preferred the "depends HIBERNATION" idea -- I thought that was the consensus of the thread too?> Remove XEN_SAVE_RESTORE dependancy from PM_SLEEP."dependency" Ian.> > Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> > --- > arch/x86/xen/Kconfig | 6 ++++-- > kernel/power/Kconfig | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig > index 5b54892..ab6c3a2 100644 > --- a/arch/x86/xen/Kconfig > +++ b/arch/x86/xen/Kconfig > @@ -37,8 +37,10 @@ config XEN_MAX_DOMAIN_MEMORY > portions of which are freed. > > config XEN_SAVE_RESTORE > - bool > - depends on XEN && PM > + bool "Enable Xen Guest save/restore/checkpoint" > + depends on XEN > + select SWAP > + select HIBERNATION > default y > > config XEN_DEBUG_FS > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig > index 2657299..ccff0ba 100644 > --- a/kernel/power/Kconfig > +++ b/kernel/power/Kconfig > @@ -92,7 +92,7 @@ config PM_SLEEP_SMP > > config PM_SLEEP > bool > - depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE > + depends on SUSPEND || HIBERNATION > default y > > config PM_SLEEP_ADVANCED_DEBUG_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rafael J. Wysocki
2011-Feb-23 09:41 UTC
[Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Wednesday, February 23, 2011, Shriram Rajagopalan wrote:> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, > if this option is enabled. > Remove XEN_SAVE_RESTORE dependancy from PM_SLEEP. > > Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>Please rebase on top of suspend-2.6/linux-next (git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6.git).> --- > arch/x86/xen/Kconfig | 6 ++++-- > kernel/power/Kconfig | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig > index 5b54892..ab6c3a2 100644 > --- a/arch/x86/xen/Kconfig > +++ b/arch/x86/xen/Kconfig > @@ -37,8 +37,10 @@ config XEN_MAX_DOMAIN_MEMORY > portions of which are freed. > > config XEN_SAVE_RESTORE > - bool > - depends on XEN && PMThis line is being modified in linux-next already.> + bool "Enable Xen Guest save/restore/checkpoint" > + depends on XEN > + select SWAP > + select HIBERNATION > default y > > config XEN_DEBUG_FS > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig > index 2657299..ccff0ba 100644 > --- a/kernel/power/Kconfig > +++ b/kernel/power/Kconfig > @@ -92,7 +92,7 @@ config PM_SLEEP_SMP > > config PM_SLEEP > bool > - depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE > + depends on SUSPEND || HIBERNATION > default y > > config PM_SLEEP_ADVANCED_DEBUGThanks, Rafael _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rafael J. Wysocki
2011-Feb-23 09:48 UTC
[Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Wednesday, February 23, 2011, Ian Campbell wrote:> On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote: > > Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, > > if this option is enabled. > > I was under the (perhaps mistaken?) impression that selecting user > visible Kconfig symbols was verboten since it has side-effects which > make it hard for users to figure out why something cannot be switched > off and/or how to turn things on etc. > > In any case I think I preferred the "depends HIBERNATION" idea -- I > thought that was the consensus of the thread too?Yes, I''d prefer that too. Thanks, Rafael _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Feb-23 10:58 UTC
[Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
>>> On 23.02.11 at 10:08, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: > On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote: >> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, >> if this option is enabled. > > I was under the (perhaps mistaken?) impression that selecting user > visible Kconfig symbols was verboten since it has side-effects which > make it hard for users to figure out why something cannot be switched > off and/or how to turn things on etc. > > In any case I think I preferred the "depends HIBERNATION" idea -- I > thought that was the consensus of the thread too?Why HIBERNATION (and SWAP) instead of SUSPEND? Xen doesn''t support the former (other than the latter)... Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Feb-23 11:10 UTC
Re: [Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Wed, 2011-02-23 at 10:58 +0000, Jan Beulich wrote:> >>> On 23.02.11 at 10:08, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: > > On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote: > >> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, > >> if this option is enabled. > > > > I was under the (perhaps mistaken?) impression that selecting user > > visible Kconfig symbols was verboten since it has side-effects which > > make it hard for users to figure out why something cannot be switched > > off and/or how to turn things on etc. > > > > In any case I think I preferred the "depends HIBERNATION" idea -- I > > thought that was the consensus of the thread too? > > Why HIBERNATION (and SWAP) instead of SUSPEND? Xen doesn''t > support the former (other than the latter)...HIBERNATION provides the FREEZE, THAW and RESUME methods which we would like to use to integrate save/restore/checkpoint with the PM core i.e. choose THAW vs. RESUME based on whether the suspend was cancelled (aka a checkpoint) or not. See Shriram''s other recent patch for details. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shriram Rajagopalan
2011-Feb-23 16:23 UTC
[Xen-devel] [PATCH v2] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
Make XEN_SAVE_RESTORE depend on HIBERNATION. Remove XEN_SAVE_RESTORE dependency from PM_SLEEP. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> --- arch/x86/xen/Kconfig | 2 +- kernel/power/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 2c876ed..0e68597 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@ -38,7 +38,7 @@ config XEN_MAX_DOMAIN_MEMORY config XEN_SAVE_RESTORE bool - depends on XEN + depends on XEN && HIBERNATION default y config XEN_DEBUG_FS diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 4603f08..74fe864 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -85,7 +85,7 @@ config PM_STD_PARTITION config PM_SLEEP def_bool y - depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE + depends on SUSPEND || HIBERNATION config PM_SLEEP_SMP def_bool y -- 1.7.0.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rafael J. Wysocki
2011-Feb-23 19:51 UTC
[Xen-devel] Re: [PATCH v2] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Wednesday, February 23, 2011, Shriram Rajagopalan wrote:> Make XEN_SAVE_RESTORE depend on HIBERNATION. > Remove XEN_SAVE_RESTORE dependency from PM_SLEEP. > > Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>Acked-by: Rafael J. Wysocki <rjw@sisk.pl>> --- > arch/x86/xen/Kconfig | 2 +- > kernel/power/Kconfig | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig > index 2c876ed..0e68597 100644 > --- a/arch/x86/xen/Kconfig > +++ b/arch/x86/xen/Kconfig > @@ -38,7 +38,7 @@ config XEN_MAX_DOMAIN_MEMORY > > config XEN_SAVE_RESTORE > bool > - depends on XEN > + depends on XEN && HIBERNATION > default y > > config XEN_DEBUG_FS > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig > index 4603f08..74fe864 100644 > --- a/kernel/power/Kconfig > +++ b/kernel/power/Kconfig > @@ -85,7 +85,7 @@ config PM_STD_PARTITION > > config PM_SLEEP > def_bool y > - depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE > + depends on SUSPEND || HIBERNATION > > config PM_SLEEP_SMP > def_bool y >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Feb-25 08:49 UTC
Re: [Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
>>> On 23.02.11 at 12:10, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: > On Wed, 2011-02-23 at 10:58 +0000, Jan Beulich wrote: >> >>> On 23.02.11 at 10:08, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: >> > On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote: >> >> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, >> >> if this option is enabled. >> > >> > I was under the (perhaps mistaken?) impression that selecting user >> > visible Kconfig symbols was verboten since it has side-effects which >> > make it hard for users to figure out why something cannot be switched >> > off and/or how to turn things on etc. >> > >> > In any case I think I preferred the "depends HIBERNATION" idea -- I >> > thought that was the consensus of the thread too? >> >> Why HIBERNATION (and SWAP) instead of SUSPEND? Xen doesn''t >> support the former (other than the latter)... > > HIBERNATION provides the FREEZE, THAW and RESUME methods which we would > like to use to integrate save/restore/checkpoint with the PM core i.e. > choose THAW vs. RESUME based on whether the suspend was cancelled (aka a > checkpoint) or not. See Shriram''s other recent patch for details.But imo it''s nevertheless wrong to select HIBERNATION (and bogus to select SWAP), as that''ll create to user space the impression that the kernel is capable of doing hibernation, which is wrong. If you need the particular PM operations but no hibernation, then an intermediary option will need to be introduced. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rafael J. Wysocki
2011-Feb-25 18:19 UTC
Re: [Xen-devel] Re: [PATCH] xen: fix XEN_SAVE_RESTORE Kconfig dependencies
On Friday, February 25, 2011, Jan Beulich wrote:> >>> On 23.02.11 at 12:10, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: > > On Wed, 2011-02-23 at 10:58 +0000, Jan Beulich wrote: > >> >>> On 23.02.11 at 10:08, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote: > >> > On Wed, 2011-02-23 at 07:27 +0000, Shriram Rajagopalan wrote: > >> >> Make XEN_SAVE_RESTORE user visible and enable HIBERNATION and SWAP, > >> >> if this option is enabled. > >> > > >> > I was under the (perhaps mistaken?) impression that selecting user > >> > visible Kconfig symbols was verboten since it has side-effects which > >> > make it hard for users to figure out why something cannot be switched > >> > off and/or how to turn things on etc. > >> > > >> > In any case I think I preferred the "depends HIBERNATION" idea -- I > >> > thought that was the consensus of the thread too? > >> > >> Why HIBERNATION (and SWAP) instead of SUSPEND? Xen doesn''t > >> support the former (other than the latter)... > > > > HIBERNATION provides the FREEZE, THAW and RESUME methods which we would > > like to use to integrate save/restore/checkpoint with the PM core i.e. > > choose THAW vs. RESUME based on whether the suspend was cancelled (aka a > > checkpoint) or not. See Shriram''s other recent patch for details. > > But imo it''s nevertheless wrong to select HIBERNATION (and bogus > to select SWAP), as that''ll create to user space the impression that > the kernel is capable of doing hibernation, which is wrong. If you > need the particular PM operations but no hibernation, then an > intermediary option will need to be introduced.I think we can introduce CONFIG_HIBERNATE_INTERFACE that will be user-visible option instead of CONFIG_HIBERNATION and will select the latter. Then, CONFIG_XEN_SAVE_RESTORE will also be able to select CONFIG_HIBERNATION without building the hibernate interface in, which will prevent user space from being confused, but that will cause too much code to be built anyway. Thanks, Rafael _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel