On Friday, 1 of August 2008, Matt Helsley wrote:> > 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@xxxxxxxxxx> a +AOk-crit :> > > > > --- a/kernel/Makefile> > > +-+-+- b/kernel/Makefile> > > @@ -5,7 +-5,7 @@> > > obj-y = sched.o fork.o exec_domain.o panic.o printk.o +AFw> > > cpu.o exit.o itimer.o time.o softirq.o resource.o +AFw> > > sysctl.o capability.o ptrace.o timer.o user.o +AFw> > > - signal.o sys.o kmod.o workqueue.o pid.o +AFw> > > +- signal.o sys.o kmod.o workqueue.o pid.o freezer.o +AFw> > > > 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@xxxxxxxxxx> Can you please also make the contents of include/linux/freezer.h depend onCONFIG_FREEZER instead of CONFIG_PM_SLEEP? Also, I'm not really sure if kernel/power/Kconfig is the right place to defineCONFIG_FREEZER. Perhaps we should even move freezer.c from kernel/power to kerneland define CONFIG_FREEZER in Kconfig in there. Andrew, what do you think? > ---> 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 +AFw> cpu.o exit.o itimer.o time.o softirq.o resource.o +AFw> sysctl.o capability.o ptrace.o timer.o user.o +AFw> - signal.o sys.o kmod.o workqueue.o pid.o freezer.o +AFw> +- signal.o sys.o kmod.o workqueue.o pid.o +AFw> rcupdate.o extable.o params.o posix-timers.o +AFw> kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o +AFw> hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o +AFw> @@ -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> > > > > ` #: #' # # Xͼn} F08@E@1 Z #A #/ # # %r -o K7=D4! W #D #2 # # vp}!q 6s 9~ \:?% z S #D #3 # # vxms 7v Fv G g;{ { r P #D #3 # # ormua Dx Z P ks } t l M #D #3 # # .vxiowr U f T t p l h d ` Z V R M ? #D #3 # # mojpz a m mLzw #J #H #> #. # # Sνuxhjr k ~ imOzt #? #3 #$ # # jnfk u + x z zjWl #& # # # txhhnx!/8xh #' # # # *ѵì˷g]| i h q {$4@P?- ` #0 # # # #q\S؝uv1 i j r } Q$2F@1 Z #< #* # # #Q;0dq\SӼim 0 k m t } 4 Q!4G4! W #C #1 # # V@5ȣtu+$&V 2 m p x | ; 5 Z8P% z S #D #3 # # w_YԿlo"J 3 p q w } ; = = eT{ { r P #D #3 # # T?5rr,%'V"E 5 q r w z ~Q = L V l x s o k f b [ Z V R @ #D #3 # # s[Uҿ;kmOB 3 t u w z ~ f L Y a z r t } p' #K #I #G #> #. # # R=4˼ʻpo!kW1;Sa 4c u u u | r [ b i p v } ol #I #C #; #0 #" # # pZRκȹhij]K-9S[6^ s w | -~ b l r x { qQ #- # # # # M:1~ʻŶĴnmvi[I?%/CV7Z w }6M m r w ~ q #* # # # # jLDɶÿĿ¾efmc T C:<"1U9W } :[vxh #! # # # P71gb]ó̼̽ljvi\ J<56=!O<V @bP?- ` #0 # # # fHA®ȸȸȹ~cemd T C83 36="N@YHl@1 Z #< #) # # 8-':pQJô{WSwi\ J<4 2 1 125;#H^Cl4! W #B #0 # # _D=yw{XUmd U C82 / + &! %*Rca% z S #D #3 # # lNFyUQ!{i]J;/ ( # ".Xb{ { r P #D #3 # # W>7~vuwXU{XUmcR <+ # # # #1]ap } t l M #D #3 # # hJCݤwTO#xeU>' # # # # # # #<j t p l h d ` Z V R M H #D #3 # # I4/W~]Xll]T>% # # # # # # # # # # # #) #7 #@ #D #D #D #D #D #D #D #D #= #. # # lUO7-.PE;% # # # # # # # # # # # # # #$ #. #2 #3 #3 #3 #3 #3 #3 #3 #. #" # # #"#$ +!&! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # {.n++%ݶw{.n+{y^wܨ}Ơz&j:+vw2ޙ&)ߡazzޗ+ݢjwf