lkml.org 
[lkml]   [2008]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 2/6] Container Freezer: Make refrigerator always available
From
Date

On Fri, 2008-08-01 at 16:27 +0200, Thomas Petazzoni wrote:
> Hi,
>
> Le Thu, 31 Jul 2008 22:07:01 -0700,
> Matt Helsley <matthltc@us.ibm.com> a écrit :
>
> > --- a/kernel/Makefile
> > +++ b/kernel/Makefile
> > @@ -5,7 +5,7 @@
> > obj-y = sched.o fork.o exec_domain.o panic.o printk.o \
> > cpu.o exit.o itimer.o time.o softirq.o resource.o \
> > sysctl.o capability.o ptrace.o timer.o user.o \
> > - signal.o sys.o kmod.o workqueue.o pid.o \
> > + signal.o sys.o kmod.o workqueue.o pid.o freezer.o \
>
> I have the impression that the code in kernel/power/process.c was
> compiled only if CONFIG_PM_SLEEP was set. Now that the code has been
> moved to kernel/freezer.c, it is unconditionnaly compiled in every
> kernel. Is that correct ?
>
> If so, is it possible to put this new feature under some
> CONFIG_SOMETHING option, for people who care about the kernel size ?

How about making it depend on a combination of CONFIG variables?
Here's an RFC PATCH. Completely untested.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
---
kernel/Makefile | 3 ++-
kernel/power/Kconfig | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6.27-rc1-mm1/kernel/Makefile
===================================================================
--- linux-2.6.27-rc1-mm1.orig/kernel/Makefile
+++ linux-2.6.27-rc1-mm1/kernel/Makefile
@@ -5,7 +5,7 @@
obj-y = sched.o fork.o exec_domain.o panic.o printk.o \
cpu.o exit.o itimer.o time.o softirq.o resource.o \
sysctl.o capability.o ptrace.o timer.o user.o \
- signal.o sys.o kmod.o workqueue.o pid.o freezer.o \
+ signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
@@ -24,6 +24,7 @@ CFLAGS_REMOVE_sched_clock.o = -pg
CFLAGS_REMOVE_sched.o = -mno-spe -pg
endif

+obj-$(CONFIG_FREEZER) += freezer.o
obj-$(CONFIG_PROFILING) += profile.o
obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
Index: linux-2.6.27-rc1-mm1/kernel/power/Kconfig
===================================================================
--- linux-2.6.27-rc1-mm1.orig/kernel/power/Kconfig
+++ linux-2.6.27-rc1-mm1/kernel/power/Kconfig
@@ -85,6 +85,9 @@ config PM_SLEEP
depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
default y

+config FREEZER
+ def_bool PM_SLEEP || CGROUP_FREEZER
+
config SUSPEND
bool "Suspend to RAM and standby"
depends on PM && ARCH_SUSPEND_POSSIBLE




\
 
 \ /
  Last update: 2008-08-01 21:11    [W:0.230 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site