Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 150135 Details for
Bug 230803
Fix GFS readahead setting
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Tentative patch for sequential read performance fix
gfs_ra_perf.patch (text/plain), 4.62 KB, created by
Wendy Cheng
on 2007-03-15 16:08:41 UTC
(
hide
)
Description:
Tentative patch for sequential read performance fix
Filename:
MIME Type:
Creator:
Wendy Cheng
Created:
2007-03-15 16:08:41 UTC
Size:
4.62 KB
patch
obsolete
>--- gfs-kernel-2.6.9-71/src/gfs/diaper.c 2007-03-14 15:55:25.000000000 -0400 >+++ gfs-kernel/src/gfs/diaper.c 2007-03-15 09:07:55.000000000 -0400 >@@ -27,6 +27,8 @@ > #include "diaper.h" > #include "ops_fstype.h" > >+#define READAHEAD_DEBUG 1 >+ > struct diaper_holder { > struct list_head dh_list; > unsigned int dh_count; >@@ -371,6 +373,16 @@ diaper_get(struct block_device *real, in > diaper->bd_inode->i_data.backing_dev_info = &gd->queue->backing_dev_info; > } else > printk("GFS: diaper: reopening\n"); >+ >+#if defined(READAHEAD_DEBUG) >+ /* gfs readahead fix */ >+ if (!diaper->bd_inode->i_data.backing_dev_info) >+ printk("GFS: diaper device doesn't have backing_dev_info\n"); >+ else >+ printk("GFS: diaper device ra_pages = %x\n", >+ diaper->bd_inode->i_data.backing_dev_info->ra_pages); >+#endif >+ > diaper->bd_openers++; > up(&diaper->bd_sem); > >--- gfs-kernel-2.6.9-71/src/gfs/gfs.h 2007-03-15 08:18:32.000000000 -0400 >+++ gfs-kernel/src/gfs/gfs.h 2007-03-15 09:07:36.000000000 -0400 >@@ -21,6 +21,7 @@ > > #include "fixed_div64.h" > #include "lvb.h" >+#include <linux/backing-dev.h> > #include "incore.h" > #include "util.h" > >--- gfs-kernel-2.6.9-71/src/gfs/incore.h 2007-03-14 15:55:25.000000000 -0400 >+++ gfs-kernel/src/gfs/incore.h 2007-03-15 08:28:25.000000000 -0400 >@@ -894,6 +894,7 @@ struct gfs_tune { > unsigned int gt_greedy_max; > unsigned int gt_rgrp_try_threshold; > unsigned int gt_statfs_fast; >+ unsigned int gt_seq_readahead; > }; > > /* >@@ -959,6 +960,10 @@ struct gfs_sbd { > > struct super_block *sd_vfs; /* Linux VFS device independent sb */ > >+ /* readahead */ >+ struct backing_dev_info sd_dev_info; >+ spinlock_t sd_dev_info_spin; >+ > struct gfs_args sd_args; /* Mount arguments */ > unsigned long sd_flags; /* SDF_... see above */ > >--- gfs-kernel-2.6.9-71/src/gfs/ioctl.c 2007-03-14 15:55:25.000000000 -0400 >+++ gfs-kernel/src/gfs/ioctl.c 2007-03-15 08:31:00.000000000 -0400 >@@ -484,6 +484,7 @@ gi_get_tune(struct gfs_inode *ip, > gfs_printf("greedy_max %u\n", gt->gt_greedy_max); > gfs_printf("rgrp_try_threshold %u\n", gt->gt_rgrp_try_threshold); > gfs_printf("statfs_fast %u\n", gt->gt_statfs_fast); >+ gfs_printf("seq_readahead %u\n", gt->gt_seq_readahead); > > error = 0; > >@@ -763,6 +764,14 @@ gi_set_tune(struct gfs_sbd *sdp, struct > else > tune_set(gt_statfs_fast, x); > >+ } else if (strcmp(param, "seq_readahead") == 0) { >+ if (sscanf(value, "%u", &x) != 1) >+ return -EINVAL; >+ error = gfs_reset_readahead(sdp, x); >+ if (error) >+ return error; >+ tune_set(gt_seq_readahead, x); >+ > } else > return -EINVAL; > >--- gfs-kernel-2.6.9-71/src/gfs/super.h 2007-03-14 15:55:25.000000000 -0400 >+++ gfs-kernel/src/gfs/super.h 2007-03-15 08:32:28.000000000 -0400 >@@ -63,4 +63,6 @@ int gfs_lock_fs_check_clean(struct gfs_s > int gfs_freeze_fs(struct gfs_sbd *sdp); > void gfs_unfreeze_fs(struct gfs_sbd *sdp); > >+int gfs_reset_readahead(struct gfs_sbd *sdp, unsigned int file_ra); >+ > #endif /* __SUPER_DOT_H__ */ >--- gfs-kernel-2.6.9-71/src/gfs/ops_file.c 2007-03-14 15:55:25.000000000 -0400 >+++ gfs-kernel/src/gfs/ops_file.c 2007-03-15 09:16:44.000000000 -0400 >@@ -1743,6 +1743,57 @@ gfs_flock(struct file *file, int cmd, st > return do_flock(file, cmd, fl); > } > >+/* >+ * VFS layer offers a "bd_inode_backing_dev_info" pointer to allow >+ * filesystem overriding its block device generic readahead value. >+ * We'll take this advantage to tune for large sequential write. >+ */ >+struct backing_dev_info gfs_file_backing_dev_info = { >+ .ra_pages = 0, /* place holder */ >+ .memory_backed = 0, /* place holder */ >+ .unplug_io_fn = default_unplug_io_fn, >+}; >+ >+int gfs_reset_readahead(struct gfs_sbd *sdp, unsigned int file_ra) >+{ >+ unsigned int max_ra; >+ struct backing_dev_info *bdi; >+ struct super_block *vfs_sb=sdp->sd_vfs; >+ >+ /* user wants to reset back to default */ >+ if (file_ra == 0) { >+ vfs_sb->s_bdev->bd_inode_backing_dev_info = NULL; >+ return 0; >+ } >+ >+ /* can't exceed gfs max readahead */ >+ max_ra = gfs_tune_get(sdp, gt_max_readahead); >+ if (file_ra > max_ra) { >+ printk("GFS: einval - readahead exceeds max\n"); >+ return -EINVAL; >+ } >+ >+ bdi = sdp->sd_vfs->s_bdev->bd_inode_backing_dev_info; >+ >+ /* sanity check */ >+ if (gfs_tune_get(sdp, gt_seq_readahead) && !bdi) { >+ printk("GFS: error - gt_seq_readahead set but bdi is NULL\n"); >+ return -EIO; >+ } >+ >+ /* add pointer */ >+ if (!bdi) { >+ bdi = &sdp->sd_dev_info; >+ vfs_sb->s_bdev->bd_inode_backing_dev_info = bdi; >+ *bdi = *(vfs_sb->s_bdev->bd_inode->i_data.backing_dev_info); >+ } >+ >+ /* now change the setting */ >+ bdi->ra_pages = file_ra; >+ >+ return 0; >+} >+ > struct file_operations gfs_file_fops = { > .llseek = gfs_llseek, > .read = gfs_read,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230803
: 150135