2004-04-19 20:45:53

by FabF

[permalink] [raw]
Subject: [PATCH 2.6.6rc1-mm1] NFS sysctlized - readahead tunable

Trond,

Here is a patch to have nfs to sysctl although Maxreadahead is tunable
under nfs init only.Do you have an idea and do you think it's acceptable
to make it applicable directly i.e. would it be readahead reduction
tolerant ?

btw, is this inode.c an issue for V4 ?

Regards,
Fabian


Attachments:
nfsctl.diff (3.62 kB)

2004-04-19 21:08:32

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH 2.6.6rc1-mm1] NFS sysctlized - readahead tunable

On Mon, 2004-04-19 at 16:49, Fabian Frederick wrote:
> Trond,
>
> Here is a patch to have nfs to sysctl although Maxreadahead is tunable
> under nfs init only.Do you have an idea and do you think it's acceptable
> to make it applicable directly i.e. would it be readahead reduction
> tolerant ?
>
> btw, is this inode.c an issue for V4 ?
>

The lockd module has already registered the name /proc/sys/fs/nfs, so
your scheme will end up corrupting the sysctl list. Sorting out the
/proc namespace issue is the main reason why this hasn't been done
before.
Personally, I'd prefer renaming the lockd module into
/proc/sys/fs/lockd, but it will have to be up to Andrew to decide
whether he wants to allow that during a stable kernel cycle.

Also note that putting initializers into a ".h" file is horrible style.
".h" files should be for forward declarations only.

Cheers,
Trond

2004-04-19 23:21:34

by FabF

[permalink] [raw]
Subject: Re: [PATCH 2.6.6rc1-mm1] NFS sysctlized - readahead tunable

On Mon, 2004-04-19 at 23:08, Trond Myklebust wrote:
> On Mon, 2004-04-19 at 16:49, Fabian Frederick wrote:
> > Trond,
> >
> > Here is a patch to have nfs to sysctl although Maxreadahead is tunable
> > under nfs init only.Do you have an idea and do you think it's acceptable
> > to make it applicable directly i.e. would it be readahead reduction
> > tolerant ?
> >
> > btw, is this inode.c an issue for V4 ?
> >
>
> The lockd module has already registered the name /proc/sys/fs/nfs, so
> your scheme will end up corrupting the sysctl list. Sorting out the
> /proc namespace issue is the main reason why this hasn't been done
> before.
> Personally, I'd prefer renaming the lockd module into
> /proc/sys/fs/lockd, but it will have to be up to Andrew to decide
> whether he wants to allow that during a stable kernel cycle.
AFAICS one of the first sysctl concepts is to be redundancy tolerant.
If you take fs for instance, it's being declared here and there.
It means "if it doens't exist yet, we create it with mode (555) else
go cycle to the sub-branch (fs-nfs....) btw, we have a register(fs) so
no problem for me.Lockd has to do with nfs so it should be preserved at
the same place IMHO.

>
> Also note that putting initializers into a ".h" file is horrible style.
> ".h" files should be for forward declarations only.
I used both ntfs, coda fs scheme having in mind independant sysctl
registering in forthcoming releases.

But hey ! "I'm an absolute beginner" :) Maybe you and Andrew can tell me
what to do with this ugly patch ;) e.g. no sysctl.h -> include stuff in
inode.c ...

Regards,
FabianF


2004-04-20 00:01:03

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH 2.6.6rc1-mm1] NFS sysctlized - readahead tunable

On Mon, 2004-04-19 at 17:29, Fabian Frederick wrote:
> But hey ! "I'm an absolute beginner" :) Maybe you and Andrew can tell me
> what to do with this ugly patch ;) e.g. no sysctl.h -> include stuff in
> inode.c ...

Yes.

2004-04-20 06:08:46

by FabF

[permalink] [raw]
Subject: Re: [PATCH 2.6.6rc1-mm1] NFS sysctlized - readahead tunable

On Tue, 2004-04-20 at 02:01, Trond Myklebust wrote:
> On Mon, 2004-04-19 at 17:29, Fabian Frederick wrote:
> > But hey ! "I'm an absolute beginner" :) Maybe you and Andrew can tell me
> > what to do with this ugly patch ;) e.g. no sysctl.h -> include stuff in
> > inode.c ...
>
> Yes.
This 'superbeast in time' patch against same patchset:
-Type fixes
-All in inode.c

Regards,
Fabian
>


Attachments:
nfsctl2.diff (3.16 kB)