lkml.org 
[lkml]   [2014]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/5] mm, compaction: always update cached scanner positions
    On Tue, Oct 07, 2014 at 05:33:38PM +0200, Vlastimil Babka wrote:
    > Compaction caches the migration and free scanner positions between compaction
    > invocations, so that the whole zone gets eventually scanned and there is no
    > bias towards the initial scanner positions at the beginning/end of the zone.
    >
    > The cached positions are continuously updated as scanners progress and the
    > updating stops as soon as a page is successfully isolated. The reasoning
    > behind this is that a pageblock where isolation succeeded is likely to succeed
    > again in near future and it should be worth revisiting it.
    >
    > However, the downside is that potentially many pages are rescanned without
    > successful isolation. At worst, there might be a page where isolation from LRU
    > succeeds but migration fails (potentially always). So upon encountering this
    > page, cached position would always stop being updated for no good reason.
    > It might have been useful to let such page be rescanned with sync compaction
    > after async one failed, but this is now handled by caching scanner position
    > for async and sync mode separately since commit 35979ef33931 ("mm, compaction:
    > add per-zone migration pfn cache for async compaction").

    Hmm... I'm not sure that this patch is good thing.

    In asynchronous compaction, compaction could be easily failed and
    isolated freepages are returned to the buddy. In this case, next
    asynchronous compaction would skip those returned freepages and
    both scanners could meet prematurely.

    And, I guess that pageblock skip feature effectively disable pageblock
    rescanning if there is no freepage during rescan. This patch would
    eliminate effect of pageblock skip feature.

    IIUC, compaction logic assume that there are many temporary failure
    conditions. Retrying from others would reduce effect of this temporary
    failure so implementation looks as is.

    If what we want is scanning each page once in each epoch, we can
    implement compaction logic differently.

    Please let me know if I'm missing something.

    Thanks.



    \
     
     \ /
      Last update: 2014-10-27 09:01    [W:4.167 / U:1.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site