From owner-freebsd-arch@FreeBSD.ORG Mon Dec 13 00:30:13 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5996B1065694; Mon, 13 Dec 2010 00:30:13 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB548FC08; Mon, 13 Dec 2010 00:30:12 +0000 (UTC) Received: from verizon.net ([unknown] [173.54.27.21]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LDC000BO9A6LHL1@vms173007.mailsrvcs.net>; Sun, 12 Dec 2010 17:30:06 -0600 (CST) Sender: root Message-id: <4D052B3C.29454AC@verizon.net> Date: Sun, 12 Dec 2010 15:06:20 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-version: 1.0 To: John Baldwin References: <201012101050.45214.jhb@freebsd.org> Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Cc: arch@freebsd.org Subject: Re: Realtime thread priorities X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 00:30:13 -0000 John Baldwin wrote: > > The current layout breaks up the global thread priority space (0 - 255) into a > couple of bands: > > 0 - 63 : interrupt threads > 64 - 127 : kernel sleep priorities (PSOCK, etc.) > 128 - 159 : real-time user threads (rtprio) > 160 - 223 : time-sharing user threads > 224 - 255 : idle threads (idprio and kernel idle procs) > > If we decide to change the behavior I see two possible fixes: > > 1) (easy) just move the real-time priority range above the kernel sleep > priority range Would not this cause a priority inversion when an RT process enters the kernel mode? -SB