All of lore.kernel.org
 help / color / mirror / Atom feed
From: Micha Feigin <michf@post.tau.ac.il>
To: linux-kernel@vger.kernel.org
Cc: Micha Feigin <michf@post.tau.ac.il>
Subject: Re: laptop mode in 2.4.24
Date: Tue, 24 Feb 2004 03:46:49 +0200	[thread overview]
Message-ID: <20040224014649.GC14051@luna.mooo.com> (raw)
In-Reply-To: <20040221182921.GF1162@laptop.localdomain.>

On Sat, Feb 21, 2004 at 01:29:21PM -0500, Eric Hustvedt wrote:
> On Sat, 21 Feb 2004, Micha Feigin wrote:
> 
> > The problem with this patch is that it overrides the built in commit
> > option that existed before the laptop mode patch was introduced.
> > 
> > > diff -ruN linux-2.4.24.orig/fs/jbd/transaction.c linux-2.4.24/fs/jbd/transaction.c
> > > --- linux-2.4.24.orig/fs/jbd/transaction.c	Fri Nov 28 10:26:21 2003
> > > +++ linux-2.4.24/fs/jbd/transaction.c	Mon Jan 12 12:01:54 2004
> > > @@ -56,7 +56,11 @@
> > >  	transaction->t_journal = journal;
> > >  	transaction->t_state = T_RUNNING;
> > >  	transaction->t_tid = journal->j_transaction_sequence++;
> > > -	transaction->t_expires = jiffies + journal->j_commit_interval;
> > > +	/*
> > > +	 * have to do it here, otherwise changed age_buffers since boot
> > > +	 * wont have any effect
> > > +	 */
> > > +	transaction->t_expires = jiffies + get_buffer_flushtime();
> > >  	INIT_LIST_HEAD(&transaction->t_jcb);
> > >  
> > >  	/* Set up the commit timer for the new transaction. */
> 
> What about changing the logic to use the greater of get_buffer_flushtime() or 
> j_commit_interval when laptop_mode is enabled? If laptop_mode is disabled, 
> j_commit_interval can be used, as it is currently.
> 
> I don't have my kernel dev trees on this computer, but I can whip up a patch,
> if people are interested.
> 

Considering that this was somewhat of a dirty hack in the first place,
that ext3 already has the functionality through the commit mount option
and that 2.6 laptop mode I think the proper way would be to throw this
out and use the commit option instead. All it needs is the reset option
(use commit=0 to use the default file system value). This way among
other things it will be possible to use the same laptop mode script for
both 2.4 and 2.6.
I have a patch for that which is in a testing phase now (along with a
fix for reiserfs and xfs), I am a bit slow on it now due to test season
but I am hoping to publish it next week or something around that. I
will check with the guy doing the 2.6 laptop-mode patch to see whats
the state of the testing.

> -Eric



      parent reply	other threads:[~2004-02-24  1:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-20 11:32 laptop mode in 2.4.24 Cristiano De Michele
2004-02-20 13:42 ` Kiko Piris
2004-02-20 19:15   ` Philippe Troin
2004-02-21  4:02     ` Micha Feigin
     [not found]       ` <20040221182921.GF1162@laptop.localdomain.>
2004-02-24  1:46         ` Micha Feigin [this message]

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=20040224014649.GC14051@luna.mooo.com \
    --to=michf@post.tau.ac.il \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.