public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 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: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
* Disabling Symbolic Link Content Caching in NFS Client
@ 2003-05-28 11:09 Vivek Goyal
  2003-06-02 20:37 ` [NFS] " Ion Badulescu
  0 siblings, 1 reply; 8+ messages in thread
From: Vivek Goyal @ 2003-05-28 11:09 UTC (permalink / raw)
  To: linux-kernel, nfs
  Cc: trond.myklebust, indou.takao, Vivek Goyal, ionut, ezk, viro,
	davem

Hi,

We are planning to implement a set of Kernel Tunable Parameters and one
of these parameters is nfs_symlink_caching for disabling/enabling
symbolic link content caching in NFS client. Unices like Solaris have
this feature implemented.

Existing NFS client implementation in Linux performs symbolic link
content caching by default. There is no provision for disabling this
caching either at mount time or through kernel tuning mechanism.

This caching mechanism leads to problems in following two conditions.

a. File is modified in server without updating the modification
time-stamp.
b. Granularity of the time-stamp is too large.

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.

We are considering following design strategy to implement the parameter.

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

2. Change NFS client code as follows.

A. If caching is enabled.
There are no changes. Existing caching mechanism remains intact.

B. If caching is disabled.

	i. While serving a symlink read request (nfs_getlink ()) don't
look for the requested page in page cache (read_cache_page()). Instead
always allocate a page frame (page_cache_alloc_cold()) and send a
READLINK request to the server. This allocated page frame is not added
to the cache and hence remains local to the thread of execution and is
not visible to other execution threads.

	ii. Upon receiving the response from the server, pass the data
to the user space and free the page frame. 

Please let us know your comments/opinion on this design.

Thanks and Regards
Vivek


^ 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