From owner-freebsd-drivers@FreeBSD.ORG Mon Oct 20 17:42:03 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 5E38D1065680 for ; Mon, 20 Oct 2008 17:42:03 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4D71C8FC1A for ; Mon, 20 Oct 2008 17:42:03 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 38A631A3C38; Mon, 20 Oct 2008 10:42:03 -0700 (PDT) Date: Mon, 20 Oct 2008 10:42:03 -0700 From: Alfred Perlstein To: Len Gross Message-ID: <20081020174203.GN22503@elvis.mu.org> References: <27cb3ada0810191228y2cf4ba5end071263f6d2f93df@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27cb3ada0810191228y2cf4ba5end071263f6d2f93df@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-drivers@freebsd.org" Subject: Re: 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: Mon, 20 Oct 2008 17:42:03 -0000 * Len Gross [081019 12:28] wrote: > Warner, > > Thanks so much for your response. This is really a case where I'm a > bit over my head! > > I thought on a a "busy" machine, there was a fundamental "no uppper > bound" on the wait on a sleep; independent of the Hz? Not real-time > blah, blah, ...... > > I am trying to understand if a driver "sleep" gets special attention > (i.e higher "priority") so that I see less slop in the timing. > > Of course, I could hack up a driver and try some tests, but wanted > some advice before diving into that pool. > > Thanks again. Yes, you should see less slop in a driver because the ithread priority will be much higher than userland. The reason your userland is getting jitter is because other things may be running before it is based on priority. -Alfred