NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/39204



>  PS:  I thought it would be better if a conditional variable was added that 
>  signalled when the audio writer is finished so pad_read could sleep on that 
>  variable instead.  I don't know how practical it would be though and using 
>  delay works just fine :)

actually, the patch as-is is pretty gross.  :)

- the hard coded "256" for unit is ugly.

- the calls into audio.c directly are layer violations.  (ie, this and
  the above mean you shouldn't go looking for a struct audio_softc *.)

- the loop of upto 8000 calls to DELAY(500) with softint_schedule()
  probably only works on SMP systems.  i'm not sure a UP system would
  leave this code section normally without completing the loop.

- said loop is very CPU wasteful, due to the 8000 DELAY() calls.  the
  slower the backend is, the worse the CPU usage will be (kind of like
  PIO vs DMA for IDE controllers :-)


do you think you could work on a patch that is more like the text i
quoted above?  that would be great :)


Home | Main Index | Thread Index | Old Index