]> git.hungrycats.org Git - linux/commit
[PATCH] tmpfs 6/6: percentile sizing of tmpfs
authorAndrew Morton <akpm@digeo.com>
Thu, 3 Apr 2003 00:27:33 +0000 (16:27 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Apr 2003 00:27:33 +0000 (16:27 -0800)
commit65aaef27b69a7f93586e1e299a066bcf31ba8b91
tree3c224731ff50917130eea842b92ba0e7bb54b37f
parent548ac1def5c7e55ef312d7aa320dbd890a040d1f
[PATCH] tmpfs 6/6: percentile sizing of tmpfs

From: CaT <cat@zip.com.au>

What this patch does is allow you to specify the max amount of memory tmpfs
can use as a percentage of available real ram.  This (in my eyes) is useful
so that you do not have to remember to change the setting if you want
something other then 50% and some of your ram goes.

Hugh redid the arithmetic to not overflow at 4GB; the particular order of
lines helps RH's gcc-2.96-110 not to get confused in the do_div.  2.5 can use
totalram_pages.  Update mount options in tmpfs Doc.

There's an argument that the percentage should be of ram+swap, that's what
Christoph originally intended.  But we set the default at 50% of ram only, so
I believe it's more consistent to follow that precedent.
Documentation/filesystems/tmpfs.txt
mm/shmem.c