This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Support partial page releasing
ClosedPublic

Authored by Chia-hungDuan on Sep 19 2022, 2:41 PM.

Details

Summary

Block grouping enables us doing partial page releasing so that we can
release the pages in a finer granularity. Which means we don't need to
visit all blocks to determine which pages are unused. Besides, this
means we can do incremental page releasing depends on the number fo free
blocks.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.Sep 19 2022, 2:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 2:41 PM
Herald added a subscriber: Enna1. · View Herald Transcript
Chia-hungDuan requested review of this revision.Sep 19 2022, 2:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 2:41 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Fix releasing logic for group which hasn't had all its spaces allocated.

Only a couple of nits.

All of the code logic looks fine.

compiler-rt/lib/scudo/standalone/primary32.h
720

Nit, "cross".

compiler-rt/lib/scudo/standalone/primary64.h
375

Extra line.

726

Nit, same as before "cross".

Chia-hungDuan marked 2 inline comments as done.

Address review comment

Address review comment

cferris accepted this revision.Oct 6 2022, 2:05 PM

LGTM

Any other reviewers, please take a quick look to make everything looks okay. If you feel that you might not understand all of the deeper changes, we'd still appreciate a higher level review to make sure there are no obvious errors.

This revision is now accepted and ready to land.Oct 6 2022, 2:05 PM
cryptoad accepted this revision.Oct 12 2022, 10:54 AM
cryptoad added inline comments.
compiler-rt/lib/scudo/standalone/local_cache.h
71

nit: checked?

Chia-hungDuan marked an inline comment as done.

Address review comment

This revision was landed with ongoing or failed builds.Oct 13 2022, 4:35 PM
This revision was automatically updated to reflect the committed changes.

It would seem that either this commit or the commit for https://reviews.llvm.org/D133897 has caused terrible instability on a number of PPC bots:
https://lab.llvm.org/buildbot/#/builders/231/builds/3768
https://lab.llvm.org/buildbot/#/builders/230/builds/3987
https://lab.llvm.org/buildbot/#/builders/121/builds/24139

Do you know what the issue might be? It doesn't seem consistent on all the bots.