Testing request: GIANT Free snd_solo(4)

Ariff Abdullah ariff at FreeBSD.org
Wed Jan 4 20:35:56 PST 2006


[CC: freebsd-multimedia@]

On Thu, 5 Jan 2006 04:23:34 +0100
Simon Barner <barner at FreeBSD.org> wrote:
> > Great. Hopefully this would be out final test (sorry to bother you
> > too much):
> > 
> >   http://people.freebsd.org/~ariff/test/solo.c
> > 
> > .. and I'm assuming you're using default sound.c (since it's not
> > necessarily its fault).
> > 
> > I've reworked a bit so the same file can be compiled both MPSAFE
> > and non-MPSAFE through the definition of ESS18XX_MPSAFE. I hope
> > you could test both conditions as well, especially regarding with
> > vchans auto creation through hw.snd.maxautovchans. You don't have
> > to reboot, simply using kenv(1) to set it, and kldload/unload.
> 
> Results: When I do not fiddle around with any sysctls etc., it
> works as expected (MPSAFE w/ and w/0 vchans, non-MPSAFE w/ and w/0
> vchans)
>
Case closed :)

> > 
> > My biggest concern is its DMA allignment. I've reduce its value to
> > see whether it should help, in any case.
> > 
> > Few tricks to improve sound performance:
> > 
> > 1) GIANT free
> > 2) PREEMPTION kernel
> > 3) using SCHED_ULE instead of SCHED_4BSD (and yes, SCHED_ULE)
> > 4) Reduce hw.snd.pcm.<unit>.buffersize as minimum as 4096. The
> > only
> >    place where this can be set is through kernel hints
> >    (/boot/device.hints) or using kenv(1) before loading the
> >    driver.
> > 5) Reduce hw.snd.targetirqrate , 16
> > 6) Avoid sharing IRQ with other peripherals. vmstat -i
> > 7) Enable DMA on all harddrives.
> > Optional:-
> > 8) Increase PCI Latency Timer, using pciconf. Sometimes it doesn't
> >    help at all.
> > 
> > See whether 1-7 can help increase sound performance. A single
> > mozilla tarball sho
> > /usr/ports/sysutils/stress .
> 
> Wow, nice list! You really should post it to multimedia at .
> I've followed it to the point (running SCHED_ULE now), and I
> verified that my sound card does not share any interupts, the
> harddrives all use UDMA33, and I tried all the suggested
> increasements and decreasments of all those knobs.
> 
> Results: When I set hw.snd.pcm0.buffersize to 4096, the sound chokes
> (without any additional load). I took 8192 instead.
> 
I'm assuming the default buffersize (16k) is fair enough.

> Untarring a huge tarball does not disturb the sound any more. The
> same applies for "stress --io n").
> 
> But, if I simply copy my distfiles directory to /tmp, or if I run
> "stress --hdd 1", the sound get distorted again. As in my previous
> email, opening a big mbox has the same effect.
>
This will go into my TODO list.

> But I think the situation has improved, and there is an audible
> difference between the MPSAFE and the GIANT-locked driver when doing
> the benchmarks.
> 
>
I'll commit this into -current straight away, MFC after a week
(depends on other people opinions).

Thanks.


--
Ariff Abdullah
FreeBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20060105/f08c9647/attachment.bin


More information about the freebsd-multimedia mailing list