speedup patch for 2.4.19-pre6
Subsystems (3)
Hello!
attached the combined speedup patch for 2.4.19-pre6
Bye,
Oleg
fs/buffer.c +3 -1
@@ -325,6 +325,8 @@lock_super (sb);if (sb->s_dirt && sb->s_op && sb->s_op->write_super) sb->s_op->write_super (sb); +if (sb->s_op && sb->s_op->commit_super) + sb->s_op->commit_super (sb);unlock_super (sb);unlock_kernel ();
@@ -344,7 +346,7 @@lock_kernel ();sync_inodes (dev);DQUOT_SYNC (dev); -sync_supers (dev); +commit_supers (dev);unlock_kernel ();return sync_buffers (dev,1 );
Binary files linux-2.4.19-pre6.o/fs/reiserfs/.journal.c.rej.swp and linux-2.4.19-pre6.speedup/fs/reiserfs/.journal.c.rej.swp differ
fs/reiserfs/bitmap.c +0 -2
@@ -122,7 +122,6 @@set_sb_free_blocks ( rs,sb_free_blocks (rs) +1 );journal_mark_dirty (th, s, sbh); - s->s_dirt =1 ; } void reiserfs_free_block (struct reiserfs_transaction_handle *th,
@@ -433,7 +432,6 @@/* update free block count in super block */ PUT_SB_FREE_BLOCKS ( s,SB_FREE_BLOCKS (s) - init_amount_needed );journal_mark_dirty (th, s,SB_BUFFER_WITH_SB (s)); - s->s_dirt =1 ;return CARRY_ON ; }
fs/reiserfs/ibalance.c +0 -2
@@ -632,7 +632,6 @@/* use check_internal if new root is an internal node */ check_internal (new_root);/*&&&&&&&&&&&&&&&&&&&&&&*/ - tb->tb_sb->s_dirt =1 ;/* do what is needed for buffer thrown from tree */ reiserfs_invalidate_buffer (tb, tbSh);
@@ -950,7 +949,6 @@PUT_SB_ROOT_BLOCK ( tb->tb_sb, tbSh->b_blocknr );PUT_SB_TREE_HEIGHT ( tb->tb_sb,SB_TREE_HEIGHT (tb->tb_sb) +1 );do_balance_mark_sb_dirty (tb, tb->tb_sb->u.reiserfs_sb.s_sbh,1 ); - tb->tb_sb->s_dirt =1 ; }if ( tb->blknum[h] ==2 ) {
fs/reiserfs/journal.c +55 -44
248 lines not on this page · raw message
fs/reiserfs/objectid.c +0 -3
@@ -87,7 +87,6 @@ }journal_mark_dirty (th, s,SB_BUFFER_WITH_SB (s)); - s->s_dirt =1 ;return unused_objectid; }
@@ -106,8 +105,6 @@reiserfs_prepare_for_journal (s,SB_BUFFER_WITH_SB (s),1 ) ;journal_mark_dirty (th, s,SB_BUFFER_WITH_SB (s)); - s->s_dirt =1 ; -/* start at the beginning of the objectid map (i = 0) and go to the end of it (i = disk_sb->s_oid_cursize). Linear search is
fs/reiserfs/stree.c +41 -23
95 lines not on this page · raw message
fs/reiserfs/super.c +15 -14
@@ -29,23 +29,22 @@static int reiserfs_remount (struct super_block * s,int * flags,char * data);static int reiserfs_statfs (struct super_block * s,struct statfs * buf); -// -// a portion of this function, particularly the VFS interface portion, -// was derived from minix or ext2's analog and evolved as the -// prototype did. You should be able to tell which portion by looking -// at the ext2 code and comparing. It's subfunctions contain no code -// used as a template unless they are so labeled. -// +/* kreiserfsd does all the periodic stuff for us */ static void reiserfs_write_super (struct super_block * s) { + s->s_dirt =S_SUPER_DIRTY_COMMIT ; +} -int dirty =0 ; -lock_kernel () ; -if (!(s->s_flags &MS_RDONLY )) { - dirty =flush_old_commits (s,1 ) ; - } - s->s_dirt = dirty; -unlock_kernel () ; +static void reiserfs_commit_super (struct super_block * s) +{ +struct reiserfs_transaction_handle th; +lock_kernel () ; +if (!(s->s_flags &MS_RDONLY )) { +journal_begin (&th, s,1 ); +journal_end_sync (&th, s,1 ); + s->s_dirt =0 ; + } +unlock_kernel () ; }//
@@ -413,6 +412,7 @@ put_super: reiserfs_put_super, write_super: reiserfs_write_super, write_super_lockfs: reiserfs_write_super_lockfs, + commit_super: reiserfs_commit_super, unlockfs: reiserfs_unlockfs, statfs: reiserfs_statfs, remount_fs: reiserfs_remount,
@@ -968,6 +968,7 @@memset (&s->u.reiserfs_sb,0 ,sizeof (struct reiserfs_sb_info )); +INIT_LIST_HEAD (&s->u.reiserfs_sb.s_reiserfs_supers);if (parse_options ((char *) data, &(s->u.reiserfs_sb.s_mount_opt), &blocks) ==0 ) {return NULL ;
fs/super.c +55 -2
77 lines not on this page · raw message
include/linux/fs.h +6 -0
@@ -706,6 +706,10 @@#define sb_entry (list) list_entry((list), struct super_block, s_list)#define S_BIAS (1<<30) + +/* flags for the s_dirt field */ +#define S_SUPER_DIRTY 1 +#define S_SUPER_DIRTY_COMMIT 2struct super_block {struct list_head s_list;/* Keep this first */ kdev_t s_dev;
@@ -918,6 +922,7 @@struct dentry * (*fh_to_dentry)(struct super_block *sb,__u32 *fh,int len,int fhtype,int parent);int (*dentry_to_fh)(struct dentry *,__u32 *fh,int *lenp,int need_parent);int (*show_options)(struct seq_file *,struct vfsmount *); +void (*commit_super) (struct super_block *); };/* Inode state bits.. */
@@ -1226,6 +1231,7 @@extern int filemap_fdatasync (struct address_space *);extern int filemap_fdatawait (struct address_space *);extern void sync_supers (kdev_t ); +extern void commit_supers (kdev_t );extern int bmap (struct inode *,int );extern int notify_change (struct dentry *,struct iattr *);extern int permission (struct inode *,int );
include/linux/reiserfs_fs.h +1 -0
@@ -1533,6 +1533,7 @@*/ #define JOURNAL_BUFFER (j,n) ((j)->j_ap_blocks[((j)->j_start + (n)) % JOURNAL_BLOCK_COUNT]) +int reiserfs_flush_old_commits (struct super_block *);void reiserfs_commit_for_inode (struct inode *) ;void reiserfs_update_inode_transaction (struct inode *) ;void reiserfs_wait_on_write_block (struct super_block *s) ;
include/linux/reiserfs_fs_sb.h +2 -3
@@ -291,8 +291,7 @@*/ struct reiserfs_page_list *j_flush_pages ;time_t j_trans_start_time ;/* time this transaction started */ -wait_queue_head_t j_wait ;/* wait journal_end to finish I/O */ -atomic_t j_wlock ;/* lock for j_wait */ +struct semaphore j_lock ;wait_queue_head_t j_join_wait ;/* wait for current transaction to finish before starting new one */ atomic_t j_jlock ;/* lock for j_join_wait */ int j_journal_list_index ;/* journal list number of the current trans */
@@ -444,6 +443,7 @@int s_is_unlinked_ok;reiserfs_proc_info_data_t s_proc_info_data;struct proc_dir_entry *procdir; +struct list_head s_reiserfs_supers; };/* Definitions of reiserfs on-disk properties: */
@@ -510,7 +510,6 @@void reiserfs_file_buffer (struct buffer_head * bh,int list);int reiserfs_is_super (struct super_block *s) ;int journal_mark_dirty (struct reiserfs_transaction_handle *,struct super_block *,struct buffer_head *bh) ; -int flush_old_commits (struct super_block *s,int ) ;int show_reiserfs_locks (void ) ;int reiserfs_resize (struct super_block *,unsigned long ) ;
mm/filemap.c +10 -2
@@ -1306,6 +1306,7 @@/* Mark the page referenced, AFTER checking for previous usage.. */ SetPageReferenced (page); } +EXPORT_SYMBOL (mark_page_accessed);/* * This is a generic file read routine, and uses the
@@ -2897,6 +2898,14 @@ } } +static void update_inode_times (struct inode *inode) +{ +time_t now =CURRENT_TIME ; +if (inode->i_ctime != now || inode->i_mtime != now) { + inode->i_ctime = inode->i_mtime = now; +mark_inode_dirty_sync (inode); + } +}/* * Write to a file through the page cache. *
@@ -3026,8 +3035,7 @@ goto out;remove_suid (inode); - inode->i_ctime = inode->i_mtime =CURRENT_TIME ; -mark_inode_dirty_sync (inode); +update_inode_times (inode);if (file->f_flags &O_DIRECT ) goto o_direct;
Same for 2.5.8-pre2 with the 1-6 reiserfs patchs instaled(ReiserFS Bug Fixes 6 of 6)?
Quoted 6 lines · Oleg Drokin
Hello!
attached the combined speedup patch for 2.4.19-pre6
Bye,
Oleg
Hello!
It may not apply. If you are interested, I can produce a patch against 2.5 kernels, too.
Bye,
Oleg
Quoted 15 lines · On Wed, Apr 10, 2002 at 09:50:33PM +0200, [email protected] wrote:
Same for 2.5.8-pre2 with the 1-6 reiserfs patchs instaled(ReiserFS Bug Fixes 6 of 6)?
Quoted 6 lines · Oleg Drokin
Hello!
attached the combined speedup patch for 2.4.19-pre6
Bye,
Oleg
Hello!
Chris is working on this right now, when he'll be ready, he (or I) will publish the patches here.
Bye,
Oleg
Quoted 31 lines · On Thu, Apr 11, 2002 at 07:09:21AM +0200, [email protected] wrote:
Could be great.
Quoted 23 lines · Oleg Drokin
Hello!
It may not apply. If you are interested, I can produce a patch against 2.5 kernels, too.
Bye,
OlegQuoted 15 lines · On Wed, Apr 10, 2002 at 09:50:33PM +0200, [email protected] wrote:
Same for 2.5.8-pre2 with the 1-6 reiserfs patchs instaled(ReiserFS Bug Fixes 6 of 6)?
Quoted 6 lines · Oleg Drokin
Hello!
attached the combined speedup patch for 2.4.19-pre6
Bye,
Oleg