public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-05-28 11:09 Vivek Goyal
@ 2003-06-02 20:37 ` Ion Badulescu
  2003-06-02 21:48   ` Trond Myklebust
  2003-06-02 21:56   ` Trond Myklebust
  0 siblings, 2 replies; 8+ messages in thread
From: Ion Badulescu @ 2003-06-02 20:37 UTC (permalink / raw)
  To: Vivek Goyal
  Cc: trond.myklebust, indou.takao, ezk, viro, davem, nfs, linux-kernel

On Wed, 28 May 2003 16:39:36 +0530, Vivek Goyal <vivek.goyal@wipro.com> wrote:

> I was following previous discussions in the mailing list and found that
> caching mechanism affected hlfsd behavior. It looks like the problem was
> resolved by updating mtime on every access. But still caching will lead
> to a problem if two accesses are taking place in same jiffy.

Yes, because the the nfs client is broken in this respect. noac 
should mean noac, but the nfs client will still cache attributes if the 
second access happens within the same jiffy as the previous access which 
updated the attribute cache.

Replacing a couple of time_after() calls with time_after_eq() calls 
fixes the issue, at least for hlfsd. Of course, running with noac might 
be very much unacceptable if all you want is to avoid caching symlinks.

> We are considering following design strategy to implement the parameter.
> 
> 1. Make nfs_symlink_caching dynamically tunable using /proc and sysctl
> interface.

No. Do it on a per-mount basis, like the other OS's do.

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-06-02 20:37 ` [NFS] " Ion Badulescu
@ 2003-06-02 21:48   ` Trond Myklebust
  2003-06-02 21:56   ` Trond Myklebust
  1 sibling, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2003-06-02 21:48 UTC (permalink / raw)
  To: Ion Badulescu
  Cc: Vivek Goyal, indou.takao, ezk, viro, davem, nfs, linux-kernel

>>>>> " " == Ion Badulescu <ionut@badula.org> writes:

    >> 1. Make nfs_symlink_caching dynamically tunable using /proc and
    >> sysctl interface.

     > No. Do it on a per-mount basis, like the other OS's do.

As I said to Vivek in a private mail, it would be very nice to see
if this could be done by replacing hlfsd with namespace groups.

Al Viro has already done all the VFS layer work, which should be ready
and working in existing 2.4.20 and 2.5.x kernels. What is missing is
userland support for doing a CLONE_NEWNS, and then mounting the user's
home directory, mailspool,.... in the appropriate locations at login
time.

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-06-02 20:37 ` [NFS] " Ion Badulescu
  2003-06-02 21:48   ` Trond Myklebust
@ 2003-06-02 21:56   ` Trond Myklebust
  1 sibling, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2003-06-02 21:56 UTC (permalink / raw)
  To: Ion Badulescu
  Cc: Vivek Goyal, indou.takao, ezk, viro, davem, nfs, linux-kernel

>>>>> " " == Ion Badulescu <ionut@badula.org> writes:

     > Replacing a couple of time_after() calls with time_after_eq()
     > calls fixes the issue, at least for hlfsd.

BTW: the above does not suffice to eliminate all races. Two processes
owned by different users may still end up waiting on the same call to
nfs_symlink_filler() no matter how often you choose to update the
metadata.

Cheers,
 Trond

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client
@ 2003-06-03 13:20 Vivek Goyal
  2003-06-03 16:05 ` Trond Myklebust
  0 siblings, 1 reply; 8+ messages in thread
From: Vivek Goyal @ 2003-06-03 13:20 UTC (permalink / raw)
  To: trond.myklebust, Ion Badulescu
  Cc: viro, davem, ezk, indou.takao, nfs, linux-kernel, Vivek Goyal

> >>>>> " " == Ion Badulescu <ionut@badula.org> writes:
>     >> 1. Make nfs_symlink_caching dynamically tunable using /proc and
>     >> sysctl interface.
>      > No. Do it on a per-mount basis, like the other OS's do.
> 
> As I said to Vivek in a private mail, it would be very nice to see
> if this could be done by replacing hlfsd with namespace groups.
> 
> Al Viro has already done all the VFS layer work, which should be ready
> and working in existing 2.4.20 and 2.5.x kernels. What is missing is
> userland support for doing a CLONE_NEWNS, and then mounting the user's
> home directory, mailspool,.... in the appropriate locations at login
> time.

Yes, this could be a better way to tackle hlfsd issues.

<snip from Trond's mail>

>I'm not overly keen on this proposal. IMHO we want to *maximize*
caching >rather than reduce it. This is particularly important as the
speed of >networks etc. starts to approach that of the PCI bus on the
server.

<end of snip>

You are right. But our idea is to provide an option to disable/enable
caching based on the nature of intended application.

With this, Linux will have enhanced flexibility in NFS client like other
operating systems. For example.

1. Solaris provides dynamically tunable parameter "nfs_do_symlink_cache"
for enabling/disabling symlink caching.

2. UNIX and IRIX provide 'symttl' mount option for enabling/disabling
symbolic link content caching in NFS client.

Kindly let me know your comments.

Regards,
Vivek


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client
@ 2003-06-03 13:33 Edward Hibbert
  2003-06-03 14:46 ` Frank van Maarseveen
  2003-06-03 16:08 ` Trond Myklebust
  0 siblings, 2 replies; 8+ messages in thread
From: Edward Hibbert @ 2003-06-03 13:33 UTC (permalink / raw)
  To: 'Vivek Goyal', trond.myklebust, Ion Badulescu
  Cc: viro, davem, ezk, indou.takao, nfs, linux-kernel



-----Original Message-----
From: Vivek Goyal [mailto:vivek.goyal@wipro.com]
Sent: Tuesday, June 03, 2003 2:21 PM
To: trond.myklebust@fys.uio.no; Ion Badulescu
Cc: viro@math.psu.edu; davem@redhat.com; ezk@cs.sunysb.edu;
indou.takao@jp.fujitsu.com; nfs@lists.sourceforge.net;
linux-kernel@vger.kernel.org; Vivek Goyal
Subject: RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client

<snip>

You are right. But our idea is to provide an option to disable/enable
caching based on the nature of intended application.

[EH] Hear hear :-).  

Our application consists of a number of machines collaborating on a shared
database over NFS.  We therefore require the ability to force data to be
sync'd from the client to the backend - and at the moment we do this by
disabling caching completely, via the noac option and acquiring and
releasing non-exclusive locks round io calls.

Any improvements in the granularity of control over NFS client-side caching
would be very valuable to us.

Regards,

Edward Hibbert
Internet Applications Group
Data Connection Ltd
Tel:	+44 131 662 1212		Fax:	+44 131 662 1345
Email:	eh@dataconnection.com	Web:	http://www.dataconnection.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-06-03 13:33 [NFS] Disabling Symbolic Link Content Caching in NFS Client Edward Hibbert
@ 2003-06-03 14:46 ` Frank van Maarseveen
  2003-06-03 16:08 ` Trond Myklebust
  1 sibling, 0 replies; 8+ messages in thread
From: Frank van Maarseveen @ 2003-06-03 14:46 UTC (permalink / raw)
  To: nfs, linux-kernel; +Cc: Edward Hibbert

On Tue, Jun 03, 2003 at 02:33:45PM +0100, Edward Hibbert wrote:
> 
> Our application consists of a number of machines collaborating on a shared
> database over NFS.  We therefore require the ability to force data to be
> sync'd from the client to the backend - and at the moment we do this by
> disabling caching completely, via the noac option and acquiring and
> releasing non-exclusive locks round io calls.
> 
> Any improvements in the granularity of control over NFS client-side caching
> would be very valuable to us.

To disable ac for a single directory for a certain amount of time, see

	http://web.inter.nl.net/users/fvm/nfs-noac/2.4.20-noac-timeout.patch
	http://web.inter.nl.net/users/fvm/nfs-noac/readme:

This patch implements /proc/sys/net/nfs/noac-timeout

When a nonzero value is written, suspend atribute caching for the current
working directory and one level of files inside for the specified number
of seconds. Attribute caching will automatically be enabled when the time
elapses. Writing a zero re-enables attribute caching as well. Reading
yields the number of remaining seconds attribute caching will be disabled.


Maybe an NFS specific ioctl would be cleaner. But the above patch can be
used even from simple scripts.

-- 
Frank

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-06-03 13:20 Vivek Goyal
@ 2003-06-03 16:05 ` Trond Myklebust
  0 siblings, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2003-06-03 16:05 UTC (permalink / raw)
  To: Vivek Goyal
  Cc: Ion Badulescu, viro, davem, ezk, indou.takao, nfs, linux-kernel

>>>>> " " == Vivek Goyal <vivek.goyal@wipro.com> writes:

     > You are right. But our idea is to provide an option to
     > disable/enable caching based on the nature of intended
     > application.

Apart from hlfsd, which applications actually depend on symlinks not
being cached?

     > With this, Linux will have enhanced flexibility in NFS client
     > like other operating systems. For example.

Again: Do you have any concrete examples of programs that need this
functionality, and that cannot be replaced?

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client
  2003-06-03 13:33 [NFS] Disabling Symbolic Link Content Caching in NFS Client Edward Hibbert
  2003-06-03 14:46 ` Frank van Maarseveen
@ 2003-06-03 16:08 ` Trond Myklebust
  1 sibling, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2003-06-03 16:08 UTC (permalink / raw)
  To: Edward Hibbert
  Cc: 'Vivek Goyal', trond.myklebust, Ion Badulescu, viro,
	davem, ezk, indou.takao, nfs, linux-kernel

>>>>> " " == Edward Hibbert <EH@dataconnection.com> writes:

     > Our application consists of a number of machines collaborating
     > on a shared database over NFS.  We therefore require the
     > ability to force data to be sync'd from the client to the
     > backend - and at the moment we do this by disabling caching
     > completely, via the noac option and acquiring and releasing
     > non-exclusive locks round io calls.

What does this have to do with symlinks?

...and why can't you use DIRECTIO? The above sort of application is
exactly what it is being introduced for.

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-06-03 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-03 13:33 [NFS] Disabling Symbolic Link Content Caching in NFS Client Edward Hibbert
2003-06-03 14:46 ` Frank van Maarseveen
2003-06-03 16:08 ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2003-06-03 13:20 Vivek Goyal
2003-06-03 16:05 ` Trond Myklebust
2003-05-28 11:09 Vivek Goyal
2003-06-02 20:37 ` [NFS] " Ion Badulescu
2003-06-02 21:48   ` Trond Myklebust
2003-06-02 21:56   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox