Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2010 13:21:46 +0200
From:      Attilio Rao <attilio@freebsd.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r211176 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <AANLkTikk3m-=5W7TVV5C-XM4AnwS1LuAi7GGEeP0B9dV@mail.gmail.com>
In-Reply-To: <20100811105739.GJ2396@deviant.kiev.zoral.com.ua>
References:  <201008111051.o7BApRp4028538@svn.freebsd.org> <20100811105739.GJ2396@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/8/11 Kostik Belousov <kostikbel@gmail.com>:
> On Wed, Aug 11, 2010 at 10:51:27AM +0000, Attilio Rao wrote:
>> Author: attilio
>> Date: Wed Aug 11 10:51:27 2010
>> New Revision: 211176
>> URL: http://svn.freebsd.org/changeset/base/211176
>>
>> Log:
>> =C2=A0 IPI handlers may run generally with interrupts disabled because t=
hey
>> =C2=A0 are served via an interrupt gate.
>>
>> =C2=A0 However, that doesn't explicitly prevent preemption and thread
>> =C2=A0 migration thus scheduler pinning may be necessary in some handler=
s.
>> =C2=A0 Fix that.
>
> How the preemption is supposed to happen ? Aside from the explicit
> calls to mi_switch() from e.g. critical_exit().

IIRC it should be hardclock() willing to schedule the softclock(). It
is the critical_exit() in the thread_unlock() that may trigger it
(sorry for not digging more, it was a while back that I hacked this
part, but I guess you can verify on your own).
We already have other points within the kernel that take care of
dealing with preemption/migration like lapic_handle_timer(), for
example.

Thanks,
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?AANLkTikk3m-=5W7TVV5C-XM4AnwS1LuAi7GGEeP0B9dV>