Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2017 12:49:40 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        Raphael Kubo da Costa <rakuco@FreeBSD.org>, freebsd-current@FreeBSD.org, cem@FreeBSD.org
Subject:   Re: r323412: Panic on boot (slab->us_keg == keg)
Message-ID:  <b9b7e891-ee4a-4fb0-4ffa-2a720f656278@yandex.ru>
In-Reply-To: <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com>
References:  <86vakp1vsq.fsf@orwell> <fded3e63-bb68-3fc5-e080-f7ed9aea00bc@yandex.ru> <8ccad12b-3d31-6478-7884-c003bc314990@yandex.ru> <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--G5V9vbTI34htHxukuqKoFK7ajU0sREctu
Content-Type: multipart/mixed; boundary="Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB";
 protected-headers="v1"
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Mark Johnston <markj@FreeBSD.org>
Cc: Raphael Kubo da Costa <rakuco@FreeBSD.org>, freebsd-current@FreeBSD.org,
 cem@FreeBSD.org
Message-ID: <b9b7e891-ee4a-4fb0-4ffa-2a720f656278@yandex.ru>
Subject: Re: r323412: Panic on boot (slab->us_keg == keg)
References: <86vakp1vsq.fsf@orwell>
 <fded3e63-bb68-3fc5-e080-f7ed9aea00bc@yandex.ru>
 <8ccad12b-3d31-6478-7884-c003bc314990@yandex.ru>
 <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com>
In-Reply-To: <20170912033523.GA89424@wkstn-mjohnston.west.isilon.com>

--Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 12.09.2017 06:35, Mark Johnston wrote:
>> [...]
>> FreeBSD/SMP: 2 package(s) x 14 core(s) x 2 hardware threads
>>
>> Also I determined that it can successfully boot with disabled
>> hyper-threading.
>=20
> After the change to CACHE_LINE_SIZE, we have
> sizeof(struct uma_zone) =3D=3D 448 and sizeof(struct uma_cache) =3D=3D =
64. With
> 56 CPUs, we therefore need 4032 bytes per UMA zone, plus 80 bytes for
> the slab header - "internal" zones always keep the slab header in the
> slab itself. That's slightly larger than one page, but the UMA zone
> zone's keg will have uk_ppera =3D=3D 1. So, when allocating slabzone,
> keg_alloc_slab() will call startup_alloc(uk_ppera * PAGE_SIZE), which
> will allocate 4096 bytes for a structure that is 4032 + 80 =3D 4112 byt=
es
> in size.
>=20
> I think the bug is that keg_large_init() doesn't take
> sizeof(struct uma_slab) into account when setting uk_ppera for the keg.=

> In particular, the bug isn't specific to the bootup process; it only
> affects internal zones with an item size in the range [4016, 4096].
>=20
> The patch below should fix this - could you give it a try?
Hi Mark,

I can confirm that it fixes this panic. Thanks!

--=20
WBR, Andrey V. Elsukov


--Bw8kjKHhLbttQXDWuqmtJMXTPcff9vOrB--

--G5V9vbTI34htHxukuqKoFK7ajU0sREctu
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlm3rbUACgkQAcXqBBDI
oXo6dAgAvGvwI4gHA0L+tgpcoyrZvecoG/0O8y3czubmKy4tLre+Qz2mDwfB3kHP
H7Iz3sJOfSeEREHSPvfhxY3zKwFj+sMvRhY4cdfXg/HPo+eLh3EZFK1fR18Y/2Vu
goi1UNiB/ujvTpmdUUDTeebUyKjH99dqb/u7bXHPgvXmxtYhAlQg45WTibYBhfzp
LBl2hsumA/PZ68FU+0FV2u9u24OaO5Hgxk5wXfWf/1OFUKNziYe7XQI7tXL7vPsV
nycHNEe7zkJXBFv5h8hD17vL/ZN+F4dzShYgwnz66G2//O/0pYuHetn/sBK7Jtcj
xHzVOb/HIJTNo8Qp4iYwED/5wX1bcg==
=6Z7G
-----END PGP SIGNATURE-----

--G5V9vbTI34htHxukuqKoFK7ajU0sREctu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b9b7e891-ee4a-4fb0-4ffa-2a720f656278>