On 2019-03-25 15:17, Cy Schubert wrote:
> In message <3398a21318a4a6715609004d569d20de86f1dc7a.ca...@freebsd.org>
> , Ian Le
> pore writes:
>> On Mon, 2019-03-25 at 05:42 -0700, Cy Schubert wrote:
>>> In message <201903250746.x2p7kkuu019...@repo.freebsd.org>, Allan
>>> Jude 
>>> writes:
>>>> Author: allanjude
>>>> Date: Mon Mar 25 07:46:20 2019
>>>> New Revision: 345491
>>>> URL: https://svnweb.freebsd.org/changeset/base/345491
>>>>
>>>> Log:
>>>>   Make TMPFS_PAGES_MINRESERVED a kernel option
>>>>   
>>>>   TMPFS_PAGES_MINRESERVED controls how much memory is reserved for
>>>> the system
>>>>   and not used by tmpfs.
>>>>   
>>>>   On very small memory systems, the default value may be too high
>>>> and this
>>>>   prevents these small memory systems from using reroot, which is
>>>> required
>>>>   for them to install firmware updates.
>>>>   
>>>>   Submitted by:    Hiroki Mori <yamori...@yahoo.co.jp>
>>>>   Reviewed by:     mizhka
>>>>   Differential Revision:   https://reviews.freebsd.org/D13583
>>>>
>>>> Modified:
>>>>   head/sys/conf/options
>>>>   head/sys/fs/tmpfs/tmpfs.h
>>>>   head/sys/fs/tmpfs/tmpfs_vfsops.c
>>>>   head/sys/modules/tmpfs/Makefile
>>>>
>>>
>>> Would this be a good candidate for a sysctl or tuneable?
>>>
>>
>> The small-memory embedded systems most affected by this often don't use
>> loader(8) at all, so tunables aren't an option, and sysctl may be too
>> late.  No reason it can't be a tunable as well, but it'll probably need
>> to remain as a compile-time option too.
> 
> Yes, I should have been more clear. I can see using a tuneable on a 2 
> GB or 4 GB Intel pandaboard. (Perfect for a firewall or a UPS 
> management station.)
> 
> 

The default value is 4MB. For any system with more than 32mb of memory,
it shouldn't require tuning, although you may wish to prevent tmpfs from
using all but 4mb of your memory.

I think the only case where you definitely need to override the default,
is when you have so little memory that you can't create a tmpfs image of
your root filesystem to reroot into, as is the case on many tiny router
boards, with 8-32mb of ram, and 4-16mb of flash.

-- 
Allan Jude

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to