Date: Thu, 5 Jan 2006 12:35:44 +0800 From: Ariff Abdullah <ariff@FreeBSD.org> To: Simon Barner <barner@FreeBSD.org> Cc: freebsd-multimedia@FreeBSD.org Subject: Re: Testing request: GIANT Free snd_solo(4) Message-ID: <20060105123544.73fb400a.ariff@FreeBSD.org> In-Reply-To: <20060105032333.GA2865@zi025.glh.mhn.de> References: <20060104224705.3bb21deb.ariff@FreeBSD.org> <20060104151211.GB1128@zi025.glh.mhn.de> <20060104232933.7c915cff.ariff@FreeBSD.org> <20060104182532.GA1019@zi025.glh.mhn.de> <20060104191053.GA1037@zi025.glh.mhn.de> <20060105065827.65b27ac8.ariff@FreeBSD.org> <20060104235339.GA1222@zi025.glh.mhn.de> <20060105081205.04dfee19.ariff@FreeBSD.org> <20060105004404.GA2027@zi025.glh.mhn.de> <20060105100556.5cdb1043.ariff@FreeBSD.org> <20060105032333.GA2865@zi025.glh.mhn.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Thu__5_Jan_2006_12_35_44_+0800_KrOHy5uhiJ4u6IkF Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [CC: freebsd-multimedia@] On Thu, 5 Jan 2006 04:23:34 +0100 Simon Barner <barner@FreeBSD.org> wrote: > > Great. Hopefully this would be out final test (sorry to bother you > > too much): > >=20 > > http://people.freebsd.org/~ariff/test/solo.c > >=20 > > .. and I'm assuming you're using default sound.c (since it's not > > necessarily its fault). > >=20 > > 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. >=20 > 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 :) > >=20 > > My biggest concern is its DMA allignment. I've reduce its value to > > see whether it should help, in any case. > >=20 > > Few tricks to improve sound performance: > >=20 > > 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. > >=20 > > See whether 1-7 can help increase sound performance. A single > > mozilla tarball sho > > /usr/ports/sysutils/stress . >=20 > Wow, nice list! You really should post it to multimedia@. > 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. >=20 > Results: When I set hw.snd.pcm0.buffersize to 4096, the sound chokes > (without any additional load). I took 8192 instead. >=20 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"). >=20 > 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. >=20 > I'll commit this into -current straight away, MFC after a week (depends on other people opinions). Thanks. -- Ariff Abdullah FreeBSD --Signature=_Thu__5_Jan_2006_12_35_44_+0800_KrOHy5uhiJ4u6IkF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDvKIjlr+deMUwTNoRAoTgAKC1KlpSzDA68S944k6UvQw6c/FAUACeJoaC /ODDtToSwgDMQ58j/VhhMDQ= =HkjJ -----END PGP SIGNATURE----- --Signature=_Thu__5_Jan_2006_12_35_44_+0800_KrOHy5uhiJ4u6IkF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060105123544.73fb400a.ariff>