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 312656 Details for
Bug 455408
NFS perfomance problems on s390x
[?]
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]
Draft Proposed patch
455408.rhel-5 (text/plain), 5.24 KB, created by
Peter Staubach
on 2008-07-25 15:41:50 UTC
(
hide
)
Description:
Draft Proposed patch
Filename:
MIME Type:
Creator:
Peter Staubach
Created:
2008-07-25 15:41:50 UTC
Size:
5.24 KB
patch
obsolete
>--- linux-2.6.18.i686/fs/nfs/file.c.org >+++ linux-2.6.18.i686/fs/nfs/file.c >@@ -405,11 +405,17 @@ nfs_file_write(struct kiocb *iocb, const > > nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, count); > result = generic_file_aio_write(iocb, buf, count, pos); >- /* Return error values for O_SYNC and IS_SYNC() */ >- if (result >= 0 && (IS_SYNC(inode) || (iocb->ki_filp->f_flags & O_SYNC))) { >- int err = nfs_fsync(iocb->ki_filp, dentry, 1); >- if (err < 0) >- result = err; >+ if (result >= 0) { >+ if (IS_SYNC(inode) || (iocb->ki_filp->f_flags & O_SYNC)) { >+ /* Return error values for O_SYNC and IS_SYNC() */ >+ int err = nfs_fsync(iocb->ki_filp, dentry, 1); >+ if (err < 0) >+ result = err; >+ } else if (((pos + count) & (NFS_SERVER(inode)->wsize - 1)) == 0) { >+ nfs_sync_inode_nowait(inode, >+ (pos & ~(NFS_SERVER(inode)->wsize - 1)) >> PAGE_CACHE_SHIFT, >+ NFS_SERVER(inode)->wpages); >+ } > } > out: > return result; >--- linux-2.6.18.i686/fs/nfs/write.c.org >+++ linux-2.6.18.i686/fs/nfs/write.c >@@ -1136,10 +1136,12 @@ static int nfs_flush_list(struct inode * > flush_one = nfs_flush_one; > if (wsize < PAGE_CACHE_SIZE) > flush_one = nfs_flush_multi; >+#ifdef notdef > /* For single writes, FLUSH_STABLE is more efficient */ > if (npages <= wpages && npages == NFS_I(inode)->npages > && nfs_list_entry(head->next)->wb_bytes <= wsize) > how |= FLUSH_STABLE; >+#endif > > do { > nfs_coalesce_requests(head, &one_request, wpages); >@@ -1561,6 +1563,25 @@ int nfs_sync_inode_wait(struct inode *in > return ret; > } > >+void nfs_sync_inode_nowait(struct inode *inode, unsigned long idx_start, >+ unsigned int npages) >+{ >+ struct nfs_inode *nfsi = NFS_I(inode); >+ LIST_HEAD(head); >+ int pages, ret = 0; >+ >+ spin_lock(&nfsi->req_lock); >+ do { >+ pages = nfs_scan_dirty(inode, &head, idx_start, npages); >+ if (pages != 0) { >+ spin_unlock(&nfsi->req_lock); >+ ret = nfs_flush_list(inode, &head, pages, 0); >+ spin_lock(&nfsi->req_lock); >+ } >+ } while (pages && !ret); >+ spin_unlock(&nfsi->req_lock); >+} >+ > int __init nfs_init_writepagecache(void) > { > nfs_wdata_cachep = kmem_cache_create("nfs_write_data", >--- linux-2.6.18.i686/include/linux/nfs_fs.h.org >+++ linux-2.6.18.i686/include/linux/nfs_fs.h >@@ -450,6 +450,7 @@ extern void nfs_writedata_release(void * > * return value!) > */ > extern int nfs_sync_inode_wait(struct inode *, unsigned long, unsigned int, int); >+extern void nfs_sync_inode_nowait(struct inode *, unsigned long, unsigned int); > #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) > extern int nfs_commit_inode(struct inode *, int); > extern struct nfs_write_data *nfs_commit_alloc(void); >--- linux-2.6.18.i686/include/linux/sysctl.h.org >+++ linux-2.6.18.i686/include/linux/sysctl.h >@@ -205,6 +205,7 @@ enum > VM_PAGECACHE=37, /* favor reclaiming unmapped pagecache pages */ > VM_MMAP_MIN_ADDR=38, /* amount of memory to protect from mmap */ > VM_FLUSH_MMAP=39, /* flush mmap()d pagecache pages */ >+ VM_MAX_QUEUE_DEPTH=40, /* max IO queue dpeth */ > }; > > >--- linux-2.6.18.i686/include/linux/writeback.h.org >+++ linux-2.6.18.i686/include/linux/writeback.h >@@ -89,6 +89,7 @@ void throttle_vm_writeout(void); > /* These are exported to sysctl. */ > extern int dirty_background_ratio; > extern int vm_dirty_ratio; >+extern int vm_max_queue_depth; > extern int dirty_writeback_interval; > extern int dirty_expire_interval; > extern int block_dump; >--- linux-2.6.18.i686/kernel/sysctl.c.org >+++ linux-2.6.18.i686/kernel/sysctl.c >@@ -1130,6 +1130,17 @@ static ctl_table vm_table[] = { > .strategy = &sysctl_intvec, > .extra1 = &zero, > }, >+ { >+ .ctl_name = VM_MAX_QUEUE_DEPTH, >+ .procname = "max_queue_depth", >+ .data = &vm_max_queue_depth, >+ .maxlen = sizeof(vm_max_queue_depth), >+ .mode = 0644, >+ .proc_handler = &proc_dointvec_minmax, >+ .strategy = &sysctl_intvec, >+ .extra1 = &zero, >+ .extra2 = &one_hundred, >+ }, > { .ctl_name = 0 } > }; > >--- linux-2.6.18.i686/mm/page-writeback.c.org >+++ linux-2.6.18.i686/mm/page-writeback.c >@@ -72,6 +72,8 @@ int dirty_background_ratio = 10; > */ > int vm_dirty_ratio = 40; > >+int vm_max_queue_depth = 0; >+ > /* > * The interval between `kupdate'-style writebacks, in jiffies > */ >@@ -147,12 +149,12 @@ get_dirty_limits(long *pbackground, long > if (dirty_ratio > unmapped_ratio / 2) > dirty_ratio = unmapped_ratio / 2; > >- if (dirty_ratio < 5) >- dirty_ratio = 5; >+ if (dirty_ratio < 1) >+ dirty_ratio = 1; > > background_ratio = dirty_background_ratio; > if (background_ratio >= dirty_ratio) >- background_ratio = dirty_ratio / 2; >+ background_ratio = ((dirty_ratio>1)?dirty_ratio/2:dirty_ratio); > > background = (background_ratio * available_memory) / 100; > dirty = (dirty_ratio * available_memory) / 100; >@@ -161,6 +163,18 @@ get_dirty_limits(long *pbackground, long > background += background / 4; > dirty += dirty / 4; > } >+ /* vm_max_queue_depth allows setting the dirty_ratio to less than 1% of RAM >+ * and prevents the dirty_background_ratio from being greater than dirty_ratio. >+ */ >+ if (vm_max_queue_depth && (vm_max_queue_depth<<(20-PAGE_SHIFT)) < dirty) { >+ dirty = vm_max_queue_depth<<(20-PAGE_SHIFT); >+ if (background > dirty) { >+ if (dirty_ratio > background_ratio) >+ background = dirty/2; >+ else >+ background = dirty; >+ } >+ } > *pbackground = background; > *pdirty = dirty; > }
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 455408
:
311973
|
312656
|
313588
|
314535
|
316301
|
316870
|
317393