mfs/mdconfig under RELENG_5: malloc vs swap-backed (fwd)

Dmitry Morozovsky marck at FreeBSD.org
Mon Aug 1 21:54:11 GMT 2005


Dear colleagues,

any takers? Diff (too simple, surely) attached.

Sincerely,
D.Marck                                        [DM5020, MCK-RIPE, DM3-RIPN]
---------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at FreeBSD.org ***
---------------------------------------------------------------------------

---------- Forwarded message ----------
Date: Mon, 1 Aug 2005 21:43:54 +0400 (MSD)
From: Dmitry Morozovsky <marck at rinet.ru>
To: Giorgos Keramidas <keramida at linux.gr>
Cc: freebsd-hackers at freebsd.org, ticso at cicely.de,
    "[iso-8859-7] Jo?o Carlos Mendes Luis" <jonny at jonny.eng.br>
Subject: Re: mfs/mdconfig under RELENG_5: malloc vs swap-backed

On Mon, 1 Aug 2005, Giorgos Keramidas wrote:

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

Hmm. 

marck at woozle:/lh/src.current> whodid etc/rc.subr
etc/rc.subr:
          20 mtm
           6 gordon
           3 keramida
           2 obrien
           2 cperciva
           1 schweikh
           1 des
           1 brooks

I supposed you can commit there, as you already did it 3 times, and I can't see 
any Approved: lines in CVS logs ;-P

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------
_______________________________________________
freebsd-hackers at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
-------------- next part --------------
Index: etc/rc.subr
===================================================================
RCS file: /home/ncvs/src/etc/rc.subr,v
retrieving revision 1.31.2.1
diff -u -r1.31.2.1 rc.subr
--- etc/rc.subr	17 Jan 2005 11:51:00 -0000	1.31.2.1
+++ etc/rc.subr	31 Jul 2005 07:06:10 -0000
@@ -1294,7 +1294,7 @@
 	if [ -n "$3" ]; then
 		flags="$3"
 	fi
-	/sbin/mdmfs $flags -s $1 -M md $2
+	/sbin/mdmfs $flags -s $1 md $2
 }
 
 fi
Index: etc/defaults/rc.conf
===================================================================
RCS file: /home/ncvs/src/etc/defaults/rc.conf,v
retrieving revision 1.212.2.18
diff -u -r1.212.2.18 rc.conf
--- etc/defaults/rc.conf	21 Jul 2005 09:35:32 -0000	1.212.2.18
+++ etc/defaults/rc.conf	31 Jul 2005 07:06:10 -0000
@@ -44,10 +44,10 @@
 removable_interfaces=""	# Removable network interfaces for /etc/pccard_ether.
 tmpmfs="AUTO"		# Set to YES to always create an mfs /tmp, NO to never
 tmpsize="20m"		# Size of mfs /tmp if created
-tmpmfs_flags="-S"	# Extra mdmfs options for the mfs /tmp
+tmpmfs_flags="-S -M"	# Extra mdmfs options for the mfs /tmp
 varmfs="AUTO"		# Set to YES to always create an mfs /var, NO to never
 varsize="32m"		# Size of mfs /var if created
-varmfs_flags="-S"	# Extra mount options for the mfs /var
+varmfs_flags="-S -M"	# Extra mount options for the mfs /var
 populate_var="AUTO"	# Set to YES to always (re)populate /var, NO to never
 local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.
 script_name_sep=" "	# Change if your startup scripts' names contain spaces


More information about the freebsd-rc mailing list