From owner-freebsd-drivers@FreeBSD.ORG Sun Oct 19 14:49:32 2008 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7CC106568A for ; Sun, 19 Oct 2008 14:49:32 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.245]) by mx1.freebsd.org (Postfix) with ESMTP id 757B38FC1D for ; Sun, 19 Oct 2008 14:49:32 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: by rv-out-0708.google.com with SMTP id k29so2006155rvb.0 for ; Sun, 19 Oct 2008 07:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=2DPBFGUG9WL+fxNDUrovoDgm3iYcu/6kp2nbbkeRShw=; b=l8xeuJknrqk03+1O85RcVl1FENJtYE3mi/y1zpbryOwpMsKyiRBG+cbLN1EL15I4CY JeQ5JkBBL1XHTuA+aKcgAutRdZEeHDqrcfkkVn0pjbYBfiwualkzAXb6+gqK2Dbw8XCh pxHUre4+YI8w9rzKWyCjk1JzcN2Qck1zRWtC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Cm/LpAAaDa5F8bIXK7zXQP3C8AmcX1HIpkZ2MP4RbZYAJ3I4oA3tDOT5uotPbKhd7T txNks0kuNV2IfnwqVna7AzJfMiNbULgVjWiIZQG4b4IJXeOg48TxjcVvFxBXOSEvQC5n xU6pBmqxy8U13kp8iDzoCbn4cPwEWm43M2z/8= Received: by 10.141.197.8 with SMTP id z8mr4071158rvp.285.1224426032503; Sun, 19 Oct 2008 07:20:32 -0700 (PDT) Received: by 10.141.37.19 with HTTP; Sun, 19 Oct 2008 07:20:32 -0700 (PDT) Message-ID: <27cb3ada0810190720u2cc84097w2ed6425bc6ee8d3f@mail.gmail.com> Date: Sun, 19 Oct 2008 07:20:32 -0700 From: "Len Gross" To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Polling and Sleep in a Driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2008 14:49:32 -0000 I have a MAC protocol written using Netgraph. It runs in userland and uses a simple poll, sleep loop. It has proved that the algorithms are correct, but the sleeps are not regular/accurate enough for my purposes. (I have pushed Hz up quite a bit with no real effect) If I were to implement the algorithms within a driver would the sleeps still suffer from the same "non real-time" behaviour I see in userland? Thanks in advance. -- Len