...making Linux just a little more fun!
[ In reference to "Booting Linux in Less Than 40 Seconds" in LG#147 ]
MNZ [mnzaki at gmail.com]
Hi TAG, I really enjoyed this article, just what I need! But there's only one problem, the DMA on the hard-disk. I've always used a very similar approach to the one mentioned in the article to set DMA on on my disks, the problem is INIT doesn't actually start when waking up from hibernation and so DMA is not set which makes reading the image (and booting, therefore) a very painfully long process. Any ideas on other ways to set DMA that don't involve INIT?
-- //MNZ\\
Ben Okopnik [ben at linuxgazette.net]
On Sun, Feb 03, 2008 at 08:24:31PM +0200, MNZ wrote:
> Hi TAG, > I really enjoyed this article, just what I need! But there's only one > problem, the DMA on the hard-disk. I've always used a very > similar approach to the one mentioned in the article to set DMA > on on my disks, the problem is INIT doesn't actually start when > waking up from hibernation and so DMA is not set which makes > reading the image (and booting, therefore) a very painfully long > process. Any ideas on other ways to set DMA that don't involve > INIT?
It's been quite a while since I've fiddled with hibernation, etc., but if I recall correctly, there's some kind of a script directory - /etc/apm/resume.d, maybe? - that allows you to put in scripts to be run at wakeup time. That should work.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
MNZ [mnzaki at gmail.com]
On Feb 4, 2008 4:23 AM, Ben Okopnik <ben@linuxgazette.net> wrote:
> It's been quite a while since I've fiddled with hibernation, etc., but > if I recall correctly, there's some kind of a script directory - > /etc/apm/resume.d, maybe? - that allows you to put in scripts to be run > at wakeup time. That should work.
I've gone through a bit of documentation and found an option to be passed in the script to run commands on resume, but that doesn't help as these are run AFTER wake up which means no DMA while loading the image from disk. The solution is on the kernel level as it has to be done before anything else is loaded. So I fiddled around the kernel config and found an option under "Device Drivers --> DMA Engine support" to automatically set DMA. Then you could pass "hda=autotune" as a kernel parameter to get the disks tuned to maximum performance.
Without this I was getting 3-4 minute boots which is worse than the normal (ie, no hibernation) now I get 30 second boots
-- //MNZ\\
Kapil Hari Paranjape [kapil at imsc.res.in]
Hello,
This article suggests re-compiling the kernel in order to enable a feature that is "on-by-default" in most distribution kernels!
The stock kernel version of suspend is sometimes called "suspend1" whereas the one the author talks about is suspend2. There may be hardware out there for which the latter works better than the former but of late I have seen fewer and fewer systems of this type.
Now there is nothing wrong with compiling the kernel for fun, learning and profit. I just hope people aren't doing it because they think it is necessary
Regards,
Kapil. --
Amit Kumar Saha [amitsaha.in at gmail.com]
On 2/4/08, Kapil Hari Paranjape <kapil@imsc.res.in> wrote:
> Hello, > > This article suggests re-compiling the kernel in order to enable > a feature that is "on-by-default" in most distribution kernels!
+1
I use it happily on Ubuntu 7.04.
Regards, Amit
-- Amit Kumar Saha *NetBeans Community Docs Coordinator* Writer, Programmer, Researcher http://amitsaha.in.googlepages.com http://amitksaha.blogspot.com
MNZ [mnzaki at gmail.com]
On Feb 4, 2008 6:11 AM, Kapil Hari Paranjape <kapil@imsc.res.in> wrote:
> Hello, > > This article suggests re-compiling the kernel in order to enable > a feature that is "on-by-default" in most distribution kernels! > > The stock kernel version of suspend is sometimes called "suspend1" > whereas the one the author talks about is suspend2. There may be > hardware out there for which the latter works better than the former > but of late I have seen fewer and fewer systems of this type.
There's a comparison between the stock kernel's version and suspend2 at http://www.tuxonice.net/features
There seem to be a few extra features, but that's all. I didn't actually know that there was a "suspend1" compiled in by default. What's done is done ;-)
> Now there is nothing wrong with compiling the kernel for fun, learning > and profit. I just hope people aren't doing it because they think it > is necessary
Exactly! What better thing to do than compile a kernel early in the morning right before breakfast? It works up my appetite.
-- //MNZ\\