From owner-freebsd-current@FreeBSD.ORG Sat Dec 15 16:55:58 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94BE0B43; Sat, 15 Dec 2012 16:55:58 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx1.freebsd.org (Postfix) with ESMTP id C63868FC12; Sat, 15 Dec 2012 16:55:57 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id 12so1892022wgh.31 for ; Sat, 15 Dec 2012 08:55:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=eoauxAZqa62RhIFNayvyKCrYwtGy06dZzfaaGxohpwM=; b=NRZVmX0JUw8fnTMsl8B3ofM4BBz4tyWl6sJv8DzcGtAmYGHF5ic+yOkLLvx/or3rUE b3Bn7lt3J3ZsJZTTWheUyQeW6XJWi43Jretz/XLj68I79EU+D5A+6/p3YpxZkDe8cfrJ PecX3se7d5G5KJB+CZdnnkk41B9UhNEpaRZdm0XgyTSRULHVKtyxTpkdnjBMAthOWF9Q wVWAPQueyU0wSHKdN41Q74XPNb39cECbDWrcQJ8OyP/rTP4lywp+MheWJF16aIeu2ILP boVFaBNmNs2kkBvebAVUWQGtljQMNE+8ITc7Fx0NJhrmJ6pVUKd0hImsWa7OqQL37Vyf IaNA== Received: by 10.181.13.75 with SMTP id ew11mr8133537wid.9.1355590556876; Sat, 15 Dec 2012 08:55:56 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id t17sm3281287wiv.6.2012.12.15.08.55.54 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Dec 2012 08:55:56 -0800 (PST) Sender: Alexander Motin Message-ID: <50CCAB99.4040308@FreeBSD.org> Date: Sat, 15 Dec 2012 18:55:53 +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: FreeBSD Current , freebsd-arch@freebsd.org Subject: Re: [RFC/RFT] calloutng Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Italiano X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 16:55:58 -0000 Hi. I'm sorry to interrupt review, but as usual good ideas came during the final testing, causing another round. :) Here is updated patch for HEAD, that includes several new changes: http://people.freebsd.org/~mav/calloutng_12_15.patch The new changes are: -- Precision and event aggregation code was reworked. Instead of previous -prec/+prec representation, precision is now single-sided -- -0/+prec. It allowed to significantly improve precision on long time intervals for APIs which imply that event should not happen before the specified time. Depending on CPU activity, mistake for long time intervals now will never be more then 1-500ms, even if specified precision allows more. -- Some minor optimizations were made to reduce callout overhead and latency by 1.5-2us. Now on Core2Duo amd64 system with LAPIC eventtimer and TSC timecounter usleep(1) call from user-level executes in just 5-6us, instead of 7-8us before. Now it can do 180K cycles per second on single CPU with only partial CPU load. -- Number of kernel subsystems (dcons, syscons, yarrow, led, atkbd, setrlimit) were modified to reduce number of interrupts, also with event aggregation by explicit specification of the acceptable events precision. Now my Core2Duo test system has only 30 interrupts per second in idle. If not remaining syscons events, it could easily be 15. My IvyBridge ultrabook first time in its history shown 5.5 hours of battery time with full screen brightness and 10 hours with lid closed. -- Some kernel functions were added to make KPIs more complete. I've successfully tested this patch on amd64 and arm. -- Alexander Motin