Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2012 21:02:34 +0100
From:      rank1seeker@gmail.com
To:        "RW" <rwmaillists@googlemail.com>, hackers@freebsd.org
Subject:   Re: BUG: REL 9.0 - MD malloc of custom sector size
Message-ID:  <20120320.200234.909.1@DOMY-PC>
In-Reply-To: <20120318134156.61d6db61@gumby.homeunix.com>
References:  <20120318.130139.003.1@DOMY-PC> <20120318134156.61d6db61@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=0D=0AFrom: RW =
<rwmaillists@googlemail.com>=0D=0ATo: =
freebsd-hackers@freebsd.org=0D=0ADate: Sun, 18 Mar 2012 13:41:56 =
+0000=0D=0ASubject: Re: BUG: REL 9.0 - MD malloc of custom sector =
size=0D=0A=0D=0A> On Sun, 18 Mar 2012 14:01:39 +0100=0D=0A> =
rank1seeker@gmail.com wrote:=0D=0A> =0D=0A> > man mdconfig=0D=0A> > =
----=0D=0A> > -S sectorsize to use for malloc backed device=0D=0A> > =
----=0D=0A> > =0D=0A> > I want to create MD device, with sector size of 4 =
Kb.=0D=0A> > =0D=0A> > It is CRITICAL to NOT append ANY suffixes, when =
specifing size, via=0D=0A> > '-s' flag in order to use sectors, to set =
it's size. # mdconfig -a -t=0D=0A> > malloc -S 4096 -s 32768=0D=0A> > =
=0D=0A> > This should created dev of 128 Mb in size.=0D=0A> > 32768 =
sectors * 4 Kb each =3D 131072 Kb =3D 128 Mb=0D=0A> > Not! It created dev =
of 16 Mb in size, because sector size remained at=0D=0A> > 512 =
bytes.=0D=0A> =0D=0A> =0D=0A> From mdconfig 8=0D=0A> =0D=0A> "Size is the =
number of 512 byte sectors unless ..."=0D=0A> =0D=0A> Looks to me like =
it's doing what it said it would.=0D=0A> =0D=0A> BTW are you sure you =
want to use  "-t malloc". This keeps the files=0D=0A> (even the deleted =
ones) in memory unconditionally  while ordinary=0D=0A> process memory is =
paged-out. =0D=0A> =0D=0A=0D=0AMy MAIN reason to hassle with MD here, is =
to test a custom sector size.=0D=0AThis can be done with '-S' flag only, =
in order to set sectorsize of /dev/md*=0D=0ABut as it is malloc ONLY =
option/flag, I must combine it with '-t malloc'=0D=0A=0D=0AThen I've =
defined it's size by amount of sectors and as I've redefined size of 1 =
sector, it simply isn't doing it's task.=0D=0ABecause it enforces =
hardcoded size of 512 bytes, so documentation should not misleadingly =
refer to sector in any way, but a hardcode value of 0.5 Kb, no matter of =
real/actual sector size is.=0D=0A=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120320.200234.909.1>