(unknown)
Subsystems (2)
All layout drivers returned -1 or 0 for both get_read_threshold and get_write_threshold policy operations. Remove the threshold policy ops and the related helper functions.
Note that the threshold
0001-SQUASHME-pnfs_submit-remove-filelayout-get-threshold.patch 0002-SQUASHME-pnfs_submit-don-t-use-pnfs_use_read.patch 0003-SQUASHME-pnfs_submit-don-t-use-pnfs_use_write.patch 0004-SQUASHME-pnfs_submit-don-t-use-pnfs_use_write-for-co.patch 0005-SQUASHME-pnfs_submit-don-t-use-pg_threshold.patch 0006-SQUASHME-pnfs_submit-remove-pg_threshold.patch 0007-SQUASHME-pnfs_submit-don-t-use-below_threshold-in-re.patch 0008-SQUASHME-pnfs_submit-don-t-use-below_threshold-in-di.patch 0009-SQUASHME-pnfs_submit-remove-unused-threshold-calcula.patch 0010-SQUASHME-pnfs_submit-cleanup-filelayout-pg_test.patch
Note: these will not be restored.
Testing:
--------CONFIG_NFS4_V1 set:
v4, v4.1, pNFS mounts Connectathon passes
CONFIG_NFS4_V1 not set:
v4 mount Connectathon passes
-->Andy
PATCH 1/10 SQUASHME pnfs_submit: remove filelayout get threshold
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations
Squash into "pnfs:filelayout:policy ops"
--- fs/nfs/nfs4filelayout.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-)
fs/nfs/nfs4filelayout.c +0 -9
@@ -737,13 +737,6 @@ boundary:return (p_stripe == r_stripe); } -ssize_t -filelayout_get_io_threshold (struct pnfs_layout_type *layoutid, -struct inode *inode) -{ -return -1 ; -} -struct layoutdriver_io_operations filelayout_io_operations = { .commit = filelayout_commit, .read_pagelist = filelayout_read_pagelist,
@@ -761,8 +754,6 @@ struct layoutdriver_policy_operations filelayout_policy_operations = { PNFS_LAYOUTGET_ON_OPEN, .get_stripesize = filelayout_get_stripesize, .pg_test = filelayout_pg_test, - .get_read_threshold = filelayout_get_io_threshold, - .get_write_threshold = filelayout_get_io_threshold, };struct pnfs_layoutdriver_type filelayout_type = {
Signature · 1 line
1.6.6
PATCH 2/10 SQUASHME pnfs_submit: don't use pnfs_use_read
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations
Squash into: "pnfs:read"
--- fs/nfs/pnfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/pnfs.c +1 -1
@@ -1834,7 +1834,7 @@ _pnfs_try_to_read_data(struct nfs_read_data *data,dprintk ("--> %s\n" , __func__);/* Only create an rpc request if utilizing NFSv4 I/O */ -if (!pnfs_use_read (ino, data->args.count) || +if (!pnfs_enabled_sb (nfss) || !nfss->pnfs_curr_ld->ld_io_ops->read_pagelist) {dprintk ("<-- %s: not using pnfs\n" , __func__);return PNFS_NOT_ATTEMPTED ;
Signature · 1 line
1.6.6
PATCH 3/10 SQUASHME pnfs_submit: don't use pnfs_use_write
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations
Squash into: "pnfs:write"
--- fs/nfs/pnfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/pnfs.c +1 -1
@@ -1855,7 +1855,7 @@ _pnfs_try_to_write_data(struct nfs_write_data *data,dprintk ("--> %s\n" , __func__);/* Only create an rpc request if utilizing NFSv4 I/O */ -if (!pnfs_use_write (ino, data->args.count) || +if (!pnfs_enabled_sb (nfss) || !nfss->pnfs_curr_ld->ld_io_ops->write_pagelist) {dprintk ("<-- %s: not using pnfs\n" , __func__);return PNFS_NOT_ATTEMPTED ;
Signature · 1 line
1.6.6
PATCH 4/10 SQUASHME pnfs_submit: don't use pnfs_use_write for commit
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations
Squash into: "pnfs:commit and pnfs_write_end"
--- fs/nfs/pnfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/pnfs.c +1 -1
@@ -1874,7 +1874,7 @@ _pnfs_try_to_commit(struct nfs_write_data *data, {struct inode *inode = data->inode; -if (!pnfs_use_write (inode,-1 )) { +if (!pnfs_enabled_sb (NFS_SERVER (inode))) {dprintk ("%s: Not using pNFS I/O\n" , __func__);return PNFS_NOT_ATTEMPTED ; }else {
Signature · 1 line
1.6.6
PATCH 5/10 SQUASHME pnfs_submit: don't use pg_threshold
From: Andy Adamson <[email protected]>
Prepare to remove unused get_read_threshold io operation. Squash into: "pnfs:filelayout:pg_test"
--- fs/nfs/nfs4filelayout.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
fs/nfs/nfs4filelayout.c +1 -2
@@ -712,8 +712,7 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,if (!pgio->pg_iswrite) goto boundary; -if (pgio->pg_bsize !=NFS_SERVER (pgio->pg_inode)->wsize && - pgio->pg_count > pgio->pg_threshold) +if (pgio->pg_bsize !=NFS_SERVER (pgio->pg_inode)->wsize) pgio->pg_bsize =NFS_SERVER (pgio->pg_inode)->wsize; boundary:
Signature · 1 line
1.6.6
PATCH 6/10 SQUASHME pnfs_submit: remove pg_threshold
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations Squash into: "pnfs:initialize pnfs_pageio for write"
--- fs/nfs/pnfs.c | 3 --- include/linux/nfs_page.h | 1 - 2 files changed, 0 insertions(+), 4 deletions(-)
fs/nfs/pnfs.c +0 -3
@@ -1402,7 +1402,6 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,loff_t loff;int status =0 ; - pgio->pg_threshold =0 ; pgio->pg_iswrite =0 ; pgio->pg_boundary =0 ; pgio->pg_test =NULL ;
@@ -1433,12 +1432,10 @@ pnfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct inode *inode) pgio->pg_iswrite =1 ;if (!pnfs_enabled_sb (server)) { - pgio->pg_threshold =0 ; pgio->pg_boundary =0 ; pgio->pg_test =NULL ;return ; } - pgio->pg_threshold =pnfs_getthreshold (inode,1 ); pgio->pg_boundary =pnfs_getboundary (inode);pnfs_set_pg_test (inode, pgio); }
include/linux/nfs_page.h +0 -1
@@ -62,7 +62,6 @@ struct nfs_pageio_descriptor {int pg_ioflags;int pg_error;#ifdef CONFIG_NFS_V4_1 -size_t pg_threshold;int pg_iswrite;int pg_boundary;int (*pg_test)(struct nfs_pageio_descriptor *,struct nfs_page *,struct nfs_page *);
Signature · 1 line
1.6.6
PATCH 7/10 SQUASHME pnfs_submit: don't use below_threshold in read
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations
Squash into: "pnfs:initialize pageio for read"
--- fs/nfs/pnfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/pnfs.c +1 -1
@@ -1412,7 +1412,7 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,/* Calculate the total read-ahead count */ readahead_range (inode, pages, &loff, &count); -if (count >0 && !below_threshold (inode, count,0 )) { +if (count >0 ) { status =pnfs_update_layout (inode, ctx, count, loff,IOMODE_READ ,NULL );dprintk ("%s virt update returned %d\n" , __func__, status);
Signature · 1 line
1.6.6
PATCH 8/10 SQUASHME pnfs_submit: don't use below_threshold in direct io
From: Andy Adamson <[email protected]>
Prepare to remove unused threshold calculations Squash into: "pnfs: Add function to set up O_DIRECT I/O"
--- fs/nfs/pnfs.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
fs/nfs/pnfs.c +0 -1
@@ -1455,7 +1455,6 @@ _pnfs_direct_init_io(struct inode *inode, struct nfs_open_context *ctx,unsigned int rwsize;if (count <=0 || -below_threshold (inode, count, iswrite) ||pnfs_update_layout (inode, ctx, count, loff,IOMODE_READ ,NULL ))return ;
Signature · 1 line
1.6.6
PATCH 9/10 SQUASHME pnfs_submit: remove unused threshold calculations
From: Andy Adamson <[email protected]>
All layoutdrivers returned -1 or 0 for both get_read_threshold and get_write_threshold policy operations. Remove the threshold policy ops and the related helper functions.
Squash into: " pnfs: I/O size helpers"
--- fs/nfs/pnfs.c | 98 --------------------------------------------- fs/nfs/pnfs.h | 3 - include/linux/nfs4_pnfs.h | 6 --- 3 files changed, 0 insertions(+), 107 deletions(-)
fs/nfs/pnfs.c +0 -98
@@ -1272,49 +1272,6 @@ out:return status; } -size_t -pnfs_getthreshold (struct inode *inode,int iswrite) -{ -struct nfs_server *nfss =NFS_SERVER (inode); -struct nfs_inode *nfsi =NFS_I (inode); -ssize_t threshold =0 ; - -if (!pnfs_enabled_sb (nfss) || - !nfss->pnfs_curr_ld->ld_policy_ops) - goto out; - -if (iswrite && nfss->pnfs_curr_ld->ld_policy_ops->get_write_threshold) { - threshold = nfss->pnfs_curr_ld->ld_policy_ops-> -get_write_threshold (&nfsi->layout, inode); - goto out; - } - -if (!iswrite && nfss->pnfs_curr_ld->ld_policy_ops->get_read_threshold) { - threshold = nfss->pnfs_curr_ld->ld_policy_ops-> -get_read_threshold (&nfsi->layout, inode); - } -out: -return threshold; -} - -/* -* Ask the layout driver for the request size at which pNFS should be used -* or standard NFSv4 I/O. Writing directly to the NFSv4 server can -* improve performance through its singularity and async behavior to -* the underlying parallel file system. -*/ -static int -below_threshold (struct inode *inode,size_t req_size,int iswrite) -{ -ssize_t threshold; - - threshold =pnfs_getthreshold (inode, iswrite); -if ((ssize_t )req_size <= threshold) -return 1 ; -else -return 0 ; -} -void readahead_range (struct inode *inode,struct list_head *pages,loff_t *offset,size_t *count)
@@ -1510,61 +1467,6 @@ pnfs_update_layout_commit(struct inode *inode,dprintk ("%s virt update status %d\n" , __func__, status); } -/* This is utilized in the paging system to determine if -* it should use the NFSv4 or pNFS read path. -* If count < 0, we do not check the I/O size. -*/ -int -pnfs_use_read (struct inode *inode,ssize_t count) -{ -struct nfs_server *nfss =NFS_SERVER (inode); - -/* Use NFSv4 I/O if there is no layout driver OR -* count is below the threshold. -*/ -if (!pnfs_enabled_sb (nfss) || - (count >=0 &&below_threshold (inode, count,0 ))) -return 0 ; - -return 1 ;/* use pNFS I/O */ -} - -/* Called only from pnfs4 nfs_rpc_ops => a layout driver is loaded */ -int -pnfs_use_ds_io (struct list_head *head,struct inode *inode,int io) -{ -struct nfs_page *req; -struct list_head *pos, *tmp; -int count =0 ; - -list_for_each_safe (pos, tmp, head) { - req =nfs_list_entry (head->next); - count += req->wb_bytes; - } -if (count >=0 &&below_threshold (inode, count, io)) -return 0 ; -return 1 ;/* use pNFS data server I/O */ -} - -/* This is utilized in the paging system to determine if -* it should use the NFSv4 or pNFS write path. -* If count < 0, we do not check the I/O size. -*/ -int -pnfs_use_write (struct inode *inode,ssize_t count) -{ -struct nfs_server *nfss =NFS_SERVER (inode); - -/* Use NFSv4 I/O if there is no layout driver OR -* count is below the threshold. -*/ -if (!pnfs_enabled_sb (nfss) || - (count >=0 &&below_threshold (inode, count,1 ))) -return 0 ; - -return 1 ;/* use pNFS I/O */ -} -static int pnfs_call_done (struct pnfs_call_data *pdata,struct rpc_task *task,void *data) {
fs/nfs/pnfs.h +0 -3
@@ -40,9 +40,6 @@ int _pnfs_return_layout(struct inode *, struct nfs4_pnfs_layout_segment *, enum pnfs_layoutreturn_type);void set_pnfs_layoutdriver (struct nfs_server *,u32 id);void unmount_pnfs_layoutdriver (struct nfs_server *); -int pnfs_use_read (struct inode *inode,ssize_t count); -int pnfs_use_ds_io (struct list_head *,struct inode *,int ); -int pnfs_use_write (struct inode *inode,ssize_t count);enum pnfs_try_status _pnfs_try_to_write_data (struct nfs_write_data *,const struct rpc_call_ops *,int ); enum pnfs_try_status _pnfs_try_to_read_data(struct nfs_read_data *,
include/linux/nfs4_pnfs.h +0 -6
@@ -182,12 +182,6 @@ struct layoutdriver_policy_operations {/* test for nfs page cache coalescing */ int (*pg_test)(struct nfs_pageio_descriptor *,struct nfs_page *,struct nfs_page *); - -/* Read requests under this value are sent to the NFSv4 server */ -ssize_t (*get_read_threshold) (struct pnfs_layout_type *,struct inode *); - -/* Write requests under this value are sent to the NFSv4 server */ -ssize_t (*get_write_threshold) (struct pnfs_layout_type *,struct inode *); };/* Should the full nfs rpc cleanup code be used after io */
Signature · 1 line
1.6.6
PATCH 10/10 SQUASHME pnfs_submit: cleanup filelayout pg_test
From: Andy Adamson <[email protected]>
pg_bsize is set in nfs_pageio_init.
Squash into: "pnfs:filelayout:pg_test"
--- fs/nfs/nfs4filelayout.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-)
fs/nfs/nfs4filelayout.c +0 -10
@@ -697,9 +697,6 @@ filelayout_get_stripesize(struct pnfs_layout_type *layoutid)/* * filelayout_pg_test(). Called by nfs_can_coalesce_requests() * -* For writes which come from the flush daemon, set the bsize on the fly. -* reads set the bsize in pnfs_pageio_init_read. -* * return 1 : coalesce page * return 0 : don't coalesce page */
@@ -709,13 +706,6 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, {u64 p_stripe, r_stripe; -if (!pgio->pg_iswrite) - goto boundary; - -if (pgio->pg_bsize !=NFS_SERVER (pgio->pg_inode)->wsize) - pgio->pg_bsize =NFS_SERVER (pgio->pg_inode)->wsize; - -boundary:if (pgio->pg_boundary ==0 )return 1 ; p_stripe = (u64 )prev->wb_index <<PAGE_CACHE_SHIFT ;
Signature · 1 line
1.6.6