On Thu, 20 May 2004, Keith Whitwell wrote:

> Dave Airlie wrote:
> > It has been pointed out to me by Andrew and  Fernando Pablo Lopez-Lezcano
> > that we do a lot of sleeping in code that probably should reschedule
> > rather than sleep,radeon_do_wait_for_idle being a prime example, this has
> > a DRM_UDELAY(1), this messes up audio latencys,
> >
> > Now I'm not sure that wholesale replacing these with a conditional
> > schedule is correct, but in most cases it looks like there should be no
> > issues doing this, theses functions are all usually called from a process
> > context,
> >
> > My main worry is what to do on BSD about this?, should I just define a
> > DRM_SCHED( delay ) and on Linux do a schedule and do a delay on BSD until
> > someone steps up to figure it out?
>
> That's been the traditional approach - filp maps to pid on BSD, or at least it
> did initially.  Doing the same thing with delays should be fine.
>
> What you will notice though is a performance cliff when you start to hit the
> delay occasionally.  Or at least that was the case on early 2.4 when I looked
> at this last.
>
> Keith
>

FreeBSD's DRM used to define DRM_DELAY as a macro around a wakeup/tsleep
pair (almost the equivalent of schedule()).  This did result in some
fairly bad stuttering on at least the G400 that using the simple delay
loop (UDELAY) fixed (the wakeup/tsleep also avoided some lockups that the
linux version of that driver had at times, but the stuttering made
many interactive apps fairly useless).

This was with FreeBSD-4.1 to maybe FreeBSD-4.4.

FreeBSD-5.x may have some better facilities for scheduling small delays
in device drivers that are waiting for hardware to return and for quickly
scheduling run time for a user process that is blocking on that device
driver.  But that's not something I know about first hand.


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to