Multithread symlink forest removal.
This is a second attempt at aosp/2273288 which got rolled back because it turned out that: 1. We make ~120K symlinks in AOSP (!), all of which need to be deleted 2. System calls are sometimes slow 3. Golang spawns a new OS-level thread for each blocking system calls to keep cores busy All this together means that we sometimes had 10K system calls in flight, which meant 10K OS-level threads, which is when Go gives up and says "I created too many threads, please help". The fix is to move the system calls into a pool of goroutines, which soon end up on a pool of threads (since they mostly do blocking system calls) Test: Presubmits. Change-Id: Ia9aefff3b0ed373f09bb6c8b2ec1d8b0f00b213b
Loading
Please register or sign in to comment