Page MenuHomePhabricator

Chia-hungDuan (Chia-hung Duan)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 21 2021, 11:40 PM (104 w, 17 h)

Recent Activity

Today

Chia-hungDuan updated the diff for D146400: [scudo] Use bytes-in-freelist as a hint of page release.

Address review comments

Mon, Mar 20, 2:04 PM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D146453: [scudo] Implement MemMapLinux: cferris, cryptoad.
Mon, Mar 20, 1:43 PM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D146454: [scudo] Manage pages with MemMap in Secondary Allocator: cferris, cryptoad.
Mon, Mar 20, 1:43 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Move some stuff to mem_map_base.h so that it will make the use of platform MemMap easier.

Mon, Mar 20, 1:41 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D146454: [scudo] Manage pages with MemMap in Secondary Allocator.
Mon, Mar 20, 1:39 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D146453: [scudo] Implement MemMapLinux.
Mon, Mar 20, 1:39 PM · Restricted Project, Restricted Project

Yesterday

Chia-hungDuan added a reviewer for D146400: [scudo] Use bytes-in-freelist as a hint of page release: cferris.
Sun, Mar 19, 4:31 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146400: [scudo] Use bytes-in-freelist as a hint of page release.

Continue how we measure the efficiency of early-exit releaseToOS in D146312,

Sun, Mar 19, 4:30 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D146400: [scudo] Use bytes-in-freelist as a hint of page release.
Sun, Mar 19, 4:25 PM · Restricted Project, Restricted Project

Sat, Mar 18

Chia-hungDuan added a comment to D146312: [scudo] Early exit from the case can't do page release..

Add some number from system_server

Sat, Mar 18, 10:43 PM · Restricted Project, Restricted Project

Fri, Mar 17

Chia-hungDuan added a comment to D146312: [scudo] Early exit from the case can't do page release..

The evaluation is from the same scenario as above - reboot the phone and wait for 30s, then collect all the events of calling releaseToOS.

Fri, Mar 17, 7:33 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146312: [scudo] Early exit from the case can't do page release..

Slightly adjust the heuristic.
The new threshold should also consider PushedBytesDelta because we don't reset it after a failed page release

Fri, Mar 17, 7:26 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146336: [docs][scudo] Add information about M_PURGE_ALL..

Maybe we can say more about the difference between M_PURGE and M_PURGE_ALL? From the description, I'm not sure that I understand which one I should use.

Fri, Mar 17, 3:51 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the summary of D146312: [scudo] Early exit from the case can't do page release..
Fri, Mar 17, 3:48 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146312: [scudo] Early exit from the case can't do page release..

Small comment nits.

You gathered data for the one process, but is there any other data worth gathering?

I did see some extra work going on in system_server, but I was using my test account so it might have a different set of apps that triggers a different allocation pattern. Let me know if you want me to gather anything on this device.

Fri, Mar 17, 3:45 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146312: [scudo] Early exit from the case can't do page release..

Address review comment and fix a bug in keep the invariant that the TryReleaseThreshold.
It should be the minimum distance to the next page release. So if it has reached the high
density, then the next threshold will be the SmallerBlockReleasePageDelta (which we use for
mitigating thrashing)

Fri, Mar 17, 3:37 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146324: scudo: Don't define mallinfo2 on Android..

How do you usually build Scudo? When I run the unit tests I cross compile it for Android using llvm's gn build system. If you're building it as part of the Android platform, SCUDO_PREFIX will be defined to add a prefix of scudo_, so the alias in malloc.h wouldn't affect the definitions.

Fri, Mar 17, 2:56 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Add releaseAndZeroPagesToOS and add more DCHECK in the base classes

Fri, Mar 17, 1:17 PM · Restricted Project, Restricted Project
Chia-hungDuan added a reviewer for D146324: scudo: Don't define mallinfo2 on Android.: cferris.
Fri, Mar 17, 12:35 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146324: scudo: Don't define mallinfo2 on Android..

Just curious, why we didn't have issue before? I thought it may be fine because it's defined as WEAK ?!

Fri, Mar 17, 12:35 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146312: [scudo] Early exit from the case can't do page release..

With this CL, the filtered try-marking-blocks is reduced ~1000 times (6000 vs 5000) in com.google.android.googlequicksearchbox:interactor on Android

Fri, Mar 17, 11:29 AM · Restricted Project, Restricted Project
Chia-hungDuan retitled D146312: [scudo] Early exit from the case can't do page release. from [scudo] Early exit the case can't do page release. to [scudo] Early exit from the case can't do page release..
Fri, Mar 17, 10:50 AM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D146312: [scudo] Early exit from the case can't do page release..
Fri, Mar 17, 10:48 AM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D143626: [scudo] Add a Timer class to assist performance measurement.

Add ScopedTimer::ignore() to skip some scoped events

Fri, Mar 17, 9:35 AM · Restricted Project, Restricted Project

Thu, Mar 16

Chia-hungDuan added inline comments to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Thu, Mar 16, 1:17 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rG248ee65ac647: [scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the… (authored by fabio-d).
[scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the…
Thu, Mar 16, 11:14 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D146229: [scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the heap.
Thu, Mar 16, 11:14 AM · Restricted Project, Restricted Project
Chia-hungDuan accepted D146229: [scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the heap.

LGTM

Thu, Mar 16, 10:31 AM · Restricted Project, Restricted Project

Wed, Mar 15

Chia-hungDuan added inline comments to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Wed, Mar 15, 5:09 PM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D146106: [scudo] Add a method to force release everything..
Wed, Mar 15, 4:53 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
  1. Rename MapReserver to ReservedMap.
  2. Add more comments on why ReservedMap still derives from MemMapBase
  3. Leave the unused functions in ReservedMap unimplemented (which were having default implementations which does nothing)
Wed, Mar 15, 2:12 PM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Wed, Mar 15, 11:34 AM · Restricted Project, Restricted Project

Tue, Mar 14

Chia-hungDuan accepted D146106: [scudo] Add a method to force release everything..
Tue, Mar 14, 6:39 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D146106: [scudo] Add a method to force release everything..

LGTM!

Tue, Mar 14, 6:38 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Remove the defining of MapReserver in the tests

Tue, Mar 14, 2:47 PM · Restricted Project, Restricted Project
Chia-hungDuan retitled D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64 from [scudo] Manage pages with MemMap in SizeClassAllocator64 [RFC] to [scudo] Manage pages with MemMap in SizeClassAllocator64.
Tue, Mar 14, 2:44 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Add unamp() and remove the use of MapPlatformData in primary64

Tue, Mar 14, 2:44 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Make getCapacity as required and add few more comments

Tue, Mar 14, 2:09 PM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Tue, Mar 14, 11:46 AM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

Don't define MapReserver in allocator config

Tue, Mar 14, 11:44 AM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Tue, Mar 14, 9:55 AM · Restricted Project, Restricted Project
Chia-hungDuan added a reviewer for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64: fabio-d.
Tue, Mar 14, 9:54 AM · Restricted Project, Restricted Project

Mon, Mar 13

Chia-hungDuan added a comment to D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.

So far I call it RFC but it's a formal CL as well. There are still many places we can simplify. In order to make the review process easier, I'll do the simplification in coming CLs.

Mon, Mar 13, 10:33 PM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64: cferris, cryptoad, supersymetrie.
Mon, Mar 13, 10:31 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D146009: [scudo] Manage pages with MemMap in SizeClassAllocator64.
Mon, Mar 13, 10:30 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rG2aa99771b626: [scudo] Reduce the times of holding MapAllocatorCache::Mutex (NFC) (authored by Chia-hungDuan).
[scudo] Reduce the times of holding MapAllocatorCache::Mutex (NFC)
Mon, Mar 13, 10:12 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D145427: [scudo] Reduce the times of holding MapAllocatorCache::Mutex (NFC).
Mon, Mar 13, 10:11 AM · Restricted Project, Restricted Project

Fri, Mar 10

Chia-hungDuan added a reverting change for rGe64fabf51e88: Revert "[scudo] Mitigate page releasing thrashing": rGf0e3401740df: Reland D144768 "[scudo] Mitigate page releasing thrashing".
Fri, Mar 10, 8:53 AM · Restricted Project, Restricted Project
Chia-hungDuan committed rGf0e3401740df: Reland D144768 "[scudo] Mitigate page releasing thrashing" (authored by Chia-hungDuan).
Reland D144768 "[scudo] Mitigate page releasing thrashing"
Fri, Mar 10, 8:53 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D145543: Reland D144768 "[scudo] Mitigate page releasing thrashing".
Fri, Mar 10, 8:53 AM · Restricted Project, Restricted Project

Thu, Mar 9

Chia-hungDuan accepted D145636: [scudo] Add a fast get time version..

No conflict at all!

Thu, Mar 9, 8:31 AM · Restricted Project, Restricted Project
Chia-hungDuan committed rGe4efa885387e: [scudo] Slightly improve the handling of last block in a region (authored by Chia-hungDuan).
[scudo] Slightly improve the handling of last block in a region
Thu, Mar 9, 8:19 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D145419: [scudo] Slightly improve the handling of last block in a region.
Thu, Mar 9, 8:18 AM · Restricted Project, Restricted Project

Wed, Mar 8

Chia-hungDuan committed rG849da0320253: [scudo] Shuffle the regions (authored by Chia-hungDuan).
[scudo] Shuffle the regions
Wed, Mar 8, 2:59 PM · Restricted Project, Restricted Project
Chia-hungDuan closed D145407: [scudo] Shuffle the regions.
Wed, Mar 8, 2:59 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rGc514198e4d39: [scudo] Adjust page map buffer size (authored by Chia-hungDuan).
[scudo] Adjust page map buffer size
Wed, Mar 8, 1:22 PM · Restricted Project, Restricted Project
Chia-hungDuan closed D144754: [scudo] Adjust page map buffer size.
Wed, Mar 8, 1:21 PM · Restricted Project, Restricted Project

Tue, Mar 7

Chia-hungDuan added a reviewer for D145543: Reland D144768 "[scudo] Mitigate page releasing thrashing": cferris.
Tue, Mar 7, 9:38 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D145543: Reland D144768 "[scudo] Mitigate page releasing thrashing".

default init SmallerBlockReleasePageDelta as 0 because all other fields in
primary allocator are initialized as 0. Make them consistent so that we don't
need additional static initializer. Eventually, we will override it later.

Tue, Mar 7, 9:37 PM · Restricted Project, Restricted Project
Chia-hungDuan added a reverting change for rGe64fabf51e88: Revert "[scudo] Mitigate page releasing thrashing": D145543: Reland D144768 "[scudo] Mitigate page releasing thrashing".
Tue, Mar 7, 9:33 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D145543: Reland D144768 "[scudo] Mitigate page releasing thrashing".
Tue, Mar 7, 9:32 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rG96a38b945e6e: [scudo] Do not instantiate Android svelte allocator. (authored by cferris).
[scudo] Do not instantiate Android svelte allocator.
Tue, Mar 7, 9:22 PM · Restricted Project, Restricted Project
Chia-hungDuan closed D145525: [scudo] Do not instantiate Android svelte allocator..
Tue, Mar 7, 9:22 PM · Restricted Project, Restricted Project
Chia-hungDuan accepted D145525: [scudo] Do not instantiate Android svelte allocator..
Tue, Mar 7, 2:30 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D145419: [scudo] Slightly improve the handling of last block in a region.

Are there tests that already cover the modified code?

Tue, Mar 7, 2:26 PM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D145419: [scudo] Slightly improve the handling of last block in a region.
Tue, Mar 7, 2:25 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D145419: [scudo] Slightly improve the handling of last block in a region.

Add more comment

Tue, Mar 7, 2:25 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rG657d297a92ae: [scudo] Simplify markFreeBlocks (authored by Chia-hungDuan).
[scudo] Simplify markFreeBlocks
Tue, Mar 7, 1:56 PM · Restricted Project, Restricted Project
Chia-hungDuan closed D143303: [scudo] Simplify markFreeBlocks.
Tue, Mar 7, 1:56 PM · Restricted Project, Restricted Project

Mon, Mar 6

Chia-hungDuan added a reverting change for rG436ea5485d02: [scudo] Mitigate page releasing thrashing: rGe64fabf51e88: Revert "[scudo] Mitigate page releasing thrashing".
Mon, Mar 6, 3:29 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rGe64fabf51e88: Revert "[scudo] Mitigate page releasing thrashing" (authored by Chia-hungDuan).
Revert "[scudo] Mitigate page releasing thrashing"
Mon, Mar 6, 3:29 PM · Restricted Project, Restricted Project
Chia-hungDuan added a reverting change for D144768: [scudo] Mitigate page releasing thrashing: rGe64fabf51e88: Revert "[scudo] Mitigate page releasing thrashing".
Mon, Mar 6, 3:28 PM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D145427: [scudo] Reduce the times of holding MapAllocatorCache::Mutex (NFC): cferris, cryptoad.
Mon, Mar 6, 2:22 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D145427: [scudo] Reduce the times of holding MapAllocatorCache::Mutex (NFC).
Mon, Mar 6, 2:22 PM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D145419: [scudo] Slightly improve the handling of last block in a region: cferris, cryptoad.
Mon, Mar 6, 1:38 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D145419: [scudo] Slightly improve the handling of last block in a region.

Add more comments

Mon, Mar 6, 1:37 PM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D145419: [scudo] Slightly improve the handling of last block in a region.
Mon, Mar 6, 1:32 PM · Restricted Project, Restricted Project
Chia-hungDuan committed rGa6e3bb9bfbd0: [scudo] Make the boundary of memory group aligned with region begin (authored by Chia-hungDuan).
[scudo] Make the boundary of memory group aligned with region begin
Mon, Mar 6, 11:39 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D142931: [scudo] Make the boundary of memory group aligned with region begin.
Mon, Mar 6, 11:39 AM · Restricted Project, Restricted Project
Chia-hungDuan added reviewers for D145407: [scudo] Shuffle the regions: cferris, cryptoad.
Mon, Mar 6, 11:14 AM · Restricted Project, Restricted Project
Chia-hungDuan requested review of D145407: [scudo] Shuffle the regions.
Mon, Mar 6, 11:13 AM · Restricted Project, Restricted Project
Chia-hungDuan committed rG0bd4499b9679: [scudo] Temporarily disable GetRssFromBuffer test (authored by Chia-hungDuan).
[scudo] Temporarily disable GetRssFromBuffer test
Mon, Mar 6, 8:40 AM · Restricted Project, Restricted Project
Chia-hungDuan committed rG436ea5485d02: [scudo] Mitigate page releasing thrashing (authored by Chia-hungDuan).
[scudo] Mitigate page releasing thrashing
Mon, Mar 6, 8:40 AM · Restricted Project, Restricted Project
Chia-hungDuan added a reverting change for rGdaaef4c49954: Revert "Revert "Revert "[scudo] Only prepare PageMap entry for partial region""": rG5b9d6097e78d: Reland D144920 "[scudo] Only prepare PageMap entry for partial region.
Mon, Mar 6, 8:40 AM · Restricted Project, Restricted Project
Chia-hungDuan committed rG5b9d6097e78d: Reland D144920 "[scudo] Only prepare PageMap entry for partial region (authored by Chia-hungDuan).
Reland D144920 "[scudo] Only prepare PageMap entry for partial region
Mon, Mar 6, 8:40 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D145126: [scudo] Temporarily disable GetRssFromBuffer test.
Mon, Mar 6, 8:40 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D144768: [scudo] Mitigate page releasing thrashing.
Mon, Mar 6, 8:39 AM · Restricted Project, Restricted Project
Chia-hungDuan closed D144920: Revert "Revert "[scudo] Only prepare PageMap entry for partial region"".
Mon, Mar 6, 8:39 AM · Restricted Project, Restricted Project

Fri, Mar 3

Chia-hungDuan updated the diff for D144768: [scudo] Mitigate page releasing thrashing.

Remove extra space and rebase

Fri, Mar 3, 1:27 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D144768: [scudo] Mitigate page releasing thrashing.

LGTM.

I had one small comment about a comment that is so small that I don't think it's worth holding up the CL.

Fri, Mar 3, 1:24 PM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D144768: [scudo] Mitigate page releasing thrashing.

Address review comment

Fri, Mar 3, 11:55 AM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D144754: [scudo] Adjust page map buffer size.

The size is determined by collecting the buffer usage from several apps and we didn't see them over 256, most of them are smaller than 100. With partial range releasing, the required buffer size is even smaller. The following is a sample with buffer size grater than 200. It's 15 out of 312 buffer usages.

Fri, Mar 3, 11:08 AM · Restricted Project, Restricted Project
Chia-hungDuan added inline comments to D144754: [scudo] Adjust page map buffer size.
Fri, Mar 3, 10:57 AM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D144754: [scudo] Adjust page map buffer size.

Address review comment and slightly reorganize conditional branch

Fri, Mar 3, 10:57 AM · Restricted Project, Restricted Project
Chia-hungDuan updated the diff for D143303: [scudo] Simplify markFreeBlocks.

Rebase only

Fri, Mar 3, 10:24 AM · Restricted Project, Restricted Project

Thu, Mar 2

Chia-hungDuan updated the diff for D144920: Revert "Revert "[scudo] Only prepare PageMap entry for partial region"".

Fix a bug on Fuchsia, ReleaseRecorder should record the offset instead of adding the offset to the base directly.

Thu, Mar 2, 6:25 PM · Restricted Project, Restricted Project
Chia-hungDuan reopened D144920: Revert "Revert "[scudo] Only prepare PageMap entry for partial region"".
Thu, Mar 2, 5:48 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D144920: Revert "Revert "[scudo] Only prepare PageMap entry for partial region"".

We don't upload a new patch for a reland. You can click "Add Action" -> "Reopen Revision" and reuse the original differential. This helps discussions in a centralized place.

Thu, Mar 2, 1:42 PM · Restricted Project, Restricted Project
Chia-hungDuan added a comment to D142659: [scudo] Only prepare PageMap entry for partial region.

I usually use Revert Dxxxx $original_subject instead of Revert Dxxxx $original_subject so that the revert commit is associated with this page. You can see the commit in "Commits" in the "Details" section.

Thu, Mar 2, 1:07 PM · Restricted Project, Restricted Project
Chia-hungDuan added a reverting change for rGc6ef6bbd8d96: Revert "Revert "[scudo] Only prepare PageMap entry for partial region"": rGdaaef4c49954: Revert "Revert "Revert "[scudo] Only prepare PageMap entry for partial region""".
Thu, Mar 2, 12:39 PM · Restricted Project, Restricted Project