Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2011 12:36:13 -0400
From:      Attilio Rao <attilio@freebsd.org>
To:        mdf@freebsd.org
Cc:        src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, Andriy Gapon <avg@freebsd.org>, svn-src-user@freebsd.org
Subject:   Re: svn commit: r222060 - in user/avg/xcpu/sys: kern sys
Message-ID:  <BANLkTik=O7_n81B16qqWhzsc_X_nG6s2TA@mail.gmail.com>
In-Reply-To: <BANLkTi=X_zddoAbZfXqtuzLut16zCVi%2BTg@mail.gmail.com>
References:  <201105181508.p4IF8UoS096841@svn.freebsd.org> <20110518182441.GB2273@garage.freebsd.pl> <4DD4243C.4070301@FreeBSD.org> <BANLkTikAnB-3XbvDwGHgyqyJquH9BhqzOQ@mail.gmail.com> <4DDD13F9.5040800@FreeBSD.org> <4DDE7555.7090500@FreeBSD.org> <BANLkTim_zEDPANqZTpyYdOKqDaPEc8EhVg@mail.gmail.com> <4DDE7A36.2050104@FreeBSD.org> <BANLkTi=X_zddoAbZfXqtuzLut16zCVi%2BTg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/5/26  <mdf@freebsd.org>:
> On Thu, May 26, 2011 at 9:05 AM, Andriy Gapon <avg@freebsd.org> wrote:
>> on 26/05/2011 18:46 mdf@FreeBSD.org said the following:
>>> A per-thread flag is needed as long as other CPUs can be running or
>>> even just the scheduler on the remaining CPU. =C2=A0So I would thing th=
at
>>> flag needs to be checked until the system has been massaged to the
>>> state you describe above.
>>
>> I am not sure that I understand your reasoning if you mean that the flag=
 needs to
>> be checked in TD_IS_INPANIC. =C2=A0That is, right now there is no TD_IS_=
INPANIC and
>> things work after panic to a certain degree. =C2=A0I do not intend to im=
prove that
>> degree and just want to keep an option to revert to the current state of=
 matters.
>> When TD_IS_INPANIC is introduced and stop_cpus_on_panic=3D=3D1, then the=
re will be
>> only one thread left running after panic, that will be the thread that c=
alled
>> panic, checking TDF_INPANIC just doesn't add anything.
>
> Won't the scheduler still run even if other CPUs are halted? =C2=A0Is the=
re
> any intent to prevent switching to another thread? =C2=A0(I suppose this
> could be achieved by setting td_critnest++ and wouldn't require a
> flag).
>

I think it is much better to disable interrupts, in order to prevent
fast handlers "preemption" rather than just avoiding to be
rescheduled.

Attilio


--=20
Peace can only be achieved by understanding - A. Einstein



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