Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2011 09:53:34 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Attilio Rao <attilio@freebsd.org>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Andriy Gapon <avg@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: [rfc] remove hlt_cpus et al sysctls and related code
Message-ID:  <BBCD9D8C-FCAF-4DE3-9F66-4B65AAABE67B@gmail.com>
In-Reply-To: <BANLkTinVGrLoAOS_ZQ1YVB_Fw1cvf5kHyA@mail.gmail.com>
References:  <4DD3F662.9040603@FreeBSD.org> <BANLkTikOTe9ut3GFx0bhOernKandRGLhPg@mail.gmail.com> <BANLkTinVGrLoAOS_ZQ1YVB_Fw1cvf5kHyA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 18, 2011, at 9:49 AM, Attilio Rao <attilio@freebsd.org> wrote:

> 2011/5/18 Garrett Cooper <yanegomi@gmail.com>:
>> On Wed, May 18, 2011 at 9:40 AM, Andriy Gapon <avg@freebsd.org> wrote:
>>>=20
>>> I think that it is a well known fact that currently we do not have any s=
upport for
>>> dynamically offlining processors.  Yet, we have some code that looks lik=
e it does
>>> provide that support and even provides a user interface to supposedly do=
 that.
>>>=20
>>> What we don't currently do specifically:
>>> - rebinding interrupts away from an offlined processor
>>> - updating relevant cpu sets and masks
>>> - protecting the above for concurrent access
>>> - moving threads away from an offlined processor
>>> - notifying potentially interested parties
>>> - maybe more...
>>>=20
>>> The code has been in this shape for a long while and I would dare to say=
 that it
>>> never really worked, not in "production ready" sense anyway.
>>> An example of troubles caused by using that code can be found e.g. in th=
e
>>> followups to the following PR:
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D145385
>>> And also discussed here:
>>> http://thread.gmane.org/gmane.os.freebsd.stable/74462/focus=3D74510
>>>=20
>>> I think that there already have been a proposal to remove the systcls an=
d the
>>> code.  I would like to re-submit that proposal.
>>> Removing that code would:
>>> 1) prevent users from hurting themselves by executing broken code
>>> 2) potentially make things easier for largeSMP project
>>>=20
>>> Once we grow correct code for offlining CPUs, then we could re-introduce=
 the
>>> sysctls without any problems.
>>> While the offlining code doesn't seem terribly hard to develop, it's a b=
ig piece
>>> of work and requires time and effort.
>>=20
>>    What would be nice too (even though it might not be possible) is
>> to make this more MI than it is today (i.e. sysctls that work for
>> amd64, sparc64, etc), but that might be a pipe dream.
>> Thanks!
>> -Garrett
>=20
> That is actually the purpose.  We should have a real online/offline
> system for hotplugging CPUs, not only tied to x86 hyperthreading.
> The htt specific parts are mostly hacks that don't take into account
> all the necessary handover for it.
>=20
> Andryi, I'll look into the patch asap, but I'm in favor of this change for=
 sure.

    We use this internally at work still with a software config that uses 4B=
SD so as long as there is an equivalent tunable, that's good enough for us m=
oving forward.
Thanks!
-Garrett=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BBCD9D8C-FCAF-4DE3-9F66-4B65AAABE67B>