mfs/mdconfig under RELENG_5: malloc vs swap-backed

Giorgos Keramidas keramida at linux.gr
Mon Aug 1 17:02:43 GMT 2005


On 2005-08-01 20:50, Dmitry Morozovsky <marck at rinet.ru> wrote:
>On Mon, 1 Aug 2005, Jo?o Carlos Mendes Luis wrote:
>>>> can anyone please point me why mdconfig method for tmpmfs  is
>>>> malloc-backed instead of swap-backed, and it is hardcoded into
>>>> rc.subr?
>>>> Are swap-backed file systems so inefficient? If no, why not move -M to
>>>> /etc/defaultc/rc.conf so admin can override this behaviour?
>>>
>>> Diskless systems may not have swap - the default is required as is.
>>> Don't know about beeing hardcoded.
>>
>> It is hardcoded at /etc/rc.subr:
>>
>> # Provide a function for normalizing the mounting of memory
>> # filesystems.  This should allow the rest of the code here to remain
>> # as close as possible between 5-current and 4-stable.
>> #   $1 = size
>> #   $2 = mount point
>> #   $3 = (optional) extra mdmfs flags
>> mount_md() {
>>         if [ -n "$3" ]; then
>>                 flags="$3"
>>         fi
>>         /sbin/mdmfs $flags -s $1 -M md $2
>> }
>>
>> I would prefer it to be configurable, too.
>
> I did contacted keramida@ yesterday, and he seems to be happy with my
> proposed patch. So, just wait for it to be committed.

Yes, I like the change.  I'm not an src-committer, so it is just an
informed opinion by someone who eats shell scripts for breakfast, so
feel free to ask the freebsd-rc at freebsd.org guys too :-)

- Giorgos



More information about the freebsd-hackers mailing list