From owner-freebsd-arch@FreeBSD.ORG Thu Jan 3 16:12:26 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 32EE842C; Thu, 3 Jan 2013 16:12:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id 4875F192; Thu, 3 Jan 2013 16:12:24 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fj20so8223223lab.38 for ; Thu, 03 Jan 2013 08:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Ph9x+C/HqilLh+giuX2YFQtzManr/VaLiqQB1Y/XUuA=; b=cn7hfXcSx2tfRJOyNVaZxZxUQr62OM29cZRc+20Z8lsortEHEpc3O0v6F/KdH6SPhF EfKysg2/bmPoaAzkbcZPXk5LfevG2KebC4gbRIZVEh5W2L8O0hIaMCrE6x0ScscLY/d4 p8l+U6cDUtmT8jHOSb4tlLXtNEK54wWv9FLz5mo+IYa0xuQU8Dt5GJ+7d1A3iVxYFRQF yfOl6Fp8+ee7Hnd5EuKnbjmF4if7tcy7sMAiV2YdY+NC76yq1gLARnD0Wzqq0Hz5P9sV oEm4Zlws7Ee08bZPSnmyjone6sze43OS+Bo489yXyhi4M0YmQ6IrMqAN4a6WU7/IbNSf pFoQ== X-Received: by 10.112.38.72 with SMTP id e8mr15978420lbk.123.1357229543977; Thu, 03 Jan 2013 08:12:23 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id hc20sm18566188lab.11.2013.01.03.08.12.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Jan 2013 08:12:21 -0800 (PST) Sender: Alexander Motin Message-ID: <50E5ADE1.4020104@FreeBSD.org> Date: Thu, 03 Jan 2013 18:12:17 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Bruce Evans Subject: Re: [RFC/RFT] calloutng References: <20121225232126.GA47692@alchemy.franken.de> <50DB4EFE.2020600@FreeBSD.org> <1356909223.54953.74.camel@revolution.hippie.lan> <20121231061735.GA5866@onelab2.iet.unipi.it> <50E16637.9070501@FreeBSD.org> <20130102105730.GA42542@onelab2.iet.unipi.it> <50E418EA.7030801@FreeBSD.org> <20130102122743.GA43241@onelab2.iet.unipi.it> <20130102162206.GA45701@onelab2.iet.unipi.it> <20130102170934.GA82219@kib.kiev.ua> <50E4A902.4050307@FreeBSD.org> <20130103232413.O947@besplex.bde.org> In-Reply-To: <20130103232413.O947@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Italiano , Ian Lepore , Marius Strobl , FreeBSD Current , freebsd-arch@FreeBSD.org, Konstantin Belousov X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2013 16:12:26 -0000 On 03.01.2013 16:45, Bruce Evans wrote: > On Wed, 2 Jan 2013, Alexander Motin wrote: >> More important for scheduling fairness thread's CPU percentage is also >> based on hardclock() and hiding from it was trivial before, since all >> sleep primitives were strictly aligned to hardclock(). Now it is >> slightly less trivial, since this alignment was removed and user-level >> APIs provide no easy way to enforce it. > > %cpu is actually based on statclock(), and not even used for scheduling. May be for SCHED_4BSD, but not for SCHED_ULE. In SCHED_ULE both %cpu and thread priority based on the same ts_ticks counter, that is based on hardclock() as time source. Interactivity calculation uses alike logic and uses the same time source. -- Alexander Motin