Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2013 18:47:52 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Orit Moskovich <oritm@mellanox.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: preemptive kernel
Message-ID:  <20130526154752.GT3047@kib.kiev.ua>
In-Reply-To: <981733489AB3BD4DB24B48340F53E0A55B0D5590@MTLDAG01.mtl.com>
References:  <981733489AB3BD4DB24B48340F53E0A55B0D5590@MTLDAG01.mtl.com>

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

--w2cbNFf0kg38sO0z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, May 26, 2013 at 11:09:03AM +0000, Orit Moskovich wrote:
> Can a filter routine preempt another filter routine? And can an interrupt thread (or a filter routine) preempt another ithread?

Filter handler borrows the context from the thread executed at the
time of the interrupt.  At least on x86 (i.e. i386 and amd64) interrupt
handlers are executed with the interrupts disabled.  So the filter
cannot interrupt another filter.

Interrupt threads are executed with the interrupts enabled. So if an
interrupt is delivered to the CPU while the CPU executed the ithread,
the filter 'preempts' the ithread by executing in its context.  For
the same reason, if the interrupt delivered causes a higher-priority
thread become ready to run, then the new runnable thread could preempt
the interrupt thread according to the priority, affinity and other
factors considered by a scheduler.

--w2cbNFf0kg38sO0z
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJRoi6nAAoJEJDCuSvBvK1Bky0P/AsWMdAScPYAkRfmVNL/1nae
AZvawnUlLzekMXs2LwDQzkMiHvHMXSrDuIer3LY5tCY46C56JJ7rVhbZBYuYn0qC
ciaA5QNxLQinufRAyU2kfUPMjBnh7hl2cPaz2kDULHCiyAQmFkgp6UM5+AHKOFFR
TELiMIk5fG6/MWlRB5esz8tnVnlSxt/jPstH2Gp9jB752GPgFicPBulM2xOEP6S1
oKkw153jdhrNJFS/xAzYB5u+aFCzJYQfvRU0Go0cVgSplZPyzqAZqG+QTwdN1sFR
0v5UD112cZ7QeI2uP7SHbzgkYeq+sPacJS1hPH9Wl5bQqAjTn1s4uiYxJTfwMAd9
xSvr7SAiHy43lBUGP8kTZtVmQl5OSAhccviaSjSHQWKGmlWbSB/ExCc89TdAgxlo
8D1QQEzfrXRQ/vdmONOsmXO92yRslDghgBypuQullKF23BT6keU4LwmsYZCuJ/2M
ZllRTKeNmMwspiZQEv9JQTkA8kKZfC8d/u/0NTtinscM9ZmLjk1Sr/eq3dP0poM0
HL+GDhsBdamdhGPipaL4jk2Bnf+A9+J782h9CEedIKSKq8w95uKjGkJHw0CSBbDe
ZvTTDuAxtvyGLpOrgijVumO2ogBjkRejVA3R4A/pHKZm/91SmU/ybU0VTsYCzfUb
aDANes1Af1pj06ZbRkDP
=p8O7
-----END PGP SIGNATURE-----

--w2cbNFf0kg38sO0z--



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