Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Feb 2005 14:23:15 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        phk@freebsd.org
Subject:   Re: Excessive delays due to syncer kthread
Message-ID:  <20050227032315.GA96334@cirb503493.alcatel.com.au>
In-Reply-To: <Pine.NEB.3.96L.1050226111418.62606C-100000@fledge.watson.org>
References:  <20050226071308.GN57256@cirb503493.alcatel.com.au> <Pine.NEB.3.96L.1050226111418.62606C-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050227032315.GA96334>