From owner-soc-status@FreeBSD.ORG Mon Aug 13 15:08:37 2012 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9DCE106564A for ; Mon, 13 Aug 2012 15:08:37 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 91C4A8FC17 for ; Mon, 13 Aug 2012 15:08:37 +0000 (UTC) Received: by vcbgb22 with SMTP id gb22so4617706vcb.13 for ; Mon, 13 Aug 2012 08:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=D7FY2LCYCUCvFveKwmD9wUbxYD0lDnXOiko3tXQPdMM=; b=mv7JrqpEfmbjb5vp1G1vAIHmvXgyNJPwmBLJFvjlSNJYn6N45i4LtuCA5Atj/iOHq9 nupybjsZ5LJ/upW0/b8I+qenqOuulKdADW7XTTcamM1jVpaMgcq2tlskR90aeWWi6je4 VqrLt+bSKv04/3c3/SgV034H4cZI8uunS8hlpyYYNPdgDa9Yq7N3Y8Yi4DxpxhaZpVo7 Fdx+w5pijbqyS1nzILhhWajqLmXvszKNVVZxT0Nm44k0WHacx21U69R9iKqLe5YgPqJQ FxbJI9UrY2J1V+rx5KpOIp9Cx4LtESwvhK7hTtsztSema8JJiMcVlS3mnFzruXsiCfMW ywzQ== MIME-Version: 1.0 Received: by 10.58.221.135 with SMTP id qe7mr9650101vec.23.1344870516733; Mon, 13 Aug 2012 08:08:36 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.58.66.198 with HTTP; Mon, 13 Aug 2012 08:08:36 -0700 (PDT) Date: Mon, 13 Aug 2012 17:08:36 +0200 X-Google-Sender-Auth: zbBfhfUb2ohZzg9_1GXXq5VXBRA Message-ID: From: Davide Italiano To: soc-status@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re-engineer the wheel: a rejuvenation of BSD callout(9) and timer facilities - report weeks 9-12 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2012 15:08:38 -0000 Howdy, This last week I'm mainly focusing on writing some microbenchmarks in order to profile the performance of the work I've recently done, as well as discussing on the ML about the current status of my project Here's my report for the last week. Week 9: - Introduce tsleep_bt() function as part of the sleep(9) KPI. Use it in kern_nanosleep() so that we don't need to duplicate _sleep() code. - General code polish and bugfixing - Start implementing properly direct callout execution (until now it was a bit rudimentary) so that it may have all the functionalities that normal callout has (for example, migration) Week 10: - Fix a LOR deadlock dropping the callout lock while executing the handler directly from hardware interrupt context. - Finish adding migration support for callouts which runs from hw interrupt context. - Refactor a couple of comments to reflect the new world order. - Implement statistics for direct execution callouts, providing a set of new SYSCTLs. Week 11: - Modify the KTR code so that the size of the circular event buffer is not anymore constrained to be a power of two (merged to HEAD) - Investigate about the causes of a panic in early boot deterministically reproducible also on HEAD if the value of KTR_ENTRIES set is over a given threshold (depending on the amount of RAM available). Increasing the value of NKPT (number of kernel page tables) in pmap code acts as workaround, but, still I'm discussing with Alan Cox (alc@) a proper solution to address the problem. This is not directly related to my work so I don't consider it as a priority. - Remove a spurious brace which cause build fail in case BCE_DEBUG option is turned on. (merged to HEAD). Week 12: - Some optimizations: simplify the logic of softclock() removing a check which is likely to be false in most of the cases, after recent changes. Also, remove an unneeded and duplicated bitwise and operation. Optimize a bit callout_process() routine avoiding some calculations if they're redundant. - Remove some unneeded checks. For non-direct callouts softclock_call_cc() is only called for callouts on cc_expireq queue, and all the callouts there have CALLOUT_PROCESSED flag. Similarly, for direct callouts the aforementioned function is called for callouts on the wheel, which haven't CALLOUT_PROCESS flag set. - General code polishment and bugfixing. - Start writing amicrobenchmark in order to profile the performance of the last three months changes. It may be found here: http://people.freebsd.org/~davide/test_cycles_sleep.c A diff between HEAD and the branch, applicable without conflict to recent HEAD revision, may be found here: http://people.freebsd.org/~davide/callout_patch.2.diff We're mostly at the end of the program, thanks for your attention, folks. Davide