Bug#660960: tight loop attempting to madvise(..., MADV_DONTNEED) locked memory
jamie at audible.transient.net
Sat Feb 25 21:42:44 UTC 2012
Mike Hommey wrote:
> On Sat, Feb 25, 2012 at 09:14:07AM +0000, Jamie Heilman wrote:
> > So yeah, not checking errno and repeatedly attempting to MADV_DONTNEED
> > a range of memory that fails with a reason that isn't EAGAIN ... won't
> > wash. While the whole alsa/jack plugin thing is somewhat unusal, that
> > really is just an easy way to showcase the bigger problem of the lazy
> > approach to madvise that firefox is taking. I can reconfigure my
> > audio setup to avoid locking memory easily enough. Still, firefox
> > shoudln't re-madvise memory ranges doomed to failure over and over
> > again.
> engine anyway?
A JACK client will typically mlockall(MCL_CURRENT | MCL_FUTURE) and
potentially munlock some ranges belonging to common gui toolkits.
This type of thing is fine when you're dealing with serious audio
recording apps and you can't afford delays from page faults.
Obviously it doesn't work too well with bigger applications that were
never designed with that in mind. That behavior is easy to turn off,
and I have, which makes ff10 usable w/the alsa jack plugin again.
Jamie Heilman http://audible.transient.net/~jamie/
More information about the pkg-mozilla-maintainers