Changeset 252224 in webkit


Ignore:
Timestamp:
Nov 7, 2019 5:29:07 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

[bmalloc] Bug fix for wait time when it's in mini mode.
https://bugs.webkit.org/show_bug.cgi?id=203121

Reviewed by Saam Barati.

Basuke pointed out that we never changed m_waitTime in scavenger when we are in iOS and mini-mode.
So previously, we are always executing scavenger for each 10ms in mini-mode. After fixing it, we
found that this unintentional behavior was better policy for RAMification.
In this patch, we explicitly use the old behavior, "scavenge for each 10ms" in iOS mini-mode.
We should revisit scavenger's behavior in the future to explore further better behavior.

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::threadRunLoop):

Location:
trunk/Source/bmalloc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/bmalloc/ChangeLog

    r252157 r252224  
     12019-11-07  Basuke Suzuki  <Basuke.Suzuki@sony.com> and Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [bmalloc] Bug fix for wait time when it's in mini mode.
     4        https://bugs.webkit.org/show_bug.cgi?id=203121
     5
     6        Reviewed by Saam Barati.
     7
     8        Basuke pointed out that we never changed m_waitTime in scavenger when we are in iOS and mini-mode.
     9        So previously, we are always executing scavenger for each 10ms in mini-mode. After fixing it, we
     10        found that this unintentional behavior was better policy for RAMification.
     11        In this patch, we explicitly use the old behavior, "scavenge for each 10ms" in iOS mini-mode.
     12        We should revisit scavenger's behavior in the future to explore further better behavior.
     13
     14        * bmalloc/Scavenger.cpp:
     15        (bmalloc::Scavenger::threadRunLoop):
     16
    1172019-11-06  Yusuke Suzuki  <ysuzuki@apple.com>
    218
  • trunk/Source/bmalloc/bmalloc/Scavenger.cpp

    r252157 r252224  
    496496        }
    497497
    498         std::chrono::milliseconds newWaitTime;
    499 
    500         if (m_isInMiniMode) {
    501             timeSpentScavenging *= 50;
    502             newWaitTime = std::chrono::duration_cast<std::chrono::milliseconds>(timeSpentScavenging);
    503             newWaitTime = std::min(std::max(newWaitTime, std::chrono::milliseconds(25)), std::chrono::milliseconds(500));
    504         } else {
     498        // FIXME: We need to investigate mini-mode's adjustment.
     499        // https://bugs.webkit.org/show_bug.cgi?id=203987
     500        if (!m_isInMiniMode) {
    505501            timeSpentScavenging *= 150;
    506             newWaitTime = std::chrono::duration_cast<std::chrono::milliseconds>(timeSpentScavenging);
     502            std::chrono::milliseconds newWaitTime = std::chrono::duration_cast<std::chrono::milliseconds>(timeSpentScavenging);
    507503            m_waitTime = std::min(std::max(newWaitTime, std::chrono::milliseconds(100)), std::chrono::milliseconds(10000));
    508504        }
Note: See TracChangeset for help on using the changeset viewer.