From owner-freebsd-threads@FreeBSD.ORG Wed Jun 18 06:08:14 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD98337B401 for ; Wed, 18 Jun 2003 06:08:14 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0E2643FB1 for ; Wed, 18 Jun 2003 06:08:13 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5ID8DXh028967; Wed, 18 Jun 2003 09:08:13 -0400 (EDT) Date: Wed, 18 Jun 2003 09:08:13 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Sergey Kosyakov In-Reply-To: <20030618115817.99930.qmail@web12404.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: The first kse_create call X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2003 13:08:15 -0000 On Wed, 18 Jun 2003, Sergey Kosyakov wrote: > > --- Daniel Eischen wrote: > > > but I never got upcall on the first kse. When I create another KSE > > (and > > > another KSE group) I immediatelly get the upcall for this (second) > > > > This is the correct behavior. The first kse_create() does not > > generate an immediate upcall. It only flags the current context > > as being a KSE. An upcall in this initial KSE will take place > > under the same conditions as other KSEs (KSE mailbox has a thread > > mailbox pointer and thread blocks, quantum expires, etc). > > How I can set the quantum? Is km_quantum from kse_mailbox the right > place? I did not get any upcall when I set it. You have to have both a thread mailbox pointer set in the KSE mailbox and you have to expire the quantum. The quantum is system plus user time. It is not real time (e.g., a nanosleep() does not expire quantum while it sleeps). quantum is in usecs. > Also found, that "ps" and "top" do not show CPU utilization at least > when one KSE with mailbox exists (5.1-RELEASE): > 1036 p4 R+ 0:00.00 ./kt > > Process 1036 runs "printf" in loop. I don't know about ps and top; there have been recent changes to reflect more accurate display of KSE processes. -- Dan Eischen