From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 21 16:24:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A938106564A for ; Mon, 21 Apr 2008 16:24:46 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx1.freebsd.org (Postfix) with ESMTP id 797A38FC12 for ; Mon, 21 Apr 2008 16:24:46 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 21 Apr 2008 09:23:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,690,1199692800"; d="scan'208,217";a="319505444" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by fmsmga002.fm.intel.com with ESMTP; 21 Apr 2008 09:10:46 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 21 Apr 2008 09:12:23 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 21 Apr 2008 09:12:21 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: thread and ksegrp priorities Thread-Index: AcijynpQj5os5b8rSYKi74ER/wahgg== From: "Murty, Ravi" To: X-OriginalArrivalTime: 21 Apr 2008 16:12:23.0273 (UTC) FILETIME=[7B9DF590:01C8A3CA] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: thread and ksegrp priorities X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2008 16:24:46 -0000 Hello All, =20 I am working on the 6.2 FreeBSD code base and has a couple of simple questions. The thread structure defines two priority fields "td_base_pri" and "td_priority" while a ksegrp defines "kg_user_pri" and "kg_pri_class".=20 =20 1. Since a ksegrp can have multiple "process scope" threads, how is kg_user_pri used and how is it related to td_base_pri and td_priority? 2. What is the difference between td_base_pri and td_priority? 3. If kg_user_pri changes, does it mean that the priority of all threads that are part of the ksegrp change? =20 It appears that these things change when a thread returns to user mode (returns to normal user priority), when returning from a sleep (priority boost) etc. =20 Thanks Ravi =20