Skip to content

Scavenging behaviour is inconsistent with its commentary

in savenge_loop we see

    // Order is important here: we want to deal in full blocks as
    // much as possible, so go for global work in preference to
    // local work.  Only if all the global work has been exhausted
    // do we start scavenging the fragments of blocks in the local
    // workspaces.

However this is not what happens. We always scavenge a todo block before looking in our todo queue.

I tried swapping the order in scavenge_find_work and it showed significant improvement in GC times with build-cabal.sh -j16. I would suspect that when running with a small number of capabilities the current behaivour is better, because locality.

Maybe we should branch on work_stealing?

Edited by Douglas Wilson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information