Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 18:12:13 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Matthew Fleming <mdf@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r255439 - head/sys/dev/cpuctl
Message-ID:  <20130910151213.GX41229@kib.kiev.ua>
In-Reply-To: <20130910150954.GW41229@kib.kiev.ua>
References:  <201309100517.r8A5HrHY020358@svn.freebsd.org> <CAMBSHm89omtP=G6eHCHbx%2BXOxHKSgEB4qFBpYvE7=7CAriQfvg@mail.gmail.com> <20130910150954.GW41229@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--e/XVYMvPYdBe01jS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 10, 2013 at 06:09:54PM +0300, Konstantin Belousov wrote:
> On Tue, Sep 10, 2013 at 07:29:51AM -0700, Matthew Fleming wrote:
> > I don't know exactly what the stock malloc(9) will return, but memguard=
(9),
> > under its default mode with vm.memguard.options having MG_GUARD_AROUND =
set
> > will align the returned pointer to only 16 bytes.  When I added that
> > feature I almost made it 8 bytes, but I think I saw that uma(9) had a
> > 16-byte alignment so I preserved that.  I.e., this code does still work
> > with malloc(9) and memguard(9).
> >=20
> > But why does this need 16 byte alignment?  Especially when one of the
> > comments says 4-byte alignment?
>=20
> The comment about 4-byte alignment is for VIA.
>=20
> For Intel, citing the IA-32 SDM rev. 47, Vol.3, 9.11.6 Microcode Update L=
oader:
> "The microcode update data requires a 16-byte boundary alignment".
> I.e. CPU takes the linear address of the buffer, which must be aligned
> on 16 bytes.

Sent too fast.  There is at least one more instance of the same use,
see bus_dmamem_alloc() in sys/x86/x86/busdma_machdep.c.

--e/XVYMvPYdBe01jS
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQIcBAEBAgAGBQJSLzbMAAoJEJDCuSvBvK1BmmEP/j1wqPDvwOPdhFnRlmsZttCs
qBf2lDvodZ86Yr5vfpiaS8DYMI0eRruRiAKctfE5QK02+7E0Eo1Bpwr0SoeJP7pt
8eYJB7LRbM+UDgHncaYRO0WyZ1mhc1HdDHbUbqCO1oQSpvcfFzqTmk3EjawCBPk7
lqLWiKsbcsrnqsA8gHzPA/s2ekWn2ffkbxWJiNxyEAPJmgJr8/wFxa7NZl5QkdSb
WhQa3AvIerT3vrrNDBRd8dOmZU5LEp7xkbzU8X8c9XUxrednMD9ozzkvpnxyMCKr
HST9Ulhv3RtIErFLKHe+t1jeJkb24l8B0Us+8nRSm+2+cYKs3l/aBmYxRZIpr2hT
mpmMcyp/201s924S40SBVI5O94IHMralKwZqG0t6pFX2WlHfrvQH4lGDCM57kAgR
+l06z9OffS9j72Lu0tjd9IzgcBP8JjQtcXQ52zC1DW1ix6tKalMzJK1vCwlzvdQd
eaV4DuPzRrK1kzbweH0jwW2lnSEtTGYeQGm0SNJz4sDYDTbX5QToqSYFhUmsgva7
Vocde215hdLVYKw0nII2O30Whi1eQz7VNcdvsoJYpDMlPu2sQHIKQg6/W6RzAxII
5FcuAMK5ZJrYpQOPs8CF7mjd1BRbQF6Tk8tcSxOfB3jXtV1GjlL0WYxbbtW+LrIV
63CgwmHijWbyeDFhMYLw
=jUQ9
-----END PGP SIGNATURE-----

--e/XVYMvPYdBe01jS--



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