* [PATCH 1/1] nfs41 do not allocate unused back channel pages
@ 2010-01-26 17:55 andros
2010-01-27 23:44 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: andros @ 2010-01-26 17:55 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
net/sunrpc/svc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 538ca43..984be52 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -506,6 +506,10 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
{
unsigned int pages, arghi;
+ /* bc_xprt uses fore channel allocated buffers */
+ if (rqstp->rq_server->bc_xprt)
+ return 1;
+
pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
* We assume one is at most one page
*/
--
1.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] nfs41 do not allocate unused back channel pages
2010-01-26 17:55 [PATCH 1/1] nfs41 do not allocate unused back channel pages andros
@ 2010-01-27 23:44 ` Trond Myklebust
0 siblings, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2010-01-27 23:44 UTC (permalink / raw)
To: andros; +Cc: linux-nfs
On Tue, 2010-01-26 at 12:55 -0500, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> net/sunrpc/svc.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> index 538ca43..984be52 100644
> --- a/net/sunrpc/svc.c
> +++ b/net/sunrpc/svc.c
> @@ -506,6 +506,10 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
> {
> unsigned int pages, arghi;
>
> + /* bc_xprt uses fore channel allocated buffers */
> + if (rqstp->rq_server->bc_xprt)
> + return 1;
> +
> pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
> * We assume one is at most one page
> */
Argh! This one too fails completely to compile ifndef CONFIG_NFS_V4_1
Trond
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] nfs41 do not allocate unused back channel pages
2010-01-27 1:49 andros
@ 2010-01-28 14:09 ` Trond Myklebust
0 siblings, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2010-01-28 14:09 UTC (permalink / raw)
To: andros; +Cc: linux-nfs
On Tue, 2010-01-26 at 20:49 -0500, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> net/sunrpc/svc.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> index 538ca43..c9991e8 100644
> --- a/net/sunrpc/svc.c
> +++ b/net/sunrpc/svc.c
> @@ -506,6 +506,12 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
> {
> unsigned int pages, arghi;
>
> +#if defined(CONFIG_NFS_V4_1)
> + /* bc_xprt uses fore channel allocated buffers */
> + if (rqstp->rq_server->bc_xprt)
> + return 1;
> +#endif /* CONFIG_NFS_V4_1 */
> +
> pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
> * We assume one is at most one page
> */
Can we replace this with a 'svc_is_backchannel(rqstp->rq_server)' type
of test? That would make it a bit easier on the eyes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] nfs41 do not allocate unused back channel pages
@ 2010-01-27 2:24 andros
0 siblings, 0 replies; 5+ messages in thread
From: andros @ 2010-01-27 2:24 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
include/linux/sunrpc/svc.h | 12 ++++++++++++
net/sunrpc/svc.c | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 5a3085b..02329f4 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -281,6 +281,18 @@ struct svc_rqst {
};
/*
+ * Determine if a shared backchannel is in use
+ */
+static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
+{
+#ifdef CONFIG_NFS_V4_1
+ if (rqstp->rq_server->bc_xprt)
+ return 1;
+#endif /* CONFIG_NFS_V4_1 */
+ return 0;
+}
+
+/*
* Rigorous type checking on sockaddr type conversions
*/
static inline struct sockaddr_in *svc_addr_in(const struct svc_rqst *rqst)
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 538ca43..6dcf8c9 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -506,6 +506,10 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
{
unsigned int pages, arghi;
+ /* bc_xprt uses fore channel allocated buffers */
+ if (svc_is_backchannel(rqstp))
+ return 1;
+
pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
* We assume one is at most one page
*/
--
1.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/1] nfs41 do not allocate unused back channel pages
@ 2010-01-27 1:49 andros
2010-01-28 14:09 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: andros @ 2010-01-27 1:49 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
net/sunrpc/svc.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 538ca43..c9991e8 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -506,6 +506,12 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
{
unsigned int pages, arghi;
+#if defined(CONFIG_NFS_V4_1)
+ /* bc_xprt uses fore channel allocated buffers */
+ if (rqstp->rq_server->bc_xprt)
+ return 1;
+#endif /* CONFIG_NFS_V4_1 */
+
pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
* We assume one is at most one page
*/
--
1.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-28 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-26 17:55 [PATCH 1/1] nfs41 do not allocate unused back channel pages andros
2010-01-27 23:44 ` Trond Myklebust
2010-01-27 1:49 andros
2010-01-28 14:09 ` Trond Myklebust
2010-01-27 2:24 andros
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.