public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiserfs speedup for 2.4.9+
@ 2001-09-22 21:39 Chris Mason
  2001-09-23 13:28 ` jogi
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2001-09-22 21:39 UTC (permalink / raw)
  To: reiserfs-list, linux-kernel; +Cc: Beau Kuiper


Hello everyone,

Beau pointed me towards a performance bug in reiserfs, where reiserfs_write_super would be called excessively.  

Turns out that 2.4.9 included some new super handling code that 
interacted poorly with how reiserfs uses kupdated calls to 
write_super to trigger writebacks of metadata.

This is most obvious with benchmarks like bonnie++, where 
2.4.9 and 2.4.10 reiserfs do very poorly.

This patch makes things much better in my tests, I'd appreciate 
a few more testers.  The only risk is reiserfs using slightly 
more memory, but only if I've screwed something up.

-chris

--- linux/fs/reiserfs/journal.c	Sat Sep  8 08:05:32 2001
+++ linux/fs/reiserfs/journal.c	Sat Sep 22 17:10:57 2001
@@ -746,6 +746,8 @@
   }
   atomic_set(&(jl->j_commit_flushing), 0) ;
   wake_up(&(jl->j_commit_wait)) ;
+  
+  s->s_dirt = 1 ;
   return 0 ;
 }
 
@@ -2378,7 +2381,6 @@
   int count = 0;
   int start ; 
   time_t now ; 
-  int keep_dirty = 0 ;
   struct reiserfs_transaction_handle th ; 
 
   start =  SB_JOURNAL_LIST_INDEX(p_s_sb) ;
@@ -2388,10 +2390,6 @@
   if (SB_JOURNAL_LIST_INDEX(p_s_sb) < 0) {
     return 0  ;
   }
-  if (!strcmp(current->comm, "kupdate")) {
-    immediate = 0 ;
-    keep_dirty = 1 ;
-  }
   /* starting with oldest, loop until we get to the start */
   i = (SB_JOURNAL_LIST_INDEX(p_s_sb) + 1) % JOURNAL_LIST_COUNT ;
   while(i != start) {
@@ -2416,7 +2414,6 @@
     reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
     journal_mark_dirty(&th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
     do_journal_end(&th, p_s_sb,1, COMMIT_NOW) ;
-    keep_dirty = 0 ;
   } else if (immediate) { /* belongs above, but I wanted this to be very explicit as a special case.  If they say to 
                              flush, we must be sure old transactions hit the disk too. */
     journal_join(&th, p_s_sb, 1) ;
@@ -2424,8 +2421,8 @@
     journal_mark_dirty(&th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
     do_journal_end(&th, p_s_sb,1, COMMIT_NOW | WAIT) ;
   }
-  keep_dirty |= reiserfs_journal_kupdate(p_s_sb) ;
-  return keep_dirty ;
+  reiserfs_journal_kupdate(p_s_sb) ;
+  return 0 ;
 }
 
 /*



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reiserfs speedup for 2.4.9+
  2001-09-22 21:39 [PATCH] reiserfs speedup for 2.4.9+ Chris Mason
@ 2001-09-23 13:28 ` jogi
  2001-09-23 22:38   ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: jogi @ 2001-09-23 13:28 UTC (permalink / raw)
  To: Chris Mason; +Cc: reiserfs-list, linux-kernel, Beau Kuiper

On Sat, Sep 22, 2001 at 05:39:37PM -0400, Chris Mason wrote:
> 
> Hello everyone,

Hello Chris,

> Beau pointed me towards a performance bug in reiserfs, where reiserfs_write_super would be called excessively.  
> 
> Turns out that 2.4.9 included some new super handling code that 
> interacted poorly with how reiserfs uses kupdated calls to 
> write_super to trigger writebacks of metadata.
> 
> This is most obvious with benchmarks like bonnie++, where 
> 2.4.9 and 2.4.10 reiserfs do very poorly.
> 
> This patch makes things much better in my tests, I'd appreciate 
> a few more testers.  The only risk is reiserfs using slightly 
> more memory, but only if I've screwed something up.

Just to share my two cents. First I have to tell that the skipping
of alsaplayer playing .wav files I experienced during kernel compiles
or other activities is almost completly gone. Furthermore I did some
performance testing of kernel compiles (actions that are done:
untar kernel, patch kernel, make -j50 bzImage modules, 5 times in a
row). These are the results of plain 2.4.10-pre14aa1:

Elapsed (wall clock) time (h:mm:ss or m:ss): 6:25.90
Elapsed (wall clock) time (h:mm:ss or m:ss): 6:15.43
Elapsed (wall clock) time (h:mm:ss or m:ss): 6:01.95
Elapsed (wall clock) time (h:mm:ss or m:ss): 6:12.56
Elapsed (wall clock) time (h:mm:ss or m:ss): 6:35.61

And here are the results of 2.4.10-pre14aa1 + your patch:

Elapsed (wall clock) time (h:mm:ss or m:ss): 5:23.55
Elapsed (wall clock) time (h:mm:ss or m:ss): 5:32.21
Elapsed (wall clock) time (h:mm:ss or m:ss): 5:34.77
Elapsed (wall clock) time (h:mm:ss or m:ss): 6:17.55
Elapsed (wall clock) time (h:mm:ss or m:ss): 5:49.31

Is the performance fix also required for 2.4.9-acXX ?

Regards,

   Jogi

-- 

Well, yeah ... I suppose there's no point in getting greedy, is there?

    << Calvin & Hobbes >>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reiserfs speedup for 2.4.9+
  2001-09-23 13:28 ` jogi
@ 2001-09-23 22:38   ` Chris Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Mason @ 2001-09-23 22:38 UTC (permalink / raw)
  To: jogi; +Cc: reiserfs-list, linux-kernel, Beau Kuiper



On Sunday, September 23, 2001 03:28:41 PM +0200 jogi@planetzork.ping.de
wrote:

[ benchmarks ]

Thanks to everyone who gave it a try, the patch is in 2.4.10.

> Is the performance fix also required for 2.4.9-acXX ?
> 

Yes, I just sent to Alan for inclusion.

-chris


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-23 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-22 21:39 [PATCH] reiserfs speedup for 2.4.9+ Chris Mason
2001-09-23 13:28 ` jogi
2001-09-23 22:38   ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox