mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org,
	green@namesys.com
Subject: [BK] ReiserFS PATCH resend (preallocation the default)
Date: Fri,  6 Sep 2002 15:53:55 +0400 (MSD)	[thread overview]
Message-ID: <20020906115355.F3B23A9A79@reload.namesys.com> (raw)

Hello!

    This changeset enables preallocation of blocks on reiserfs filesystems
    by default. Without this, SMP boxes seems to have speed problems on some
    workloads.  You can get it from bk://thebsh.namesys.com/bk/reiser3-linux-2.4

Diffstat:
 fs/reiserfs/bitmap.c        |    3 +--
 fs/reiserfs/super.c         |    4 ++++
 include/linux/reiserfs_fs.h |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

Plain text patch:
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.587   -> 1.588  
#	include/linux/reiserfs_fs.h	1.21    -> 1.22   
#	 fs/reiserfs/super.c	1.21    -> 1.22   
#	fs/reiserfs/bitmap.c	1.15    -> 1.16   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/20	green@angband.namesys.com	1.588
# Turn on blocks preallocation by default for reiserfs.
# --------------------------------------------
#
diff -Nru a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
--- a/fs/reiserfs/bitmap.c	Tue Aug 20 13:43:25 2002
+++ b/fs/reiserfs/bitmap.c	Tue Aug 20 13:43:25 2002
@@ -15,7 +15,7 @@
 #include <linux/reiserfs_fs_sb.h>
 #include <linux/reiserfs_fs_i.h>
 
-#define PREALLOCATION_SIZE 8
+#define PREALLOCATION_SIZE 9
 
 #define INODE_INFO(inode) (&(inode)->u.reiserfs_i)
 
@@ -397,7 +397,6 @@
 {
     char * this_char, * value;
 
-    s->u.reiserfs_sb.s_alloc_options.preallocmin = 4;
     s->u.reiserfs_sb.s_alloc_options.bits = 0; /* clear default settings */
 
     for (this_char = strtok (options, ":"); this_char != NULL; this_char = strtok (NULL, ":")) {
diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c	Tue Aug 20 13:43:25 2002
+++ b/fs/reiserfs/super.c	Tue Aug 20 13:43:25 2002
@@ -1117,6 +1117,10 @@
     s->u.reiserfs_sb.s_mount_opt = ( 1 << REISERFS_SMALLTAIL );
     /* default block allocator option: skip_busy */
     s->u.reiserfs_sb.s_alloc_options.bits = ( 1 << 5);
+    /* If file grew past 4 blocks, start preallocation blocks for it. */
+    s->u.reiserfs_sb.s_alloc_options.preallocmin = 4;
+    /* Preallocate by 8 blocks (9-1) at once */
+    s->u.reiserfs_sb.s_alloc_options.preallocsize = 9;
 
     if (reiserfs_parse_options (s, (char *) data, &(s->u.reiserfs_sb.s_mount_opt), &blocks) == 0) {
 	return NULL;
diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
--- a/include/linux/reiserfs_fs.h	Tue Aug 20 13:43:25 2002
+++ b/include/linux/reiserfs_fs.h	Tue Aug 20 13:43:25 2002
@@ -56,7 +56,7 @@
 
 #define REISERFS_PREALLOCATE
 #define DISPLACE_NEW_PACKING_LOCALITIES
-#define PREALLOCATION_SIZE 8
+#define PREALLOCATION_SIZE 9
 
 /* n must be power of 2 */
 #define _ROUND_UP(x,n) (((x)+(n)-1u) & ~((n)-1u))




                 reply	other threads:[~2002-09-06 11:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020906115355.F3B23A9A79@reload.namesys.com \
    --to=reiser@namesys.com \
    --cc=green@namesys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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

all inboxes | Powered by JetHome®