From owner-freebsd-arch@FreeBSD.ORG Sun Jul 1 16:32:38 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08E2A1065670 for ; Sun, 1 Jul 2012 16:32:38 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id D1B758FC0C for ; Sun, 1 Jul 2012 16:32:37 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so7140226pbb.13 for ; Sun, 01 Jul 2012 09:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=91AFT6xXPPD9vcWxW//1Ht6lH/aU5QV7REcC9A/J+gk=; b=BNRd2vtyPrFVGOLA85oIQhVIBOvgFWRXL1MyRBo2/o95uxl4NUTwq84iGChZlp4uyH +zMkdrXHCb4Jt0wNP3DmP7bSlH3dK8ISJqJtRrEpRCRYyCT3ZQQXoAMvn6Y7GjNtqciL sarJUx8m1w1ziraIoUhjWsAvMcl4QacLeD8raftHX3DIdKPohjlUEWyoE27mmikEQ0Kz ibhaHUzFmMxJ8GMtFV1viXn6FEv1sovaATMjHbsCYxVfiffNQr7GB1ybUfTlRXZUtEBN aszRFrxvcwT1crxXTQ6iYd0bi8VQJNmcXIW6+iRnND+HgbliYamE1F0V1xlQQ59qiPSa QUaA== MIME-Version: 1.0 Received: by 10.68.228.102 with SMTP id sh6mr23031334pbc.134.1341160357596; Sun, 01 Jul 2012 09:32:37 -0700 (PDT) Received: by 10.66.82.201 with HTTP; Sun, 1 Jul 2012 09:32:37 -0700 (PDT) In-Reply-To: References: Date: Sun, 1 Jul 2012 18:32:37 +0200 Message-ID: From: Davide Italiano To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [RFC/RFT] callout(9): major changes 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: Sun, 01 Jul 2012 16:32:38 -0000 On Sun, Jul 1, 2012 at 3:32 PM, Davide Italiano wrote: > Howdy. > As part of the Google Summer of Code project, in the last weeks, I > worked on some changes in the callout(9) subsystem, under the > mentorship of Alexander Motin (mav@). > The projects aims to adapt the callout() backend in order to exploit > better precision allowed by the recently introducted eventtimers(4/9) > subsystem. > A patch may be found here: http://people.freebsd.org/~davide/callout_patch.diff > If you want to try the code may be found in FreeBSD svn projects/ > repository: http://svnweb.freebsd.org/base/projects/calloutng/ > At the time of writing, the code cannot be considered ready for hit > the tree, some work is still missing, but some goals have been > reached. In particular: > > - The callout(9) backend was completely switched from a tick-based > approach to a tickless one. > - The code has been integrated with the eventtimers > - An experimental new KPI has been introduced so that timeouts for > callout_* may be specified also in terms of bintime other than ticks, > as previously allowed > - Support for execution of callouts from hw interrupt context has been > introduced > - In order to prove effectiveness of the approach, some consumers (in > particular sleep/pool/select) have been ported to the new KPI, and the > changes have been microbenchmarked > - Some experiments of event aggregation have been done, as well as the > definition of new KPI in which consumers may specify granularity at > which events may be aggregated. > > For my benchmarks I used the same program luigi@ has recently used, > even though results are a bit different > (http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012413.html). > Just a bit of results: > Sequential usleep(): > This graph shows on the x-axes the timeout se and on y-axes the real > sleep time (in the range [1;1000]). Timeout is increased sequentially > by one unit every iteration. Green line represents the "ideal" case, > Red line represents results after the changes made. > http://people.freebsd.org/~davide/sequential_new.png > Random sleep(): > same as before, but in this case I plotted the delta among the > expected sleep time and the actual sleep time. > http://people.freebsd.org/~davide/delta_random.png > Random select(): > http://people.freebsd.org/~davide/delta_random.png Sorry, this is the correct link for random select() results: http://people.freebsd.org/~davide/random_new.png > > I'd like to have some feedback/comments on the implementative choices > I've done, as well as on the new defined KPI or future directions. > If you've any question, feel free to ask. > > Davide Davide