Closed Bug 1443930 Opened 6 years ago Closed 6 years ago

reduce the stack size required for AudioIPC threads

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Tracking Status
firefox60 --- affected

People

(Reporter: froydnj, Assigned: u480271)

References

(Blocks 1 open bug)

Details

We create a lot of AudioIPC threads (# of cpus), and we create that many (potentially) in each content process, IIUC.  We should limit the stack space of the AudioIPC threads to something smaller than the default (the default is typically 8MB on Linux and Mac, and 1MB on Windows), since the tasks we're running probably don't need vast quantities of stack space.

This requires https://github.com/djg/audioipc-2/issues/36 to be fixed first.
Matthew, do you might following up on this one?
Assignee: nobody → kinetik
Priority: -- → P3
I think Dan has already started on this, based on https://github.com/djg/audioipc-2/issues/36#issuecomment-371359025 but happy to take it over if he prefers.
Component: Audio/Video → Audio/Video: Playback
Assignee: kinetik → dglastonbury
I've already started on this.

The work is being done in Bug 1446233.  I've been waiting on Kats landing the bincode update with webrender.  If we don't mind too much having bincode 0.9 and bincode 1.0 in third_party at the same time, then I'm happy to land and not block on webrender.
Depends on: 1446233
Bug 1446233 has landed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Does this code use STACK_SIZE_PARAM_IS_A_RESERVATION on Windows?
Presumably it uses whatever Rust does underneath?  I am no expert here, but it looks like this CreateThread call is pretty basic and doesn't use SSPIAR:

https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/thread.rs#L35-L45
Perhaps we should pursue that as part of bug 1436250.
You need to log in before you can comment on or make changes to this bug.