From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 13:16:38 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EC59A78 for ; Mon, 10 Mar 2014 13:16:38 +0000 (UTC) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB3ED8AC for ; Mon, 10 Mar 2014 13:16:37 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id t61so8710615wes.17 for ; Mon, 10 Mar 2014 06:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=oyKLq3MROQBmroZFGMS96ORYs1nqjNIkDPRUD6J4Qy8=; b=xJLwB8wfQtW4Vz6eeoAbgrzAlKtBa+MDHPJlbs8+s3PirU7PCEF0jCQ5rC/5Ul/64d s/55doZ/VNn3AeJrk66pSJtJsF6uNeFr3WxE5ugKOe0lZVjgH3CIElPvseIo3XdEN6xv A5w+DsMLBkLK6ChVzxkeoE1YvKLgp1tFMERaW+5QFI5vD1DXCjCJqOM1TsPQL2SRs0Pw 4pvTMVkM/Erf48EjkA27/P9R9x7N/POF1AgcBkqT7X3PG5dEfezBz70J71ahRpxtsCfi cSjwiLp4FRYaZynlNWK/DNtFWv+IVYG/t81UWu9h9cb2JCM25KRkDsM1RTKw/uaARSpJ 7ckw== X-Received: by 10.194.187.50 with SMTP id fp18mr70284wjc.89.1394457396357; Mon, 10 Mar 2014 06:16:36 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id d6sm12539028wiz.4.2014.03.10.06.16.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 06:16:35 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 10 Mar 2014 14:16:33 +0100 From: Baptiste Daroussin To: hackers@FreeBSD.org Subject: [CFR] Kevent timer improvements Message-ID: <20140310131632.GI6900@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uJWb33pM2TcUAXIl" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: desrt@desrt.ca X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 13:16:38 -0000 --uJWb33pM2TcUAXIl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, A glib developer pointed me to some of the improvements Apple has done on kqueue(2), some of those improvements are used or will be used by glib in the near futur, plus add new one. I decided to implement part of it and here is the first patch about it: http://people.freebsd.org/~bapt/kevent.diff I will update the manpages accordingly as well: Basically this patch added the following to the EVFILT_TIMER: NOTE_SECONDS data is in seconds NOTE_USECONDS data is in microseconds NOTE_NSECONDS data is in nanoseconds It also added a NOTE_MONOTONIC which consider the data as an absolute time since the boot. (It is different from NOTE_ABSOLUTE extension from apple, so I decided to use NOTE_MONOTONIC to avoid collision). Note that NOTE_MONOTONIC is right only valid as EV_ONESHOT as the is the behaviour that make sense to me concerning this kind of event, should it be different? in that case what behaviour would be expected here? I do plan to add kevent64 support compatible with apple implementation later, as using NOTE_MONOTONIC without 64bit support is not useful very long :) Please keep Ryan in CC I don't think he is subcribed to that least and he is the one from glib project asking for those improvements. regards, Bapt --uJWb33pM2TcUAXIl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEUEARECAAYFAlMduzAACgkQ8kTtMUmk6EyAxACXdvQo8c5rOzznirJL+qGuu7In vACgmnQ/db4THqo/GFtzDHGThnR6gUE= =cBNm -----END PGP SIGNATURE----- --uJWb33pM2TcUAXIl--