[pnfs] pnfs 2.6.18 bakeathon patches

dean hildebrand seattleplus at gmail.com
Wed Oct 17 14:49:40 EDT 2007


I looked into a little and you are right Rahul, the client side
maximum number of slots follows sunrpc.tcp_slot_table_entries.

One interesting note is that on the server in alloc_init_session, the
following code restricts the value:

        if (cses->fore_channel.maxreqs >= NFS41_MAX_SLOTS)
                cses->fore_channel.maxreqs = NFS41_MAX_SLOTS;

where

#define NFS41_MAX_SLOTS                64

Funnily enough it only checks the fore channel and not the back
channel, which can be up to the max W/RSIZE (2*1024*1024).

This is fine for us, so no extra patches are necessary for now.
(although maybe we should restrict the backchannel with
NFS41_MAX_SLOTS at some point)

Dean

On 10/17/07, Iyer, Rahul <Rahul.Iyer at netapp.com> wrote:
> >
> > I think that we just need to change the code that use the
> > #define to the varibale set by /proc/....
> > That is what Rahul said at the meeting. Right ?
> >
> > >
>
> Yes, I had. But it turns out this has already been fixed. In the
> function below,
>
> /* Initialize the values to be used by the client in CREATE_SESSION */
> void nfs4_init_channel_attrs(struct nfs4_client *clp,
>                                 struct nfs4_channel_attrs *fc_attrs,
>                                 struct nfs4_channel_attrs *bc_attrs)
> {
>         /* XXX: We need to have good values here... 32K is a wild guess
> */
>         fc_attrs->headerpadsz = bc_attrs->headerpadsz = 0;
>         fc_attrs->max_rqst_sz = bc_attrs->max_rqst_sz =
> NFS_MAX_FILE_IO_SIZE;
>         fc_attrs->max_resp_sz = bc_attrs->max_resp_sz =
> NFS_MAX_FILE_IO_SIZE;
>         fc_attrs->max_resp_sz_cached = bc_attrs->max_resp_sz_cached =
> NFS_MAX_FILE_IO_SIZE;
>         fc_attrs->max_ops = bc_attrs->max_ops = 0xFFFFFFFF;
>         fc_attrs->max_reqs = bc_attrs->max_reqs =
>                                 clp->cl_rpcclient->cl_xprt->max_reqs;
>         fc_attrs->rdma_attrs = bc_attrs->rdma_attrs = 0;
>
> }
>
> The max_reqs is set to cl_prt->max_reqs. This is changed as and when the
> /proc value changes. But a remount is required after the change.
> -Rahul
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>


More information about the pNFS mailing list