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 314535 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.3 (text/plain), 4.13 KB, created by
Peter Staubach
on 2008-08-19 12:18:33 UTC
(
hide
)
Description:
Draft proposed patch
Filename:
MIME Type:
Creator:
Peter Staubach
Created:
2008-08-19 12:18:33 UTC
Size:
4.13 KB
patch
obsolete
>--- linux-2.6.18.i686/fs/nfs/write.c.org >+++ linux-2.6.18.i686/fs/nfs/write.c >@@ -1004,9 +1004,23 @@ static void nfs_execute_write(struct nfs > { > struct rpc_clnt *clnt = NFS_CLIENT(data->inode); > sigset_t oldset; >+struct nfs_writeargs *args; >+struct nfs_inode *nfsi; > > rpc_clnt_sigmask(clnt, &oldset); > lock_kernel(); >+args = &data->args; >+nfsi = NFS_I(data->inode); >+if (args->offset || args->count) { >+ if (args->offset != nfsi->offset) { >+ printk("nfs_execute_write(%lu): %Lu(%Lu)/%u\n", >+ data->inode->i_ino, args->offset, >+ nfsi->offset, args->count); >+ if (args->count != NFS_SERVER(data->inode)->wsize) >+ dump_stack(); >+ } >+ nfsi->offset = args->offset + args->count; >+} > rpc_execute(&data->task); > unlock_kernel(); > rpc_clnt_sigunmask(clnt, &oldset); >@@ -1487,14 +1501,19 @@ static int nfs_flush_inode(struct inode > LIST_HEAD(head); > int res; > >+ nfs_wait_on_flushing(inode); >+ > spin_lock(&nfsi->req_lock); > res = nfs_scan_dirty(inode, &head, idx_start, npages); > spin_unlock(&nfsi->req_lock); > if (res) { > int error = nfs_flush_list(inode, &head, res, how); > if (error < 0) >- return error; >+ res = error; > } >+ >+ nfs_wake_up_after_flushing(inode); >+ > return res; > } > >@@ -1525,6 +1544,8 @@ int nfs_sync_inode_wait(struct inode *in > int nocommit = how & FLUSH_NOCOMMIT; > int pages, ret; > >+ nfs_wait_on_flushing(inode); >+ > how &= ~FLUSH_NOCOMMIT; > spin_lock(&nfsi->req_lock); > do { >@@ -1558,6 +1579,9 @@ int nfs_sync_inode_wait(struct inode *in > spin_lock(&nfsi->req_lock); > } while (ret >= 0); > spin_unlock(&nfsi->req_lock); >+ >+ nfs_wake_up_after_flushing(inode); >+ > return ret; > } > >--- linux-2.6.18.i686/fs/nfs/inode.c.org >+++ linux-2.6.18.i686/fs/nfs/inode.c >@@ -439,6 +439,33 @@ static void nfs_wake_up_inode(struct ino > wake_up_bit(&nfsi->flags, NFS_INO_REVALIDATING); > } > >+/* >+ * Wait for the WRITE flushing to complete. >+ */ >+int nfs_wait_on_flushing(struct inode *inode) >+{ >+ struct rpc_clnt *clnt = NFS_CLIENT(inode); >+ struct nfs_inode *nfsi = NFS_I(inode); >+ sigset_t oldmask; >+ int error; >+ >+ rpc_clnt_sigmask(clnt, &oldmask); >+ error = wait_on_bit_lock(&nfsi->flags, NFS_INO_FLUSHING, >+ nfs_wait_schedule, TASK_INTERRUPTIBLE); >+ rpc_clnt_sigunmask(clnt, &oldmask); >+ >+ return error; >+} >+ >+void nfs_wake_up_after_flushing(struct inode *inode) >+{ >+ struct nfs_inode *nfsi = NFS_I(inode); >+ >+ clear_bit(NFS_INO_FLUSHING, &nfsi->flags); >+ smp_mb__after_clear_bit(); >+ wake_up_bit(&nfsi->flags, NFS_INO_FLUSHING); >+} >+ > int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) > { > struct inode *inode = dentry->d_inode; >@@ -1081,6 +1108,7 @@ struct inode *nfs_alloc_inode(struct sup > #ifdef CONFIG_NFS_V4 > nfsi->nfs4_acl = NULL; > #endif /* CONFIG_NFS_V4 */ >+nfsi->offset = 0; > return &nfsi->vfs_inode; > } > >--- linux-2.6.18.i686/fs/nfs/file.c.org >+++ linux-2.6.18.i686/fs/nfs/file.c >@@ -326,7 +326,11 @@ static void nfs_invalidate_page(struct p > static int nfs_release_page(struct page *page, gfp_t gfp) > { > if (gfp & __GFP_FS) { >+#ifdef notdef > int error = nfs_wb_page(page->mapping->host, page); >+#else >+ int error = nfs_sync_inode_wait(page->mapping->host, 0, 0, FLUSH_STABLE); >+#endif > > if (error == 0) { > nfs_fscache_release_page(page); >--- linux-2.6.18.i686/fs/nfs/internal.h.org >+++ linux-2.6.18.i686/fs/nfs/internal.h >@@ -153,6 +153,8 @@ extern void nfs_clear_inode(struct inode > #ifdef CONFIG_NFS_V4 > extern void nfs4_clear_inode(struct inode *); > #endif >+extern int nfs_wait_on_flushing(struct inode *); >+extern void nfs_wake_up_after_flushing(struct inode *); > > /* super.c */ > extern struct file_system_type nfs_xdev_fs_type; >--- linux-2.6.18.i686/include/linux/nfs_fs.h.org >+++ linux-2.6.18.i686/include/linux/nfs_fs.h >@@ -200,6 +200,7 @@ struct nfs_inode { > struct fscache_cookie *fscache; > #endif > struct inode vfs_inode; >+__u64 offset; > }; > > /* >@@ -221,6 +222,7 @@ struct nfs_inode { > #define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ > #define NFS_INO_FSCACHE (4) /* inode can be cached by FS-Cache */ > #define NFS_INO_MOUNTPOINT (5) /* inode is remote mountpoint */ >+#define NFS_INO_FLUSHING (6) /* flushing WRITE requests */ > > static inline struct nfs_inode *NFS_I(struct inode *inode) > {
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