Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/fs/tmpfs



On 9/13/05, YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost> wrote:
> > > Log Message:
> > > - don't waste/leak kva.
> > > - implement getpages/putpages.  support mmap.
> > > - eliminate meaningless memcpy.
> > > - ubcify.
> >
> > After all these changes, truncating a file does not release memory
> > any more, if I'm not mistaken.  Is this true and if so, could you please
> > fix it?  (That was part of the "logic" in tmpfs_reg_resize doing the
> > page unmap.)
> 
> it seems that i forgot to commit a change.  (uvm_aobj.c rev.1.71)
> now it should be fixed.  thanks for pointing.

This doesn't seem to work, yet.  If I do, for example:

dd if=/dev/zero of=foo bs=1m count=30

and check swap usage with top(1), I see my testing machine has used
around 25mb.  Now, if I do a "echo a >foo", thus truncating the file, the
swap usage doesn't vary.  But if I remove it, it really goes away, and
top(1) only shows 2mb used.

Trying to do a better test, I tried creating three files, 30mb each.
Two of them will be created correctly, but the third one won't fit in
memory nor swap, so it will remain in the file system with a size of
around 10mb.  After the creation of these three files, I truncate one
of them to zero length (or any other length) and try to recreate the
file that got cut on the first attempt; and there is not enough memory
to create it, even though given the file usage there must be (as I've
just "deleted" a 30mb file).

-- 
Julio M. Merino Vidal <jmmv84%gmail.com@localhost>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/



Home | Main Index | Thread Index | Old Index