From owner-freebsd-hackers@FreeBSD.ORG Sun May 26 15:47:57 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2792390F for ; Sun, 26 May 2013 15:47:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 93C6FA2 for ; Sun, 26 May 2013 15:47:56 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r4QFlqST082136; Sun, 26 May 2013 18:47:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r4QFlqST082136 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r4QFlqaY082135; Sun, 26 May 2013 18:47:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 26 May 2013 18:47:52 +0300 From: Konstantin Belousov To: Orit Moskovich Subject: Re: preemptive kernel Message-ID: <20130526154752.GT3047@kib.kiev.ua> References: <981733489AB3BD4DB24B48340F53E0A55B0D5590@MTLDAG01.mtl.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w2cbNFf0kg38sO0z" Content-Disposition: inline In-Reply-To: <981733489AB3BD4DB24B48340F53E0A55B0D5590@MTLDAG01.mtl.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 15:47:57 -0000 --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--