Subject: Re: free space (was /dev) on tmpfs problem
To: None <>
From: David Young <>
List: tech-kern
Date: 11/25/2005 18:28:20
On Mon, Nov 14, 2005 at 02:25:19PM -0800, Jason Thorpe wrote:
> On Nov 13, 2005, at 4:59 PM, YAMAMOTO Takashi wrote:
> >>So there are two problems:
> >> 1. tmpfs is not reporting free space sanely for df
> >> 2. tmpfs is apparently not allowing itself to compete with file  
> >>cache
> >>    for free-memory resources.
> >
> >yes, and my suggestted patch (mandate -s) solves both of them.
> I totally support yamt's patch ... mandating -s is a reasonable  
> solution.

I don't see why a solution cannot satisfy everyone by giving us the

        1 Set no size: the tmpfs will grow without bound, reclaiming
          memory from file cache to fulfill tmpfs demand.
        2 Set a size with -s in terms of a percentage of RAM.
        3 Set a size with -s in terms of blocks, megabytes, ....

I prefer #1.  Dan Carosone sent me a patch for #1 that beautifully solves
the problem that began this discussion.  I would like to see it committed.

If #2 was available, I would certainly use it in some circumstances.
I have a hunch that a hybrid of #2 and #3, where the maximum size is
either min(P%, Q megs) or max(P%, Q megs), will be more useful than
either a percentage or a megabyte size, alone.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933