All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vijayan Prabhakaran <pvijayan@gmail.com>
To: mason@suse.com, reiserfs-list@namesys.com
Cc: reiser@namesys.com, vijayan@cs.wisc.edu
Subject: BUG in Reiserfs Journal Thread
Date: Wed, 15 Sep 2004 15:02:27 -0500	[thread overview]
Message-ID: <d68fdf7d04091513021adcd9c7@mail.gmail.com> (raw)

Dear Chris Mason,

I found a bug in Reiserfs journal thread. This bug is in function
reiserfs_journal_commit_thread().

I'm trying to measure the impact of journal thread on data flushes. I
changed the commit interval from the default of 5 seconds (this value
is hard coded in the function) to other different values. I found that
irrespective of changing the journal thread's timer value, the dirty
data was not getting flushed after the time out at the commit thread.

The reason for this is due to a bug in the code. The code looks like

while(1) {

  /*blah blah blah*/

  if (CURRENT_TIME - last_run > 5) {
    reiserfs_flush_old_commits(s);
  }

  /*blah blah blah*/

  interruptible_sleep_on_timeout(&reiserfs_commit_thread_wait, 5 * HZ) ;

  /*thread wakes up*/
}

If you see the code, the thread sleeps for 5 seconds. But after waking
up, it again checks the condition:

if (CURRENT_TIME - last_run > 5) {
   reiserfs_flush_old_commits(s);
}

Actually, the condition should be ">=" instead of ">". Since the
thread wakes up immediately after the timer expires, the condition
will never satisfy if it is ">".

Chris, can you please verify this and add the fix ?

I appreciate your help.

Vijayan

             reply	other threads:[~2004-09-15 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-15 20:02 Vijayan Prabhakaran [this message]
2004-09-15 20:07 ` BUG in Reiserfs Journal Thread Chris Mason
2004-09-15 20:17   ` Vijayan Prabhakaran

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=d68fdf7d04091513021adcd9c7@mail.gmail.com \
    --to=pvijayan@gmail.com \
    --cc=mason@suse.com \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=vijayan@cs.wisc.edu \
    /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.