Re: PATCH: allow percentile size of tmpfs (2.5.66 / 2.4.20-pre2)

CaT (cat@zip.com.au)
Thu, 3 Apr 2003 15:35:43 +1000


On Wed, Apr 02, 2003 at 07:33:05PM +0200, Christoph Rohland wrote:
> On Thu, 3 Apr 2003, cat@zip.com.au wrote:
> > Sounds like what you want is a dynamically resizing tmpfs based on
> > the amount of memory (ram+swap) available. That's a much bigger
> > goose to fry I believe.
> >
> > Now, even if the percentile patch took into account swap, you'd
> > still need to remount tmpfs in order to get it to take into account
> > of any swap you add on the fly.
>
> No, that's why I said you would need hooks into swapon and
> swapoff. Then it would adjust on the fly. Else it's useless from the

Ahh. Missed that. Sorry.

> usability point of view. With these hooks it's easy to do.

Yes. That'd solve that issue. You'd have it resize itself to your fixed
% of the new totals.

> >> could add much saner defaults for /dev/shm or even use it for /tmp.
> >
> > I use it for /tmp now just fine. :) It's sized at 63% of 256MB of
> > RAM.
>
> And I have set it to 400MB on a 256MB box just fine ;-) How could you

:)

> do these two setup generally without knowing your hardware. 20MB tmpfs

If you want to take swap into account you still can't but then this
patch changes nothing for you in either case. You'd still specify 400MB
or (now) 156%.

> on a 40MB machine can be a desaster btw.

It can be, depending on what you do with it, obviously. That's not an
argument against this and I'm not actually against it myself. I just
want the current patch in cos at least it's a step in the right
direction, it's simple and it ups the usability of tmpfs (and it stops
me from having to patch my kernel each and every time ;).

Personally I'd like a flag to set wether or not to take it into account
because it introduces a 2nd potential variable number into the equation
and I don't want my setting depending on swap suddenly dropping off Gods
green, somewhat polluted and messy, earth. I'd be in the same boat I was
in before the patch.

-- 
"Other countries of course, bear the same risk. But there's no doubt his
hatred is mainly directed at us. After all this is the guy who tried to
kill my dad."
        - George W. Bush Jr, Leader of the United States Regime
          September 26, 2002 (from a political fundraiser in Houston, Texas)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/