From owner-freebsd-stable@FreeBSD.ORG Sun Feb 27 03:23:18 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96B6E16A4CE; Sun, 27 Feb 2005 03:23:18 +0000 (GMT) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB11743D5D; Sun, 27 Feb 2005 03:23:17 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1R3NGsY007301 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 27 Feb 2005 14:23:16 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1R3NF7l096373; Sun, 27 Feb 2005 14:23:15 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1R3NFJn096372; Sun, 27 Feb 2005 14:23:15 +1100 (EST) (envelope-from pjeremy) Date: Sun, 27 Feb 2005 14:23:15 +1100 From: Peter Jeremy To: Robert Watson Message-ID: <20050227032315.GA96334@cirb503493.alcatel.com.au> References: <20050226071308.GN57256@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i cc: freebsd-stable@freebsd.org cc: phk@freebsd.org Subject: Re: Excessive delays due to syncer kthread X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 03:23:18 -0000 On Sat, 2005-Feb-26 11:24:26 +0000, Robert Watson wrote: >I don't have too much insight into the syncer (I've CC'd phk to victimize >him with more e-mail as this is an area he takes great interested in). A >couple of questions: > >(1) Have you tried turning on options PREEMPTION? I haven't yet. I will look at this but some of the mailing list comments made me think it wasn't totally reliable yet. >(2) Does the driver code run with Giant at all? Yes. It's marked INTR_MPSAFE and never grabs Giant. The only locking it needs is PROC_LOCK (and that's only for psignal(9)). >(3) Are you relying on callouts or taskqueues at all for processing? No. >running though. So using preemption and Giant-free code, we should be >able to get your driver code in kernel to run on short deadline, but >getting the syncer to behave better will be necessary to get the user code >running on short deadline. The userland code is less of a problem. The hardware can fit 3-6 frames (depending on depth) into a shared ring buffer - which gives me 60-120msec for the user code to wake up (100msec at the depth I will normally use). The problem is that the hardware can't autonomously move between entries in the ring buffer so the interrupt handler needs to re-write some device registers during the vertical blanking period (~1.6msec). Thanks for your input. -- Peter Jeremy