Re: shared anonymous memory

Richard Jones (rjones@orchestream.com)
Mon, 12 Jan 1998 18:03:53 +0000


Eric W. Biederman wrote:
> RJ> But, in fact, you can get a similar effect by mapping
> RJ> from a common file. If the last process to map the
> RJ> file also unlink()s it, then the inode will be automatically
> RJ> cleaned up when the last process using the file exits (or
> RJ> closes the fd).
>
> But there is the significant question of how efficient that file
> actually is. Ages ago in the really inefficient NFS area, this
> approach was apparently abandoned by dosemu because if the backing
> store was NFS the performance was just too slow.

But the point is that if we check inode->i_nlink and
it's 0, then we will probably never write those blocks
out to the backing store (unless we run out of memory),
so the performance of NFS isn't an issue.

Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> wrote:
> inode->i_links == 0 ?

(i_nlink?) I'll have to take a look at the 2.1 code
tonight to see if it already checks this when it does
a sync, or if it's possible to patch it ...

Rich.

-- 
Richard Jones  rjones@orchestream.com Tel: +44 171 460 6141 Fax: .. 4461
Orchestream Ltd.  262a Fulham Rd.  London  SW10 9EL.  "you'll write in
PGP: www.four11.com     telegraphic, or you won't write at all" [Céline]
Copyright © 1998 Richard W.M. Jones