Page MenuHomePhabricator

cferris (Christopher Ferris)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 6 2019, 3:45 PM (59 w, 3 d)

Recent Activity

Mon, Sep 21

cferris accepted D88046: [scudo][standalone] Remove the pthread key from the shared TSD.

Good with Android and LGTM.

Mon, Sep 21, 6:14 PM · Restricted Project

Thu, Sep 10

cferris accepted D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.

This seems fine to me, but maybe someone from llvm should also approve.

Thu, Sep 10, 4:52 PM · Restricted Project

Aug 24 2020

cferris accepted D86399: [scudo][standalone] Skip irrelevant regions during release.

I verified that this appears to fix the problem we've seen, the max release was about 6ms, and that was way larger than most of the other releases.

Aug 24 2020, 10:54 PM · Restricted Project

Jul 28 2020

cferris updated the diff for D84806: [scudo][standalone] Add new mallopt options..

Now with the correct name.

Jul 28 2020, 4:03 PM · Restricted Project
cferris updated the diff for D84806: [scudo][standalone] Add new mallopt options..

Move new tests to only be executed on SCUDO_ANDROID.

Jul 28 2020, 3:49 PM · Restricted Project
cferris updated the diff for D84806: [scudo][standalone] Add new mallopt options..

Fixed Option definition.

Jul 28 2020, 3:35 PM · Restricted Project
cferris requested review of D84806: [scudo][standalone] Add new mallopt options..
Jul 28 2020, 3:05 PM · Restricted Project

Jul 27 2020

cferris accepted D84667: [scudo][standalone] mallopt runtime configuration options.

Okay, then this all looks good to me, and the previous perf results (that showed no perf difference) should carry over.

Jul 27 2020, 12:33 PM · Restricted Project
cferris requested changes to D84667: [scudo][standalone] mallopt runtime configuration options.

Is there any major changes from the other mallopt change? In other words, should I rerun performance data?

Jul 27 2020, 10:47 AM · Restricted Project

Jul 21 2020

cferris accepted D83993: [scudo][standalone] Change the release loop for efficiency purposes.

I verified that this does not result in any loss in performance or RSS on Android. I also verified that this fixes the slow run of the test suite and that none of the tests cause a long os release.

Jul 21 2020, 12:25 PM · Restricted Project

Jul 17 2020

cferris accepted D82397: [scudo][standalone] mallopt runtime configuration options.

I did a basic check that this doesn't cause any test failures on Android, nor does it change any RSS for the traces. I didn't do detailed perf testing since this shouldn't affect performance.

Jul 17 2020, 10:57 AM · Restricted Project

Jun 25 2020

cferris added a comment to D82031: [scudo][standalone] Release smaller blocks less often.

I figured out what is causing the performance difference in the 32 bit std::map benchmarks. It's not the allocations that are causing the difference but the initialization of the memory returned by the allocation. In the regressed case, there are no release to the OS and the initialization of the memory takes longer. In the original case, there is a some memory released, and the initialization of the memory takes less time. My guess is that the kernel in 32 bit processes only keeps so many cached pages, and by releasing some of the memory, the kernel is better at figuring out what to evict. This might also be a purely chip based regression and other chips don't exhibit the same issue if they have larger caches.

Jun 25 2020, 6:35 PM · Restricted Project

Jun 24 2020

cferris added a comment to D82031: [scudo][standalone] Release smaller blocks less often.

The change in primary32.h is what is causing the std_map and std_unordered_map RSS and speed changes. My theory is that the new change in releaseToOSMaybe cuts off most calls before any release occurs. So when there is finally a call that will actually do a release, there is a lot of memory to release. This release is taking extra time, so the total runtime increase, and the RSS goes way down. I think this is a good thing, and is a strong benefit of this change.

Jun 24 2020, 3:13 PM · Restricted Project
cferris accepted D82031: [scudo][standalone] Release smaller blocks less often.

I ran the full set of perf/memory benchmarks and nearly everything has the same memory (RSS) values. The performance is nearly the same two.

Jun 24 2020, 1:01 PM · Restricted Project

Jun 18 2020

cferris added a comment to D82031: [scudo][standalone] Release smaller blocks less often.

How does this change look w.r.t. a memory replay test (https://android.googlesource.com/platform/bionic/+/master/docs/native_allocator.md#memory-replay-benchmarks)?

Is it possible to get a before/after of RSS/USS and CPU? This change seems like a very reasonable strategy to me, but I feel like I'm flying blind.

Jun 18 2020, 10:54 AM · Restricted Project

Jun 17 2020

cferris created D82070: [scudo][standalone] Allow Primary allocations to fail up multiple times..
Jun 17 2020, 11:58 PM · Restricted Project

Mar 19 2020

cferris accepted D76430: [scudo][standalone] Allow fallback to secondary if primary is full.

This passes all tests in the Android environment.

Mar 19 2020, 2:49 PM · Restricted Project

Mar 4 2020

cferris accepted D75551: [scudo][standalone] Do not fill 32b regions at once.

The performance after this change is slightly worse for 32 bit, but not by much. and a lot of time seems to be within the variance However, it dramatically reduces the RSS for dex2oat, where it's much closer to jemalloc. It also reduces some of the traces RSS, but not by a large margin.

Mar 4 2020, 9:32 AM · Restricted Project, Restricted Project

Feb 26 2020

cferris accepted D75142: [scudo][standalone] Various improvements wrt RSS.

The performance is about the same as previous and it does shave about 1MB to 2MB of RSS in many cases. It also decrease the camera process by about 2MB.

Feb 26 2020, 10:13 AM · Restricted Project, Restricted Project

Feb 25 2020

cferris added inline comments to D75142: [scudo][standalone] Various improvements wrt RSS.
Feb 25 2020, 11:38 PM · Restricted Project, Restricted Project

Feb 14 2020

cferris added inline comments to D74448: [scudo][standalone] Allow setting release to OS.
Feb 14 2020, 10:57 AM · Restricted Project, Restricted Project
cferris updated the diff for D74448: [scudo][standalone] Allow setting release to OS.

Update the mallopt and remove the ability to set the
primary and secondary differently.

Feb 14 2020, 10:49 AM · Restricted Project, Restricted Project
cferris updated the diff for D74448: [scudo][standalone] Allow setting release to OS.

Add static_casts where needed.

Feb 14 2020, 10:48 AM · Restricted Project, Restricted Project
cferris updated the diff for D74448: [scudo][standalone] Allow setting release to OS.

Created a min and max release to OS value for the allocators.

Feb 14 2020, 7:46 AM · Restricted Project, Restricted Project

Feb 13 2020

cferris updated the diff for D74448: [scudo][standalone] Allow setting release to OS.
Feb 13 2020, 3:09 PM · Restricted Project, Restricted Project

Feb 11 2020

cferris added reviewers for D74448: [scudo][standalone] Allow setting release to OS: pcc, cryptoad.

I added a parameter to the primary and secondary, but I'm not sure when to set using the default. Right now, if the flag release_to_os_interval is set to -1, then it uses the default. I think that it would be better to have the default always override, but what do you think?

Feb 11 2020, 3:17 PM · Restricted Project, Restricted Project
cferris abandoned D74232: scudo: Add way to set release interval for both allocators..

Changed this enough, so I'm abandoning this.

Feb 11 2020, 3:08 PM · Restricted Project, Restricted Project
cferris created D74448: [scudo][standalone] Allow setting release to OS.
Feb 11 2020, 2:59 PM · Restricted Project, Restricted Project

Feb 10 2020

cferris accepted D74366: scudo: Fix Android build..

This fixes the build failure for me.

Feb 10 2020, 4:57 PM · Restricted Project, Restricted Project
cferris added a comment to D73824: scudo: Table driven size classes for Android allocator..

I do see RSS benefits in 32 bit, but the benefits are much larger in 64 bit runs. I see some performance fluctuations, but it looks like some got faster, some got slower, so probably in the noise.

Feb 10 2020, 9:32 AM · Restricted Project, Restricted Project

Feb 7 2020

cferris updated the diff for D74232: scudo: Add way to set release interval for both allocators..

Removed the minimum flags and create and Android specific mallopt setting.

Feb 7 2020, 9:58 AM · Restricted Project, Restricted Project
cferris updated the diff for D74232: scudo: Add way to set release interval for both allocators..

Updated mallopt for android.

Feb 7 2020, 9:40 AM · Restricted Project, Restricted Project
cferris created D74232: scudo: Add way to set release interval for both allocators..
Feb 7 2020, 9:40 AM · Restricted Project, Restricted Project

Dec 20 2019

cferris accepted D71772: [scudo][standalone] Support __BIONIC__.

LGTM

Dec 20 2019, 12:49 PM · Restricted Project, Restricted Project
cferris added a comment to D71772: [scudo][standalone] Support __BIONIC__.

I verified this fixes the case of building bionic on linux, and it also builds properly in the normal android build.

Dec 20 2019, 11:11 AM · Restricted Project, Restricted Project
cferris added inline comments to D71772: [scudo][standalone] Support __BIONIC__.
Dec 20 2019, 9:49 AM · Restricted Project, Restricted Project

Nov 8 2019

cferris created D70031: [scudo][standalone] Match function name change to bionic name change..
Nov 8 2019, 3:38 PM · Restricted Project, Restricted Project

Sep 9 2019

cferris abandoned D66123: [scudo][standalone] Clean-up of Android specific compilation..

This isn't quite right for the way people expect this to compile, so abandon this change.

Sep 9 2019, 1:00 PM · Restricted Project, Restricted Project

Aug 12 2019

cferris created D66123: [scudo][standalone] Clean-up of Android specific compilation..
Aug 12 2019, 5:17 PM · Restricted Project, Restricted Project