Re: [PATCH 1/3] SUNRPC add deferral processing callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 17, 2008 at 04:35:28PM -0400, Talpey, Thomas wrote:
> >diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
> >index dc69068..46a4097 100644
> >--- a/include/linux/sunrpc/svc.h
> >+++ b/include/linux/sunrpc/svc.h
> >@@ -215,6 +215,9 @@ struct svc_rqst {
> > 	struct svc_cred		rq_cred;	/* auth info */
> > 	void *			rq_xprt_ctxt;	/* transport specific context ptr */
> > 	struct svc_deferred_req*rq_deferred;	/* deferred request we are replaying */
> >+	/* callback to save deferred request state */
> >+	void (*rq_save_state)(struct svc_rqst *, struct svc_deferred_req *);
> >+	void			*rq_defer_data; /* defer state data to save */
> > 
> > 	size_t			rq_xprt_hlen;	/* xprt header len */
> > 	struct xdr_buf		rq_arg;
> >@@ -323,6 +326,13 @@ struct svc_deferred_req {
> > 	union svc_addr_u	daddr;	/* where reply must come from */
> > 	struct cache_deferred_req handle;
> > 	size_t			xprt_hlen;
> >+	/* callbacks to restore and release deferred request state
> >+	* set in rq_save_state */
> >+	void (*restore_state)(struct svc_rqst *, struct svc_deferred_req *);
> >+	void (*release_state)(struct svc_deferred_req *);
> >+	void			*defer_data; /* defer state data */
> >+	struct page		*respages[RPCSVC_MAXPAGES];
> 
> Is it worthwhile to make this a dynamically allocated pointer? If the max
> pages size is large (1MB means 256),

So that's a 1k array with 32 bit pointers, a 2k array with 64.  We
currently allow a  maximum of 300 deferred requests (DFR_MAX in
net/sunrpc/cache.c).

It'd be nice to not turn that into two allocations if the typical case
only requires one page, so we'd probably want to allow either a single
page pointer or a dynamically-allocated array.

I don't know how much to care.

--b.

> it's quite a large array for something
> that may rarely be so full.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux