From: Martin Knoblauch <knobi-Ys4E+72pFW0hFhg+JK9F0w@public.gmane.org>
To: Michael Trimarchi <trimarchimichael-whZMOeQn8C0@public.gmane.org>,
linux-nfs list <linux-nfs@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][Resend] Make NFS-Client readahead tunable
Date: Wed, 17 Sep 2008 09:15:45 -0700 (PDT) [thread overview]
Message-ID: <690463.13660.qm@web32606.mail.mud.yahoo.com> (raw)
----- Original Message ----
> From: Michael Trimarchi <trimarchimichael-whZMOeQn8C0@public.gmane.org>
> To: Martin Knoblauch <knobi-Ys4E+72pFW0hFhg+JK9F0w@public.gmane.org>; linux-nfs list <linux-nfs@vger.kernel.org>
> Cc: linux-kernel@vger.kernel.org
> Sent: Wednesday, September 17, 2008 3:42:30 PM
> Subject: Re: [RFC][Resend] Make NFS-Client readahead tunable
>
> Hi,
>
> ...
>
> > Signed-off-by: Martin Knoblauch
> >
> > diff -urp linux-2.6.27-rc6-git4/fs/nfs/client.c
> > linux-2.6.27-rc6-git4-nfs_ra/fs/nfs/client.c
> > --- linux-2.6.27-rc6-git4/fs/nfs/client.c 2008-09-17 11:35:21.000000000
> > +0200
> > +++ linux-2.6.27-rc6-git4-nfs_ra/fs/nfs/client.c 2008-09-17
> > 11:55:18.000000000 +0200
> > @@ -722,6 +722,11 @@ error:
> > }
> >
> > /*
> > + * NFS Client Read-Ahead factor
> > +*/
> > +unsigned int nfs_ra_factor;
> > +
> > +/*
> > * Load up the server record from information gained in an fsinfo record
> > */
> > static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo
>
> > *fsinfo)
> > @@ -746,7 +751,11 @@ static void nfs_server_set_fsinfo(struct
> > server->rsize = NFS_MAX_FILE_IO_SIZE;
> > server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >>
> > PAGE_CACHE_SHIFT;
> >
> > - server->backing_dev_info.ra_pages = server->rpages *
> NFS_MAX_READAHEAD;
> > + dprintk("nfs_server_set_fsinfo: rsize, wsize, rpages, \
> > + nfs_ra_factor, ra_pages: %d %d %d %d %d\n",
> > + server->rsize,server->wsize,server->rpages,
> > + nfs_ra_factor,server->rpages * nfs_ra_factor);
> > + server->backing_dev_info.ra_pages = server->rpages * nfs_ra_factor;
> >
> > if (server->wsize > max_rpc_payload)
> > server->wsize = max_rpc_payload;
> > diff -urp linux-2.6.27-rc6-git4/fs/nfs/inode.c
> > linux-2.6.27-rc6-git4-nfs_ra/fs/nfs/inode.c
> > --- linux-2.6.27-rc6-git4/fs/nfs/inode.c 2008-09-17 11:35:21.000000000
> > +0200
> > +++ linux-2.6.27-rc6-git4-nfs_ra/fs/nfs/inode.c 2008-09-17 11:45:09.000000000
> > +0200
> > @@ -53,6 +53,8 @@
> >
> > /* Default is to see 64-bit inode numbers */
> > static int enable_ino64 = NFS_64_BIT_INODE_NUMBERS_ENABLED;
> > +static unsigned int ra_factor __read_mostly = NFS_MAX_READAHEAD;
> > +
> >
> > static void nfs_invalidate_inode(struct inode *);
> > static int nfs_update_inode(struct inode *, struct nfs_fattr *);
> > @@ -1347,6 +1349,12 @@ static int __init init_nfs_fs(void)
> > #endif
> > if ((err = register_nfs_fs()) != 0)
> > goto out;
> > +
> > + if (ra_factor < 1 || ra_factor > NFS_MAX_READAHEAD)
> > + nfs_ra_factor = NFS_MAX_READAHEAD;
> > + else
> > + nfs_ra_factor = ra_factor;
> > +
>
> So, I think that this is not necessary because it is done ( ... I hope) by the
> proc_dointvec_minmax handler. It is correct?
>
That is of course true if the tunable is changed via the /proc interface. The code above handles the module parameter, which is not governed by the minmax handler.
Cheers
Martin
next reply other threads:[~2008-09-17 16:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 16:15 Martin Knoblauch [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-21 12:53 [RFC][Resend] Make NFS-Client readahead tunable Martin Knoblauch
2008-09-21 12:50 Martin Knoblauch
[not found] ` <968192.84087.qm-f6uctMgKLEavuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-21 13:53 ` Chuck Lever
2008-09-18 11:53 Martin Knoblauch
[not found] ` <688309.69831.qm-lSXk2nNw7cevuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-18 18:24 ` Chuck Lever
[not found] ` <76bd70e30809181124t78c0d574gaed5702095c02921-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-18 19:03 ` Peter Staubach
2008-09-18 9:32 Martin Knoblauch
2008-09-18 8:38 Martin Knoblauch
[not found] ` <124712.40022.qm-n7KXdZBPtPqvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-18 8:47 ` Andrew Morton
2008-09-18 8:57 ` Greg Banks
2008-09-18 13:20 ` Peter Zijlstra
2008-09-18 8:19 Martin Knoblauch
[not found] ` <136998.55258.qm-RqHyxEpxwZuvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-18 8:45 ` Greg Banks
2008-09-18 7:42 Martin Knoblauch
[not found] ` <418380.19358.qm-1+WuAixcP4WvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-18 8:18 ` Andrew Morton
2008-09-17 17:01 Martin Knoblauch
2008-09-17 16:23 Martin Knoblauch
[not found] ` <804604.40886.qm-f6uctMgKLEavuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-17 16:43 ` Chuck Lever
2008-09-17 16:10 Martin Knoblauch
2008-09-17 16:03 Martin Knoblauch
2008-09-17 13:42 Michael Trimarchi
2008-09-17 13:27 Martin Knoblauch
2008-09-17 13:25 Martin Knoblauch
[not found] ` <995475.95604.qm-f6uctMgKLEavuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-17 15:31 ` Jim Rees
2008-09-17 13:19 Michael Trimarchi
2008-09-17 13:06 Martin Knoblauch
[not found] ` <997439.5560.qm-VAEUvbQToQWvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-09-17 13:21 ` Jim Rees
2008-09-17 14:06 ` Peter Staubach
2008-09-17 15:41 ` Chuck Lever
2008-09-18 1:42 ` Greg Banks
[not found] ` <48D1B21E.3060509-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2008-09-18 3:13 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=690463.13660.qm@web32606.mail.mud.yahoo.com \
--to=knobi-ys4e+72pfw0hfhg+jk9f0w@public.gmane.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trimarchimichael-whZMOeQn8C0@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox