public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Samwel <bart@samwel.tk>
To: Micha Feigin <michf@post.tau.ac.il>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] reiserfs support for laptop_mode
Date: Wed, 21 Jan 2004 20:34:00 +0100	[thread overview]
Message-ID: <400ED428.20301@samwel.tk> (raw)
In-Reply-To: <20040121182846.GB29494@luna.mooo.com>

Micha Feigin wrote:
> On Mon, Jan 19, 2004 at 01:37:59PM +0300, Nikita Danilov wrote:
> 
>>Micha Feigin writes:
>> > I've been using this since 2.4.22 and since laptop_mode is in the
>> > kernel since 2.4.23-pre<something> and I haven't seen that anyone else
>> > has implemented this so I decided to post it on the list in case anyone
>> > is interested.
>> > It a patch to modify the journal flush time of reiserfs to support
>> > laptop_mode (same functionality as ext3 has already).
>> > The times are taken from bdflush.
>>
>>Support for reiserfs laptop mode is in 2.6 now. It is done by adding new
>>mount option "commit=N" that sets commit interval in seconds.
>>
> 
> 
> First of all its nice to know that laptop mode has finally made it
> into 2.6. On the other hand setting commit=N on mount is not a good
> solution since you want different flush times for when laptop mode is
> activated and when it is disabled.
> When laptop mode is disabled the default of 5 seconds is good since the
> disk is always spinning. When laptop mode is enabled you want to change
> the journal flush time to the linux buffer flush time so that the
> journal won't keep waking up the disk. Its a bigger risk of loosing the
> data so you don't want the longer journal flush time when laptop mode
> isn't activated.
> 
> 
>>It doesn't look right to just plainly set reiserfs commit interval to be
>>the same as the ext3 commit interval.
> 
> 
> I am not setting it to the same value as ext3. When laptop mode isn't
> activated it is set to the default value used by reiserfs if bdflush
> isn't modified (it does give you the ability to play with the flush
> interval if you want even when reiserfs isn't activated).
> If laptop mode is activated the flush time is set to the linux buffer
> flush time so that the journal won't wake up the disk.

A couple of comments:

* You might want to take a look at Hugang's patch to support laptop mode 
on reiserfs in 2.6. This patch was posted somewhere last month. It adds 
a "commit=" option to reiserfs, so that you can change this externally 
by remounting. I think this solution is a lot cleaner than to have 
reiserfs code directly depend on laptop mode.

* If you decide to port that patch, you might want to look at the 
documentation for laptop mode in 2.6. The control script that's in there 
works for both 2.4 and 2.6, and it automatically remounts your ext3 and 
reiserfs filesystems with the appropriate commit options (and remounts 
them without the commit options when laptop mode is stopped). (There is 
also some ACPI event binding code in the documentation, which 
automatically enables laptop_mode when using battery power and disables 
it when your laptop is plugged in. I don't know if that works with 2.4 
though.)

-- Bart

  reply	other threads:[~2004-01-21 19:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-17  6:13 [patch] reiserfs support for laptop_mode Micha Feigin
2004-01-19 10:37 ` Nikita Danilov
2004-01-21 18:28   ` Micha Feigin
2004-01-21 19:34     ` Bart Samwel [this message]
2004-01-22  9:50       ` Nikita Danilov

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=400ED428.20301@samwel.tk \
    --to=bart@samwel.tk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michf@post.tau.ac.il \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox