Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Mar 2015 12:59:04 -0800
From:      Rui Paulo <rpaulo@me.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Andriy Gapon <avg@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: RFC: Simplfying hyperthreading distinctions
Message-ID:  <145BFBD8-7092-42F3-BCF3-5CBB78D15893@me.com>
In-Reply-To: <1640664.8z9mx3EOQs@ralph.baldwin.cx>
References:  <1640664.8z9mx3EOQs@ralph.baldwin.cx>

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

> On 6 Mar 2015, at 12:44, John Baldwin <jhb@FreeBSD.org> wrote:
>=20
> Currently we go out of our way a bit to distinguish Pentium4-era=20
> hyperthreading from more recent ("modern") hyperthreading.  I suspect =
that=20
> this distinction probably results in confusion more than anything =
else. =20
> Intel's documentation does not make near as broad a distinction as far =
as I=20
> can tell.  Both types of SMT are called hyperthreading in the SDM for =
example. =20
> However, we have the astonishing behavior that=20
> 'machdep.hyperthreading_allowed' only affects "old" hyperthreads, but =
not=20
> "new" ones.  We also try to be overly cute in our dmesg output by =
using HTT=20
> for "old" hyperthreading, and SMT for "new" hyperthreading.

Yes, this is annoying.

>  I propose the=20
> following changes to simplify things a bit:
>=20
>  1) Call both "old" and "new" hyperthreading HTT in dmesg.

Yes.

>  2) Change machdep.hyperthreading_allowed to apply to both new and old =
HTT.
>     However, doing this means a POLA violation in that we would now =
disable
>     modern HTT by default.  Balanced against re-enabling "old" HTT by =
default
>     on an increasingly-shrinking pool of old hardware, I think the =
better
>     approach here would be to also change the default to allow HTT.

I think that's ok given 3).

>  3) Possibly add a different knob (or change the behavior of
>     machdep.hyperthreading_allowed) to still bring up hyperthreads, =
but leave
>     them out of the default cpuset (set 1).  This would allow those =
threads
>     to be re-enabled dynamically at runtime by adjusting the mask on =
set 1.
>     The original htt settings back when 'hyperthreading_allowed' was
>     introduced actually permitted this via by adjusting =
'machdep.hlt_cpus' at
>     runtime.

Sounds good.

Thanks,
--
Rui Paulo






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?145BFBD8-7092-42F3-BCF3-5CBB78D15893>